diff options
author | Kevin Cernekee <cernekee@gmail.com> | 2012-06-23 00:14:51 -0400 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2012-08-30 14:15:52 -0400 |
commit | dd89d60c032ab05720f745bf8c39d09512a77043 (patch) | |
tree | fccae818074eaa4a3c2faff9c02e475412defb6f /arch/mips | |
parent | fea7a08acb13524b47711625eebea40a0ede69a0 (diff) |
MIPS: BCM63XX: Expose the USBH/USBD clocks on BCM6328/BCM6368
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Patchwork: http://patchwork.linux-mips.org/patch/4022/
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/bcm63xx/clk.c | 21 |
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 | */ |
161 | static void usbh_set(struct clk *clk, int enable) | 161 | static 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 | */ | ||
178 | static 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 | |||
186 | static struct clk clk_usbd = { | ||
187 | .set = usbd_set, | ||
188 | }; | ||
189 | |||
190 | /* | ||
174 | * SPI clock | 191 | * SPI clock |
175 | */ | 192 | */ |
176 | static void spi_set(struct clk *clk, int enable) | 193 | static 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")) |