diff options
author | Florian Fainelli <florian@openwrt.org> | 2012-07-24 10:33:09 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2012-07-24 10:33:09 -0400 |
commit | 0b55561bc608abbbd1b5c98e0a4e9158334086c1 (patch) | |
tree | bfdaaa88b1cc14d169183ffd5eafd262f403a356 /arch/mips/bcm63xx/clk.c | |
parent | a03822ea5df6365c878f0765d7af56a94b9c2cfe (diff) |
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 <florian@openwrt.org>
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 <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/bcm63xx/clk.c')
-rw-r--r-- | arch/mips/bcm63xx/clk.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c index be49b9a13a93..1db48adb543a 100644 --- a/arch/mips/bcm63xx/clk.c +++ b/arch/mips/bcm63xx/clk.c | |||
@@ -224,6 +224,18 @@ static struct clk clk_xtm = { | |||
224 | }; | 224 | }; |
225 | 225 | ||
226 | /* | 226 | /* |
227 | * IPsec clock | ||
228 | */ | ||
229 | static void ipsec_set(struct clk *clk, int enable) | ||
230 | { | ||
231 | bcm_hwclock_set(CKCTL_6368_IPSEC_EN, enable); | ||
232 | } | ||
233 | |||
234 | static struct clk clk_ipsec = { | ||
235 | .set = ipsec_set, | ||
236 | }; | ||
237 | |||
238 | /* | ||
227 | * Internal peripheral clock | 239 | * Internal peripheral clock |
228 | */ | 240 | */ |
229 | static struct clk clk_periph = { | 241 | static struct clk clk_periph = { |
@@ -280,6 +292,8 @@ struct clk *clk_get(struct device *dev, const char *id) | |||
280 | return &clk_periph; | 292 | return &clk_periph; |
281 | if (BCMCPU_IS_6358() && !strcmp(id, "pcm")) | 293 | if (BCMCPU_IS_6358() && !strcmp(id, "pcm")) |
282 | return &clk_pcm; | 294 | return &clk_pcm; |
295 | if (BCMCPU_IS_6368() && !strcmp(id, "ipsec")) | ||
296 | return &clk_ipsec; | ||
283 | return ERR_PTR(-ENOENT); | 297 | return ERR_PTR(-ENOENT); |
284 | } | 298 | } |
285 | 299 | ||