From: Florian Fainelli Date: Tue, 24 Jul 2012 14:33:09 +0000 (+0200) Subject: MIPS: BCM63XX: add support for "ipsec" clock X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=0b55561bc608abbbd1b5c98e0a4e9158334086c1;p=linux-edison.git MIPS: BCM63XX: add support for "ipsec" clock This module is only available on BCM6368 so far and does not require resetting the block. Signed-off-by: Florian Fainelli Cc: linux-mips@linux-mips.org Cc: mpm@selenic.com Cc: herbert@gondor.apana.org.au Patchwork: https://patchwork.linux-mips.org/patch/3324/ Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c index be49b9a13a9..1db48adb543 100644 --- a/arch/mips/bcm63xx/clk.c +++ b/arch/mips/bcm63xx/clk.c @@ -224,6 +224,18 @@ static struct clk clk_xtm = { }; /* + * IPsec clock + */ +static void ipsec_set(struct clk *clk, int enable) +{ + bcm_hwclock_set(CKCTL_6368_IPSEC_EN, enable); +} + +static struct clk clk_ipsec = { + .set = ipsec_set, +}; + +/* * Internal peripheral clock */ static struct clk clk_periph = { @@ -280,6 +292,8 @@ struct clk *clk_get(struct device *dev, const char *id) return &clk_periph; if (BCMCPU_IS_6358() && !strcmp(id, "pcm")) return &clk_pcm; + if (BCMCPU_IS_6368() && !strcmp(id, "ipsec")) + return &clk_ipsec; return ERR_PTR(-ENOENT); }