summaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files/arch/mips
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-08-15 14:11:43 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-08-15 14:11:43 +0000
commit8b59aa77866ae84e0026d422c20d802bb2145558 (patch)
tree68ac32a88406812f317e374c550940bef76faa63 /target/linux/ramips/files/arch/mips
parentce883e3127c1c0fa86d0a061ffa63b30fedcc020 (diff)
ramips: allow to specify port layout for the switch of the RT305x/RT3350
Based on a patch by Roman Yeryomin <roman@advem.lv> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27990 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/files/arch/mips')
-rw-r--r--target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x_esw_platform.h7
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/mach-dir-300-revb.c1
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/mach-f5d8235-v2.c1
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/mach-fonera20n.c1
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/mach-hw550-3g.c1
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/mach-mofi3500-3gn.c1
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/mach-nw718.c1
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/mach-pwh2004.c1
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/mach-rt-g32-revb.c1
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/mach-v22rw-2x2.c1
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/mach-wcr150gn.c1
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt305x/mach-whr-g300n.c1
12 files changed, 18 insertions, 0 deletions
diff --git a/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x_esw_platform.h b/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x_esw_platform.h
index fd1f6eb19..97ee375eb 100644
--- a/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x_esw_platform.h
+++ b/target/linux/ramips/files/arch/mips/include/asm/mach-ralink/rt305x_esw_platform.h
@@ -11,8 +11,15 @@
#ifndef _RT305X_ESW_PLATFORM_H
#define _RT305X_ESW_PLATFORM_H
+enum {
+ RT305X_ESW_VLAN_CONFIG_NONE = 0,
+ RT305X_ESW_VLAN_CONFIG_LLLLW,
+ RT305X_ESW_VLAN_CONFIG_WLLLL,
+};
+
struct rt305x_esw_platform_data
{
+ u8 vlan_config;
};
#endif /* _RT305X_ESW_PLATFORM_H */
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-dir-300-revb.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-dir-300-revb.c
index 71b9c51fa..622803672 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-dir-300-revb.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-dir-300-revb.c
@@ -110,6 +110,7 @@ static void __init dir_300b_init(void)
rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
rt305x_register_flash(0, &dir_300b_flash_data);
+ rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
rt305x_register_ethernet();
ramips_register_gpio_leds(-1, ARRAY_SIZE(dir_300b_leds_gpio),
dir_300b_leds_gpio);
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-f5d8235-v2.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-f5d8235-v2.c
index b4062818e..7e218f7bd 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-f5d8235-v2.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-f5d8235-v2.c
@@ -132,6 +132,7 @@ static void __init f5d8235v2_init(void)
rt305x_register_flash(0, &f5d8235v2_flash_data);
ramips_register_gpio_leds(-1, ARRAY_SIZE(f5d8235v2_leds_gpio),
f5d8235v2_leds_gpio);
+ rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_NONE;
rt305x_register_ethernet();
platform_device_register(&f5d8235v2_switch);
rt305x_register_wifi();
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-fonera20n.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-fonera20n.c
index bbf152fa8..544279509 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-fonera20n.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-fonera20n.c
@@ -118,6 +118,7 @@ static void __init fonera20n_init(void)
ARRAY_SIZE(fonera20n_gpio_buttons),
fonera20n_gpio_buttons);
+ rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
rt305x_register_ethernet();
rt305x_register_wifi();
rt305x_register_wdt();
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-hw550-3g.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-hw550-3g.c
index c1023e001..77e068233 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-hw550-3g.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-hw550-3g.c
@@ -127,6 +127,7 @@ static void __init hw550_3g_init(void)
rt305x_gpio_init(HW550_3G_GPIO_MODE);
rt305x_register_flash(0, &hw550_3g_flash_data);
+ rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
rt305x_register_ethernet();
ramips_register_gpio_leds(-1, ARRAY_SIZE(hw550_3g_leds_gpio),
hw550_3g_leds_gpio);
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-mofi3500-3gn.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-mofi3500-3gn.c
index 8e34ad0bc..16b109fd1 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-mofi3500-3gn.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-mofi3500-3gn.c
@@ -127,6 +127,7 @@ static void __init mofi3500_3gn_init(void)
rt305x_gpio_init(MOFI3500_3GN_GPIO_MODE);
rt305x_register_flash(0, &mofi3500_3gn_flash_data);
+ rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
rt305x_register_ethernet();
ramips_register_gpio_leds(-1, ARRAY_SIZE(mofi3500_3gn_leds_gpio),
mofi3500_3gn_leds_gpio);
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-nw718.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-nw718.c
index 09f6dc485..7107a8c50 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-nw718.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-nw718.c
@@ -129,6 +129,7 @@ static void __init nw718_init(void)
rt305x_gpio_init(RT305X_GPIO_MODE_I2C |
RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
+ rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
rt305x_register_ethernet();
ramips_register_gpio_leds(-1, ARRAY_SIZE(nw718_leds_gpio),
nw718_leds_gpio);
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-pwh2004.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-pwh2004.c
index 03dc19221..c321e1108 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-pwh2004.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-pwh2004.c
@@ -95,6 +95,7 @@ static void __init pwh2004_init(void)
ramips_register_gpio_buttons(-1, PWH2004_BUTTONS_POLL_INTERVAL,
ARRAY_SIZE(pwh2004_gpio_buttons),
pwh2004_gpio_buttons);
+ rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
rt305x_register_ethernet();
rt305x_register_wifi();
rt305x_register_wdt();
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-rt-g32-revb.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-rt-g32-revb.c
index 8273c5ae3..274466c21 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-rt-g32-revb.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-rt-g32-revb.c
@@ -103,6 +103,7 @@ static void __init rt_g32b_init(void)
rt305x_register_spi(rt_g32b_spi_slave_info,
ARRAY_SIZE(rt_g32b_spi_slave_info));
+ rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
rt305x_register_ethernet();
ramips_register_gpio_buttons(-1, RT_G32B_BUTTONS_POLL_INTERVAL,
ARRAY_SIZE(rt_g32b_gpio_buttons),
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-v22rw-2x2.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-v22rw-2x2.c
index 382da755f..b5883bb99 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-v22rw-2x2.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-v22rw-2x2.c
@@ -104,6 +104,7 @@ static void __init v22rw_2x2_init(void)
rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
rt305x_register_flash(0, &v22rw_2x2_flash_data);
+ rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
rt305x_register_ethernet();
ramips_register_gpio_leds(-1, ARRAY_SIZE(v22rw_2x2_leds_gpio),
v22rw_2x2_leds_gpio);
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-wcr150gn.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-wcr150gn.c
index babaa710a..984bab7b8 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-wcr150gn.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-wcr150gn.c
@@ -60,6 +60,7 @@ static void __init wcr150gn_init(void)
{
rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
rt305x_register_flash(0, &wcr150gn_flash_data);
+ rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
rt305x_register_ethernet();
rt305x_register_wifi();
rt305x_register_wdt();
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-whr-g300n.c b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-whr-g300n.c
index 631313588..49ab0fd00 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-whr-g300n.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt305x/mach-whr-g300n.c
@@ -130,6 +130,7 @@ static void __init whr_g300n_init(void)
rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
rt305x_register_flash(0, &whr_g300n_flash_data);
+ rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
rt305x_register_ethernet();
ramips_register_gpio_leds(-1, ARRAY_SIZE(whr_g300n_leds_gpio),
whr_g300n_leds_gpio);