1 --- a/arch/mips/bcm63xx/clk.c
2 +++ b/arch/mips/bcm63xx/clk.c
3 @@ -136,7 +136,11 @@ static struct clk clk_ephy = {
5 static void enetsw_set(struct clk *clk, int enable)
7 - if (BCMCPU_IS_6328())
8 + if (BCMCPU_IS_6318()) {
9 + bcm_hwclock_set(CKCTL_6318_ROBOSW250_EN |
10 + CKCTL_6318_ROBOSW025_EN, enable);
11 + bcm_ub_hwclock_set(UB_CKCTL_6318_ROBOSW_EN, enable);
12 + } else if (BCMCPU_IS_6328())
13 bcm_hwclock_set(CKCTL_6328_ROBOSW_EN, enable);
14 else if (BCMCPU_IS_6362())
15 bcm_hwclock_set(CKCTL_6362_ROBOSW_EN, enable);
16 @@ -183,18 +187,22 @@ static struct clk clk_pcm = {
18 static void usbh_set(struct clk *clk, int enable)
20 - if (BCMCPU_IS_6328())
21 + if (BCMCPU_IS_6318()) {
22 + bcm_hwclock_set(CKCTL_6318_USB_EN, enable);
23 + bcm_ub_hwclock_set(UB_CKCTL_6318_USB_EN, enable);
24 + } else if (BCMCPU_IS_6328()) {
25 bcm_hwclock_set(CKCTL_6328_USBH_EN, enable);
26 - else if (BCMCPU_IS_6348())
27 + } else if (BCMCPU_IS_6348()) {
28 bcm_hwclock_set(CKCTL_6348_USBH_EN, enable);
29 - else if (BCMCPU_IS_6362())
30 + } else if (BCMCPU_IS_6362()) {
31 bcm_hwclock_set(CKCTL_6362_USBH_EN, enable);
32 - else if (BCMCPU_IS_6368())
33 + } else if (BCMCPU_IS_6368()) {
34 bcm_hwclock_set(CKCTL_6368_USBH_EN, enable);
35 - else if (BCMCPU_IS_63268())
36 + } else if (BCMCPU_IS_63268()) {
37 bcm_hwclock_set(CKCTL_63268_USBH_EN, enable);
45 @@ -393,9 +401,9 @@ struct clk *clk_get(struct device *dev,
47 if (!strcmp(id, "ephy"))
49 - if (!strcmp(id, "usbh"))
50 + if (!strcmp(id, "usbh") || (BCMCPU_IS_6318() && !strcmp(id, "usbd")))
52 - if (!strcmp(id, "usbd"))
53 + if (!strcmp(id, "usbd") && !BCMCPU_IS_6318())
55 if (!strcmp(id, "spi"))