diff options
author | jogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-05-19 18:32:13 +0000 |
---|---|---|
committer | jogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-05-19 18:32:13 +0000 |
commit | f6a2f33347da35ced5d08990c3bdc086c97b11c7 (patch) | |
tree | 1462b284b9bb6c1b3416a7de0ddd35dab51959c3 /target/linux/brcm63xx/patches-3.9/029-MIPS-BCM63XX-add-missing-clocks-for-BCM6328-and-BCM6.patch | |
parent | 2ce30d075aab8baa7aae7ac3d58e46690e02f282 (diff) |
bcm63xx: add 3.9 support
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36660 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm63xx/patches-3.9/029-MIPS-BCM63XX-add-missing-clocks-for-BCM6328-and-BCM6.patch')
-rw-r--r-- | target/linux/brcm63xx/patches-3.9/029-MIPS-BCM63XX-add-missing-clocks-for-BCM6328-and-BCM6.patch | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-3.9/029-MIPS-BCM63XX-add-missing-clocks-for-BCM6328-and-BCM6.patch b/target/linux/brcm63xx/patches-3.9/029-MIPS-BCM63XX-add-missing-clocks-for-BCM6328-and-BCM6.patch new file mode 100644 index 000000000..bc72a0035 --- /dev/null +++ b/target/linux/brcm63xx/patches-3.9/029-MIPS-BCM63XX-add-missing-clocks-for-BCM6328-and-BCM6.patch @@ -0,0 +1,91 @@ +From d31454bc822e1957e758e75d4367bcd12af89743 Mon Sep 17 00:00:00 2001 +From: Jonas Gorski <jogo@openwrt.org> +Date: Thu, 18 Apr 2013 21:23:11 +0200 +Subject: [PATCH] MIPS: BCM63XX: add missing clocks for BCM6328 and BCM6362 + +Add currently unused missing clocks for BCM6328 and BCM6362. + +Signed-off-by: Jonas Gorski <jogo@openwrt.org> +--- + arch/mips/bcm63xx/clk.c | 33 +++++++++++++++++++++++++-------- + 1 file changed, 25 insertions(+), 8 deletions(-) + +--- a/arch/mips/bcm63xx/clk.c ++++ b/arch/mips/bcm63xx/clk.c +@@ -125,11 +125,18 @@ static struct clk clk_ephy = { + */ + static void enetsw_set(struct clk *clk, int enable) + { +- if (!BCMCPU_IS_6368()) ++ 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); ++ else if (BCMCPU_IS_6368()) ++ bcm_hwclock_set(CKCTL_6368_ROBOSW_EN | ++ CKCTL_6368_SWPKT_USB_EN | ++ CKCTL_6368_SWPKT_SAR_EN, ++ enable); ++ else + return; +- bcm_hwclock_set(CKCTL_6368_ROBOSW_EN | +- CKCTL_6368_SWPKT_USB_EN | +- CKCTL_6368_SWPKT_SAR_EN, enable); ++ + if (enable) { + /* reset switch core afer clock change */ + bcm63xx_core_set_reset(BCM63XX_RESET_ENETSW, 1); +@@ -166,6 +173,8 @@ static void usbh_set(struct clk *clk, in + bcm_hwclock_set(CKCTL_6328_USBH_EN, enable); + else if (BCMCPU_IS_6348()) + bcm_hwclock_set(CKCTL_6348_USBH_EN, enable); ++ else if (BCMCPU_IS_6362()) ++ bcm_hwclock_set(CKCTL_6362_USBH_EN, enable); + else if (BCMCPU_IS_6368()) + bcm_hwclock_set(CKCTL_6368_USBH_EN, enable); + } +@@ -181,6 +190,8 @@ static void usbd_set(struct clk *clk, in + { + 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); + else if (BCMCPU_IS_6368()) + bcm_hwclock_set(CKCTL_6368_USBD_EN, enable); + } +@@ -244,7 +255,10 @@ static struct clk clk_xtm = { + */ + static void ipsec_set(struct clk *clk, int enable) + { +- bcm_hwclock_set(CKCTL_6368_IPSEC_EN, enable); ++ if (BCMCPU_IS_6362()) ++ bcm_hwclock_set(CKCTL_6362_IPSEC_EN, enable); ++ else if (BCMCPU_IS_6368()) ++ bcm_hwclock_set(CKCTL_6368_IPSEC_EN, enable); + } + + static struct clk clk_ipsec = { +@@ -257,7 +271,10 @@ static struct clk clk_ipsec = { + + static void pcie_set(struct clk *clk, int enable) + { +- bcm_hwclock_set(CKCTL_6328_PCIE_EN, enable); ++ if (BCMCPU_IS_6328()) ++ bcm_hwclock_set(CKCTL_6328_PCIE_EN, enable); ++ else if (BCMCPU_IS_6362()) ++ bcm_hwclock_set(CKCTL_6362_PCIE_EN, enable); + } + + static struct clk clk_pcie = { +@@ -323,9 +340,9 @@ struct clk *clk_get(struct device *dev, + return &clk_periph; + if (BCMCPU_IS_6358() && !strcmp(id, "pcm")) + return &clk_pcm; +- if (BCMCPU_IS_6368() && !strcmp(id, "ipsec")) ++ if ((BCMCPU_IS_6362() || BCMCPU_IS_6368()) && !strcmp(id, "ipsec")) + return &clk_ipsec; +- if (BCMCPU_IS_6328() && !strcmp(id, "pcie")) ++ if ((BCMCPU_IS_6328() || BCMCPU_IS_6362()) && !strcmp(id, "pcie")) + return &clk_pcie; + return ERR_PTR(-ENOENT); + } |