aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/bcm63xx/clk.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/bcm63xx/clk.c')
-rw-r--r--arch/mips/bcm63xx/clk.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c
index 1db48adb543a..dff79ab6005e 100644
--- a/arch/mips/bcm63xx/clk.c
+++ b/arch/mips/bcm63xx/clk.c
@@ -160,7 +160,9 @@ static struct clk clk_pcm = {
160 */ 160 */
161static void usbh_set(struct clk *clk, int enable) 161static void usbh_set(struct clk *clk, int enable)
162{ 162{
163 if (BCMCPU_IS_6348()) 163 if (BCMCPU_IS_6328())
164 bcm_hwclock_set(CKCTL_6328_USBH_EN, enable);
165 else if (BCMCPU_IS_6348())
164 bcm_hwclock_set(CKCTL_6348_USBH_EN, enable); 166 bcm_hwclock_set(CKCTL_6348_USBH_EN, enable);
165 else if (BCMCPU_IS_6368()) 167 else if (BCMCPU_IS_6368())
166 bcm_hwclock_set(CKCTL_6368_USBH_EN, enable); 168 bcm_hwclock_set(CKCTL_6368_USBH_EN, enable);
@@ -171,6 +173,21 @@ static struct clk clk_usbh = {
171}; 173};
172 174
173/* 175/*
176 * USB device clock
177 */
178static void usbd_set(struct clk *clk, int enable)
179{
180 if (BCMCPU_IS_6328())
181 bcm_hwclock_set(CKCTL_6328_USBD_EN, enable);
182 else if (BCMCPU_IS_6368())
183 bcm_hwclock_set(CKCTL_6368_USBD_EN, enable);
184}
185
186static struct clk clk_usbd = {
187 .set = usbd_set,
188};
189
190/*
174 * SPI clock 191 * SPI clock
175 */ 192 */
176static void spi_set(struct clk *clk, int enable) 193static void spi_set(struct clk *clk, int enable)
@@ -284,6 +301,8 @@ struct clk *clk_get(struct device *dev, const char *id)
284 return &clk_ephy; 301 return &clk_ephy;
285 if (!strcmp(id, "usbh")) 302 if (!strcmp(id, "usbh"))
286 return &clk_usbh; 303 return &clk_usbh;
304 if (!strcmp(id, "usbd"))
305 return &clk_usbd;
287 if (!strcmp(id, "spi")) 306 if (!strcmp(id, "spi"))
288 return &clk_spi; 307 return &clk_spi;
289 if (!strcmp(id, "xtm")) 308 if (!strcmp(id, "xtm"))