| To: | Matt Mackall <mpm@selenic.com> |
|---|---|
| Subject: | [PATCH 2/5] MIPS: BCM63XX: add support for "ipsec" clock |
| From: | Florian Fainelli <florian@openwrt.org> |
| Date: | Fri, 9 Dec 2011 20:01:07 +0100 |
| Cc: | Herbert Xu <herbert@gondor.apana.org.au>, ralf@linux-mips.org, linux-mips@linux-mips.org, Florian Fainelli <florian@openwrt.org> |
| In-reply-to: | <1323457270-16330-1-git-send-email-florian@openwrt.org> |
| References: | <1323457270-16330-1-git-send-email-florian@openwrt.org> |
| Sender: | linux-mips-bounce@linux-mips.org |
This module is only available on BCM6368 so far and does not require
resetting the block.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
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 9d57c71..28137d5 100644
--- a/arch/mips/bcm63xx/clk.c
+++ b/arch/mips/bcm63xx/clk.c
@@ -222,6 +222,18 @@ static struct clk clk_xtm = {
};
/*
+ * IPsec clock
+ */
+static void ipsec_set(struct clk *clk, int enable)
+{
+ bcm_hwclock_set(CKCTL_6368_IPSEC_CLK_EN, enable);
+}
+
+static struct clk clk_ipsec = {
+ .set = ipsec_set,
+};
+
+/*
* Internal peripheral clock
*/
static struct clk clk_periph = {
@@ -278,6 +290,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);
}
--
1.7.5.4
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 4/5] MIPS: BCM63XX: add RNG driver platform_device stub, Florian Fainelli |
|---|---|
| Next by Date: | [PATCH 0/5] Broadcom BCM63xx RNG support, Florian Fainelli |
| Previous by Thread: | Re: [PATCH 4/5] MIPS: BCM63XX: add RNG driver platform_device stub, Florian Fainelli |
| Next by Thread: | [PATCH 5/5] hw_random: add Broadcom BCM63xx RNG driver, Florian Fainelli |
| Indexes: | [Date] [Thread] [Top] [All Lists] |