diff options
author | Florian Fainelli <florian@openwrt.org> | 2014-01-14 05:23:39 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2014-01-14 05:23:39 +0000 |
commit | b3476a2a8932a379accc9a3a5b5b73a787985c2f (patch) | |
tree | 83d80fba2e123c1094d65ffdc5bd55c6c3b08c45 /target/linux/brcm63xx/patches-3.10/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch | |
parent | cbbb8fc7ce3551b45aa35a8d43bfa0ebd05f2aef (diff) | |
download | upstream-b3476a2a8932a379accc9a3a5b5b73a787985c2f.tar.gz upstream-b3476a2a8932a379accc9a3a5b5b73a787985c2f.tar.bz2 upstream-b3476a2a8932a379accc9a3a5b5b73a787985c2f.zip |
brcm63xx: improve BCM6318 support
Provide clock toggling for the USB host and slave controller as well as
for the Ethernet Switch. The bcm63xx_enetsw driver is changed not to use
request_mem_region() as the Roboswitch register overlaps with the
Roboswitch IUDMA channels, hence making the driver return -EBUSY. A
future fix might be to use variable size RSET_ENETSW sizes depending on
the chip we are targetting.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39282 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm63xx/patches-3.10/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch')
-rw-r--r-- | target/linux/brcm63xx/patches-3.10/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-3.10/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch b/target/linux/brcm63xx/patches-3.10/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch new file mode 100644 index 0000000000..8876f26cbe --- /dev/null +++ b/target/linux/brcm63xx/patches-3.10/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch @@ -0,0 +1,50 @@ +--- a/arch/mips/bcm63xx/clk.c ++++ b/arch/mips/bcm63xx/clk.c +@@ -136,7 +136,11 @@ static struct clk clk_ephy = { + */ + static void enetsw_set(struct clk *clk, int enable) + { +- if (BCMCPU_IS_6328()) ++ if (BCMCPU_IS_6318()) { ++ bcm_hwclock_set(CKCTL_6318_ROBOSW250_EN | ++ CKCTL_6318_ROBOSW025_EN, enable); ++ bcm_ub_hwclock_set(UB_CKCTL_6318_ROBOSW_EN, enable); ++ } else if (BCMCPU_IS_6328()) + bcm_hwclock_set(CKCTL_6328_ROBOSW_EN, enable); + else if (BCMCPU_IS_6362()) + bcm_hwclock_set(CKCTL_6362_ROBOSW_EN, enable); +@@ -179,11 +183,22 @@ static struct clk clk_pcm = { + }; + + /* ++ * 6318 USB host & slave clock ++ */ ++static void bcm_6318_usb_clock_set(int enable) ++{ ++ bcm_hwclock_set(CKCTL_6318_USB_EN, enable); ++ bcm_ub_hwclock_set(UB_CKCTL_6318_USB_EN, enable); ++} ++ ++/* + * USB host clock + */ + static void usbh_set(struct clk *clk, int enable) + { +- if (BCMCPU_IS_6328()) ++ if (BCMCPU_IS_6318()) ++ bcm_6318_usb_clock_set(enable); ++ else 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); +@@ -209,7 +224,9 @@ static struct clk clk_usbh = { + */ + static void usbd_set(struct clk *clk, int enable) + { +- if (BCMCPU_IS_6328()) ++ if (BCMCPU_IS_6318()) ++ bcm_6318_usb_clock_set(enable); ++ else if (BCMCPU_IS_6328()) + bcm_hwclock_set(CKCTL_6328_USBD_EN, enable); + else if (BCMCPU_IS_6362()) + bcm_hwclock_set(CKCTL_6362_USBD_EN, enable); |