summaryrefslogtreecommitdiff
path: root/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-08-01 16:54:51 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-08-01 16:54:51 +0000
commita5e3f9b1977f4bfe24df52c2522549f911642d27 (patch)
tree4915a59a39e11d33a16df3809457bb172ee3ece7 /target/linux/adm5120-2.6/files/arch/mips/adm5120/boards
parentcb8ec9bac26e6c9f4aaa09a1fa5f25660e43a7ee (diff)
[adm5120] add support for board specific vlan matrix, should fix #2132
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8309 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/adm5120-2.6/files/arch/mips/adm5120/boards')
-rw-r--r--target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/cellvision.c12
-rw-r--r--target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/compex.c36
-rw-r--r--target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/edimax.c7
-rw-r--r--target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/generic.c2
-rw-r--r--target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/infineon.c8
-rw-r--r--target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/mikrotik.c35
-rw-r--r--target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/zyxel.c20
7 files changed, 95 insertions, 25 deletions
diff --git a/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/cellvision.c b/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/cellvision.c
index fa82b93a11..40e2acfbc7 100644
--- a/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/cellvision.c
+++ b/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/cellvision.c
@@ -128,7 +128,7 @@ static struct adm5120_board cas630_board __initdata = {
.mach_type = MACH_ADM5120_CAS630,
.name = "Cellvision CAS-630/630W",
.board_setup = cas6xx_setup,
- .num_eth_ports = 1,
+ .eth_num_ports = 1,
.num_devices = ARRAY_SIZE(cas6xx_devices),
.devices = cas6xx_devices,
};
@@ -137,7 +137,7 @@ static struct adm5120_board cas670_board __initdata = {
.mach_type = MACH_ADM5120_CAS670,
.name = "Cellvision CAS-670/670W",
.board_setup = cas6xx_setup,
- .num_eth_ports = 1,
+ .eth_num_ports = 1,
.num_devices = ARRAY_SIZE(cas6xx_devices),
.devices = cas6xx_devices,
};
@@ -146,7 +146,7 @@ static struct adm5120_board cas700_board __initdata = {
.mach_type = MACH_ADM5120_CAS700,
.name = "Cellvision CAS-700/700W",
.board_setup = cas7xx_setup,
- .num_eth_ports = 1,
+ .eth_num_ports = 1,
.num_devices = ARRAY_SIZE(cas7xx_devices),
.devices = cas7xx_devices,
};
@@ -155,7 +155,7 @@ static struct adm5120_board cas771_board __initdata = {
.mach_type = MACH_ADM5120_CAS771,
.name = "Cellvision CAS-771/771W",
.board_setup = cas7xx_setup,
- .num_eth_ports = 1,
+ .eth_num_ports = 1,
.num_devices = ARRAY_SIZE(cas7xx_devices),
.devices = cas7xx_devices,
};
@@ -164,7 +164,7 @@ static struct adm5120_board cas790_board __initdata = {
.mach_type = MACH_ADM5120_CAS790,
.name = "Cellvision CAS-790",
.board_setup = cas7xx_setup,
- .num_eth_ports = 1,
+ .eth_num_ports = 1,
.num_devices = ARRAY_SIZE(cas7xx_devices),
.devices = cas7xx_devices,
};
@@ -173,7 +173,7 @@ static struct adm5120_board cas861_board __initdata = {
.mach_type = MACH_ADM5120_CAS861,
.name = "Cellvision CAS-861/861W",
.board_setup = cas7xx_setup,
- .num_eth_ports = 1,
+ .eth_num_ports = 1,
.num_devices = ARRAY_SIZE(cas7xx_devices),
.devices = cas7xx_devices,
};
diff --git a/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/compex.c b/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/compex.c
index 7a48cb04c5..a59e08f434 100644
--- a/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/compex.c
+++ b/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/compex.c
@@ -117,11 +117,27 @@ static void __init wp54_wrt_setup(void)
/* TODO: setup mac address */
}
+unsigned char np27g_vlans[6] __initdata = {
+ /* FIXME: untested */
+ 0x41, 0x42, 0x44, 0x48, 0x50, 0x00
+};
+
+unsigned char np28g_vlans[6] __initdata = {
+ /* FIXME: untested */
+ 0x41, 0x42, 0x44, 0x48, 0x00, 0x00
+};
+
+unsigned char wp54_vlans[6] __initdata = {
+ /* FIXME: untested */
+ 0x41, 0x42, 0x00, 0x00, 0x00, 0x00
+};
+
static struct adm5120_board np27g_board __initdata = {
.mach_type = MACH_ADM5120_NP27G,
.name = "Compex NetPassage 27G",
.board_setup = np2xg_setup,
- .num_eth_ports = 4,
+ .eth_num_ports = 5,
+ .eth_vlans = np27g_vlans,
.num_devices = ARRAY_SIZE(np2xg_devices),
.devices = np2xg_devices,
};
@@ -130,7 +146,8 @@ static struct adm5120_board np28g_board __initdata = {
.mach_type = MACH_ADM5120_NP28G,
.name = "Compex NetPassage 28G",
.board_setup = np2xg_setup,
- .num_eth_ports = 3,
+ .eth_num_ports = 4,
+ .eth_vlans = np28g_vlans,
.num_devices = ARRAY_SIZE(np2xg_devices),
.devices = np2xg_devices,
};
@@ -140,7 +157,8 @@ static struct adm5120_board wp54ag_board __initdata = {
.name = "Compex WP54AG",
.board_setup = wp54_setup,
.board_reset = wp54_reset,
- .num_eth_ports = 2,
+ .eth_num_ports = 2,
+ .eth_vlans = wp54_vlans,
.num_devices = ARRAY_SIZE(wp54_devices),
.devices = wp54_devices,
};
@@ -150,7 +168,8 @@ static struct adm5120_board wp54g_board __initdata = {
.name = "Compex WP54G",
.board_setup = wp54_setup,
.board_reset = wp54_reset,
- .num_eth_ports = 2,
+ .eth_num_ports = 2,
+ .eth_vlans = wp54_vlans,
.num_devices = ARRAY_SIZE(wp54_devices),
.devices = wp54_devices,
};
@@ -160,7 +179,8 @@ static struct adm5120_board wp54g_wrt_board __initdata = {
.name = "Compex WP54G-WRT",
.board_setup = wp54_wrt_setup,
.board_reset = wp54_reset,
- .num_eth_ports = 2,
+ .eth_num_ports = 2,
+ .eth_vlans = wp54_vlans,
.num_devices = ARRAY_SIZE(wp54_devices),
.devices = wp54_devices,
};
@@ -170,7 +190,8 @@ static struct adm5120_board wpp54ag_board __initdata = {
.name = "Compex WPP54AG",
.board_setup = wp54_setup,
.board_reset = wp54_reset,
- .num_eth_ports = 2,
+ .eth_num_ports = 2,
+ .eth_vlans = wp54_vlans,
.num_devices = ARRAY_SIZE(wp54_devices),
.devices = wp54_devices,
};
@@ -180,7 +201,8 @@ static struct adm5120_board wpp54g_board __initdata = {
.name = "Compex WPP54G",
.board_setup = wp54_setup,
.board_reset = wp54_reset,
- .num_eth_ports = 2,
+ .eth_num_ports = 2,
+ .eth_vlans = wp54_vlans,
.num_devices = ARRAY_SIZE(wp54_devices),
.devices = wp54_devices,
};
diff --git a/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/edimax.c b/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/edimax.c
index f39d5c763d..30efdf553d 100644
--- a/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/edimax.c
+++ b/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/edimax.c
@@ -61,11 +61,16 @@ static void __init br6104k_setup(void) {
/* TODO: setup mac addresses, if possible */
}
+unsigned char br6104k_vlans[6] = {
+ 0x41, 0x42, 0x44, 0x48, 0x50, 0x00
+};
+
static struct adm5120_board br6104k_board __initdata = {
.mach_type = MACH_ADM5120_BR6104K,
.name = "Edimax BR-6104K",
.board_setup = br6104k_setup,
- .num_eth_ports = 5,
+ .eth_num_ports = 5,
+ .eth_vlans = br6104k_vlans,
.num_devices = ARRAY_SIZE(br6104k_devices),
.devices = br6104k_devices,
};
diff --git a/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/generic.c b/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/generic.c
index 8d795a8816..78a8f557b5 100644
--- a/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/generic.c
+++ b/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/generic.c
@@ -39,7 +39,7 @@ static struct platform_device *generic_devices[] __initdata = {
static struct adm5120_board generic_board __initdata = {
.mach_type = MACH_ADM5120_GENERIC,
.name = "Generic ADM5120 board",
- .num_eth_ports = 6,
+ .eth_num_ports = 6,
.num_devices = ARRAY_SIZE(generic_devices),
.devices = generic_devices,
};
diff --git a/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/infineon.c b/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/infineon.c
index e1426cca9d..6873ac0b4e 100644
--- a/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/infineon.c
+++ b/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/infineon.c
@@ -123,7 +123,7 @@ static struct adm5120_board easy5120pata_board __initdata = {
.mach_type = MACH_ADM5120_EASY5120PATA,
.name = "Infineon EASY 5120P-ATA Reference Board",
.board_setup = easy_setup_pqfp,
- .num_eth_ports = 6,
+ .eth_num_ports = 6,
.num_devices = ARRAY_SIZE(easy5120pata_devices),
.devices = easy5120pata_devices,
};
@@ -132,7 +132,7 @@ static struct adm5120_board easy5120rt_board __initdata = {
.mach_type = MACH_ADM5120_EASY5120RT,
.name = "Infineon EASY 5120-RT Reference Board",
.board_setup = easy_setup_bga,
- .num_eth_ports = 5,
+ .eth_num_ports = 5,
.num_devices = ARRAY_SIZE(easy5120rt_devices),
.devices = easy5120rt_devices,
};
@@ -141,7 +141,7 @@ static struct adm5120_board easy5120wvoip_board __initdata = {
.mach_type = MACH_ADM5120_EASY5120WVOIP,
.name = "Infineon EASY 5120-WVoIP Reference Board",
.board_setup = easy_setup_bga,
- .num_eth_ports = 6,
+ .eth_num_ports = 6,
.num_devices = ARRAY_SIZE(easy5120wvoip_devices),
.devices = easy5120wvoip_devices,
};
@@ -150,7 +150,7 @@ static struct adm5120_board easy83000_board __initdata = {
.mach_type = MACH_ADM5120_EASY83000,
.name = "Infineon EASY 83000 Reference Board",
.board_setup = easy_setup_pqfp,
- .num_eth_ports = 6,
+ .eth_num_ports = 6,
.num_devices = ARRAY_SIZE(easy83000_devices),
.devices = easy83000_devices,
};
diff --git a/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/mikrotik.c b/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/mikrotik.c
index fccb284d6c..c1b203f7cc 100644
--- a/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/mikrotik.c
+++ b/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/mikrotik.c
@@ -59,11 +59,32 @@ static void __init rb1xx_setup(void)
/* TODO: setup mac address */
}
+static unsigned char rb11x_vlans[6] __initdata = {
+ /* FIXME: untested */
+ 0x41, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static unsigned char rb133_vlans[6] __initdata = {
+ /* FIXME: untested */
+ 0x41, 0x42, 0x44, 0x00, 0x00, 0x00
+};
+
+static unsigned char rb133c_vlans[6] __initdata = {
+ /* FIXME: untested */
+ 0x44, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+static unsigned char rb153_vlans[6] __initdata = {
+ /* FIXME: untested */
+ 0x41, 0x42, 0x44, 0x48, 0x50, 0x00
+};
+
static struct adm5120_board rb111_board __initdata = {
.mach_type = MACH_ADM5120_RB_111,
.name = "Mikrotik RouterBOARD 111",
.board_setup = rb1xx_setup,
- .num_eth_ports = 1,
+ .eth_num_ports = 1,
+ .eth_vlans = rb11x_vlans,
.num_devices = ARRAY_SIZE(rb1xx_devices),
.devices = rb1xx_devices,
};
@@ -72,7 +93,8 @@ static struct adm5120_board rb112_board __initdata = {
.mach_type = MACH_ADM5120_RB_112,
.name = "Mikrotik RouterBOARD 112",
.board_setup = rb1xx_setup,
- .num_eth_ports = 1,
+ .eth_num_ports = 1,
+ .eth_vlans = rb11x_vlans,
.num_devices = ARRAY_SIZE(rb1xx_devices),
.devices = rb1xx_devices,
};
@@ -81,7 +103,8 @@ static struct adm5120_board rb133_board __initdata = {
.mach_type = MACH_ADM5120_RB_133,
.name = "Mikrotik RouterBOARD 133",
.board_setup = rb1xx_setup,
- .num_eth_ports = 3,
+ .eth_num_ports = 3,
+ .eth_vlans = rb133_vlans,
.num_devices = ARRAY_SIZE(rb1xx_devices),
.devices = rb1xx_devices,
};
@@ -90,7 +113,8 @@ static struct adm5120_board rb133c_board __initdata = {
.mach_type = MACH_ADM5120_RB_133C,
.name = "Mikrotik RouterBOARD 133C",
.board_setup = rb1xx_setup,
- .num_eth_ports = 1,
+ .eth_num_ports = 1,
+ .eth_vlans = rb133c_vlans,
.num_devices = ARRAY_SIZE(rb1xx_devices),
.devices = rb1xx_devices,
};
@@ -99,7 +123,8 @@ static struct adm5120_board rb153_board __initdata = {
.mach_type = MACH_ADM5120_RB_153,
.name = "Mikrotik RouterBOARD 153",
.board_setup = rb1xx_setup,
- .num_eth_ports = 5,
+ .eth_num_ports = 5,
+ .eth_vlans = rb153_vlans,
.num_devices = ARRAY_SIZE(rb1xx_devices),
.devices = rb1xx_devices,
};
diff --git a/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/zyxel.c b/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/zyxel.c
index f6cdc8af4a..25e5a319be 100644
--- a/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/zyxel.c
+++ b/target/linux/adm5120-2.6/files/arch/mips/adm5120/boards/zyxel.c
@@ -55,9 +55,18 @@ static struct mtd_partition p33x_partitions[] = {
.offset = MTDPART_OFS_APPEND,
.size = 16*1024,
} , {
- .name = "firmware",
+ .name = "bootext",
+ .offset = MTDPART_OFS_APPEND,
+ .size = 96*1024,
+ .mask_flags = MTD_WRITEABLE,
+ } , {
+ .name = "trx",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
+ } , {
+ .name = "firmware",
+ .offset = 32*1024,
+ .size = MTDPART_SIZ_FULL,
}
};
@@ -83,10 +92,17 @@ static void __init p33x_setup(void)
/* TODO: setup mac address */
}
+unsigned char p33x_vlans[6] __initdata = {
+ /* FIXME: untested */
+ 0x50, 0x48, 0x44, 0x42, 0x41, 0x00
+};
+
static struct adm5120_board p334wt_board __initdata = {
.mach_type = MACH_ADM5120_P334WT,
.name = "ZyXEL Prestige 334WT",
.board_setup = p33x_setup,
+ .eth_num_ports = 5,
+ .eth_vlans = p33x_vlans,
.num_devices = ARRAY_SIZE(p334_devices),
.devices = p334_devices,
};
@@ -95,6 +111,8 @@ static struct adm5120_board p335_board __initdata = {
.mach_type = MACH_ADM5120_P335,
.name = "ZyXEL Prestige 335/335WT",
.board_setup = p33x_setup,
+ .eth_num_ports = 5,
+ .eth_vlans = p33x_vlans,
.num_devices = ARRAY_SIZE(p335_devices),
.devices = p335_devices,
};