diff options
author | jogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-07-31 14:27:42 +0000 |
---|---|---|
committer | jogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-07-31 14:27:42 +0000 |
commit | 43ec5beeff9582f4656b1b4f15bd66a6bc1ccd77 (patch) | |
tree | 0af788fcc5a95fe2e5c1e6dfb8db6474b475f121 /target/linux/brcm63xx/patches-3.3/442-MIPS-BCM63XX-enable-enetsw-for-BCM6362.patch | |
parent | 5292fd0ba0dc4f606b81d8a671a63d50ed80a0df (diff) |
bcm63xx: add basic bcm6362 support
Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32923 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm63xx/patches-3.3/442-MIPS-BCM63XX-enable-enetsw-for-BCM6362.patch')
-rw-r--r-- | target/linux/brcm63xx/patches-3.3/442-MIPS-BCM63XX-enable-enetsw-for-BCM6362.patch | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-3.3/442-MIPS-BCM63XX-enable-enetsw-for-BCM6362.patch b/target/linux/brcm63xx/patches-3.3/442-MIPS-BCM63XX-enable-enetsw-for-BCM6362.patch new file mode 100644 index 0000000000..ae46ec4061 --- /dev/null +++ b/target/linux/brcm63xx/patches-3.3/442-MIPS-BCM63XX-enable-enetsw-for-BCM6362.patch @@ -0,0 +1,77 @@ +From bf9d506bd144b95f8bb4127350ab2db5fba9c12e Mon Sep 17 00:00:00 2001 +From: Jonas Gorski <jonas.gorski@gmail.com> +Date: Sun, 8 Jul 2012 21:07:12 +0200 +Subject: [PATCH 60/84] MIPS: BCM63XX: enable enetsw for BCM6362 + +--- + arch/mips/bcm63xx/clk.c | 7 ++++++- + arch/mips/bcm63xx/dev-enet.c | 6 ++++-- + .../include/asm/mach-bcm63xx/bcm63xx_dev_enet.h | 1 + + 3 files changed, 11 insertions(+), 3 deletions(-) + +--- a/arch/mips/bcm63xx/clk.c ++++ b/arch/mips/bcm63xx/clk.c +@@ -120,11 +120,13 @@ static void enetsw_set(struct clk *clk, + { + u32 mask; + +- if (!BCMCPU_IS_6328() && !BCMCPU_IS_6368()) ++ if (!BCMCPU_IS_6328() && !BCMCPU_IS_6362() && !BCMCPU_IS_6368()) + return; + + if (BCMCPU_IS_6328()) + mask = CKCTL_6328_ROBOSW_EN; ++ else if (BCMCPU_IS_6362()) ++ mask = CKCTL_6362_ROBOSW_EN; + else + mask = CKCTL_6368_ROBOSW_EN | CKCTL_6368_SWPKT_USB_EN | + CKCTL_6368_SWPKT_SAR_EN; +@@ -137,6 +139,9 @@ static void enetsw_set(struct clk *clk, + if (BCMCPU_IS_6328()) { + reg = PERF_SOFTRESET_6328_REG; + mask = SOFTRESET_6328_ENETSW_MASK; ++ } else if (BCMCPU_IS_6362()) { ++ reg = PERF_SOFTRESET_6362_REG; ++ mask = SOFTRESET_6362_ENETSW_MASK; + } else { + reg = PERF_SOFTRESET_6368_REG; + mask = SOFTRESET_6368_ENETSW_MASK; +--- a/arch/mips/bcm63xx/dev-enet.c ++++ b/arch/mips/bcm63xx/dev-enet.c +@@ -141,7 +141,7 @@ static int __init register_shared(void) + shared_res[0].end = shared_res[0].start; + shared_res[0].end += (RSET_ENETDMA_SIZE) - 1; + +- if (BCMCPU_IS_6328() || BCMCPU_IS_6368()) ++ if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_6368()) + chan_count = 32; + else + chan_count = 16; +@@ -224,7 +224,7 @@ bcm63xx_enetsw_register(const struct bcm + { + int ret; + +- if (!BCMCPU_IS_6328() && !BCMCPU_IS_6368()) ++ if (!BCMCPU_IS_6328() && !BCMCPU_IS_6362() && !BCMCPU_IS_6368()) + return -ENODEV; + + ret = register_shared(); +@@ -243,6 +243,8 @@ bcm63xx_enetsw_register(const struct bcm + + if (BCMCPU_IS_6328()) + enetsw_pd.num_ports = ENETSW_PORTS_6328; ++ else if (BCMCPU_IS_6362()) ++ enetsw_pd.num_ports = ENETSW_PORTS_6362; + else if (BCMCPU_IS_6368()) + enetsw_pd.num_ports = ENETSW_PORTS_6368; + +--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h ++++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h +@@ -44,6 +44,7 @@ struct bcm63xx_enet_platform_data { + */ + #define ENETSW_MAX_PORT 6 + #define ENETSW_PORTS_6328 5 /* 4 FE PHY + 1 RGMII */ ++#define ENETSW_PORTS_6362 6 /* 4 FE PHY + 2 RGMII */ + #define ENETSW_PORTS_6368 6 /* 4 FE PHY + 2 RGMII */ + + #define ENETSW_RGMII_PORT0 4 |