ath79: ar7242: Update dts for current ag71xx driver
[oweals/openwrt.git] / target / linux / brcm63xx / patches-4.9 / 346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch
1 --- a/arch/mips/bcm63xx/clk.c
2 +++ b/arch/mips/bcm63xx/clk.c
3 @@ -167,7 +167,11 @@ static struct clk clk_swpkt_usb = {
4   */
5  static void enetsw_set(struct clk *clk, int enable)
6  {
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 @@ -219,18 +223,22 @@ static struct clk clk_pcm = {
17   */
18  static void usbh_set(struct clk *clk, int enable)
19  {
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);
38 -       else
39 +       } else {
40                 return;
41 +       }
42  
43         if (enable)
44                 msleep(100);