| To: | ralf@linux-mips.org |
|---|---|
| Subject: | [PATCH 1/7] MIPS: BCM63XX: Expose the USBH/USBD clocks on BCM6328/BCM6368 |
| From: | Kevin Cernekee <cernekee@gmail.com> |
| Date: | Fri, 22 Jun 2012 22:14:51 -0700 |
| Cc: | <ffainelli@freebox.fr>, <mbizon@freebox.fr>, <jonas.gorski@gmail.com>, <linux-mips@linux-mips.org> |
| In-reply-to: | <0f67eabbb0d5c59add27e42a08b94944@localhost> |
| List-archive: | <http://www.linux-mips.org/archives/linux-mips/> |
| List-help: | <mailto:ecartis@linux-mips.org?Subject=help> |
| List-id: | linux-mips <linux-mips.eddie.linux-mips.org> |
| List-owner: | <mailto:ralf@linux-mips.org> |
| List-post: | <mailto:linux-mips@linux-mips.org> |
| List-software: | Ecartis version 1.0.0 |
| List-subscribe: | <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips> |
| List-unsubscribe: | <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips> |
| References: | <0f67eabbb0d5c59add27e42a08b94944@localhost> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | vim 7.2 |
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
---
arch/mips/bcm63xx/clk.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c
index 1db48ad..dff79ab 100644
--- a/arch/mips/bcm63xx/clk.c
+++ b/arch/mips/bcm63xx/clk.c
@@ -160,7 +160,9 @@ static struct clk clk_pcm = {
*/
static void usbh_set(struct clk *clk, int enable)
{
- if (BCMCPU_IS_6348())
+ if (BCMCPU_IS_6328())
+ bcm_hwclock_set(CKCTL_6328_USBH_EN, enable);
+ else if (BCMCPU_IS_6348())
bcm_hwclock_set(CKCTL_6348_USBH_EN, enable);
else if (BCMCPU_IS_6368())
bcm_hwclock_set(CKCTL_6368_USBH_EN, enable);
@@ -171,6 +173,21 @@ static struct clk clk_usbh = {
};
/*
+ * USB device clock
+ */
+static void usbd_set(struct clk *clk, int enable)
+{
+ if (BCMCPU_IS_6328())
+ bcm_hwclock_set(CKCTL_6328_USBD_EN, enable);
+ else if (BCMCPU_IS_6368())
+ bcm_hwclock_set(CKCTL_6368_USBD_EN, enable);
+}
+
+static struct clk clk_usbd = {
+ .set = usbd_set,
+};
+
+/*
* SPI clock
*/
static void spi_set(struct clk *clk, int enable)
@@ -284,6 +301,8 @@ struct clk *clk_get(struct device *dev, const char *id)
return &clk_ephy;
if (!strcmp(id, "usbh"))
return &clk_usbh;
+ if (!strcmp(id, "usbd"))
+ return &clk_usbd;
if (!strcmp(id, "spi"))
return &clk_spi;
if (!strcmp(id, "xtm"))
--
1.7.11.1
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 0/7] Prerequisites for BCM63XX UDC driver, Kevin Cernekee |
|---|---|
| Next by Date: | [PATCH 2/7] MIPS: BCM63XX: Move DMA descriptor definition into common header file, Kevin Cernekee |
| Previous by Thread: | [PATCH 0/7] Prerequisites for BCM63XX UDC driver, Kevin Cernekee |
| Next by Thread: | [PATCH 2/7] MIPS: BCM63XX: Move DMA descriptor definition into common header file, Kevin Cernekee |
| Indexes: | [Date] [Thread] [Top] [All Lists] |