summaryrefslogtreecommitdiff
path: root/target/linux/brcm63xx
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2014-02-22 11:16:44 +0000
committerJonas Gorski <jogo@openwrt.org>2014-02-22 11:16:44 +0000
commit60edb75e47927fa58df79ace6e76b8a4977cbd85 (patch)
treefb8cca0adea34563d2a7606a9da5a9cf9ae2076e /target/linux/brcm63xx
parentedbfb81b56805c77242855f7b4be6f7fbe77c2a4 (diff)
downloadmtk-20170518-60edb75e47927fa58df79ace6e76b8a4977cbd85.zip
mtk-20170518-60edb75e47927fa58df79ace6e76b8a4977cbd85.tar.gz
mtk-20170518-60edb75e47927fa58df79ace6e76b8a4977cbd85.tar.bz2
brcm63xx: fix number of switch ports for BCM63168/63268
BCM63168 has 6 ports (3 FE PHY, 1 GE PHY, two RGMII) and BCM63268 has two additional RGMII ports, making it 8. Fix this by checking the chip variant and applying an appropriate limit. Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 39677
Diffstat (limited to 'target/linux/brcm63xx')
-rw-r--r--target/linux/brcm63xx/patches-3.10/339-MIPS-BCM63XX-add-support-for-BCM63268.patch12
-rw-r--r--target/linux/brcm63xx/patches-3.10/341-MIPS-BCM63XX-add-support-for-BCM6318.patch4
2 files changed, 10 insertions, 6 deletions
diff --git a/target/linux/brcm63xx/patches-3.10/339-MIPS-BCM63XX-add-support-for-BCM63268.patch b/target/linux/brcm63xx/patches-3.10/339-MIPS-BCM63XX-add-support-for-BCM63268.patch
index 2245c2e..45eec07 100644
--- a/target/linux/brcm63xx/patches-3.10/339-MIPS-BCM63XX-add-support-for-BCM63268.patch
+++ b/target/linux/brcm63xx/patches-3.10/339-MIPS-BCM63XX-add-support-for-BCM63268.patch
@@ -744,11 +744,15 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
return -ENODEV;
ret = register_shared();
-@@ -297,6 +299,8 @@ bcm63xx_enetsw_register(const struct bcm
+@@ -295,8 +297,11 @@ bcm63xx_enetsw_register(const struct bcm
+
+ if (BCMCPU_IS_6328())
enetsw_pd.num_ports = ENETSW_PORTS_6328;
- else if (BCMCPU_IS_6362() || BCMCPU_IS_6368())
+- else if (BCMCPU_IS_6362() || BCMCPU_IS_6368())
++ else if (BCMCPU_IS_6362() || BCMCPU_IS_6368() ||
++ BCMCPU_VARIANT_IS_63168() || BCMCPU_VARIANT_IS_63169())
enetsw_pd.num_ports = ENETSW_PORTS_6368;
-+ else if (BCMCPU_IS_63268())
++ else if (BCMCPU_VARIANT_IS_63268() || BCMCPU_VARIANT_IS_63269())
+ enetsw_pd.num_ports = ENETSW_PORTS_63268;
enetsw_pd.dma_has_sram = true;
@@ -759,7 +763,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
#define ENETSW_MAX_PORT 8
#define ENETSW_PORTS_6328 5 /* 4 FE PHY + 1 RGMII */
#define ENETSW_PORTS_6368 6 /* 4 FE PHY + 2 RGMII */
-+#define ENETSW_PORTS_63268 4 /* 3 FE PHY + 1 RGMII */
++#define ENETSW_PORTS_63268 8 /* 3 FE PHY + 1 GE PHY + 4 RGMII */
#define ENETSW_RGMII_PORT0 4
diff --git a/target/linux/brcm63xx/patches-3.10/341-MIPS-BCM63XX-add-support-for-BCM6318.patch b/target/linux/brcm63xx/patches-3.10/341-MIPS-BCM63XX-add-support-for-BCM6318.patch
index abfc17c..46aea36 100644
--- a/target/linux/brcm63xx/patches-3.10/341-MIPS-BCM63XX-add-support-for-BCM6318.patch
+++ b/target/linux/brcm63xx/patches-3.10/341-MIPS-BCM63XX-add-support-for-BCM6318.patch
@@ -644,8 +644,8 @@ Subject: [PATCH 51/53] MIPS: BCM63XX: add support for BCM6318
- if (BCMCPU_IS_6328())
+ if (BCMCPU_IS_6318() || BCMCPU_IS_6328())
enetsw_pd.num_ports = ENETSW_PORTS_6328;
- else if (BCMCPU_IS_6362() || BCMCPU_IS_6368())
- enetsw_pd.num_ports = ENETSW_PORTS_6368;
+ else if (BCMCPU_IS_6362() || BCMCPU_IS_6368() ||
+ BCMCPU_VARIANT_IS_63168() || BCMCPU_VARIANT_IS_63169())
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
@@ -9,6 +9,8 @@ int __init bcm63xx_gpio_init(void);