From 11a837ce029534fc38f6deb2a2f31d80fe5a1f7f Mon Sep 17 00:00:00 2001 From: juhosg Date: Sat, 3 Dec 2011 18:13:31 +0000 Subject: ar71xx: use the tp-link parser on the tp-link boards Also remove static partition maps. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29416 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../ar71xx/files/arch/mips/ar71xx/mach-tl-mr3x20.c | 38 +++------------------ .../files/arch/mips/ar71xx/mach-tl-wa901nd-v2.c | 38 +++------------------ .../files/arch/mips/ar71xx/mach-tl-wa901nd.c | 37 +++----------------- .../files/arch/mips/ar71xx/mach-tl-wr1043nd.c | 36 +++----------------- .../ar71xx/files/arch/mips/ar71xx/mach-tl-wr703n.c | 39 +++------------------- .../files/arch/mips/ar71xx/mach-tl-wr741nd-v4.c | 39 +++------------------- .../files/arch/mips/ar71xx/mach-tl-wr741nd.c | 37 +++----------------- .../files/arch/mips/ar71xx/mach-tl-wr941nd.c | 36 +++----------------- 8 files changed, 33 insertions(+), 267 deletions(-) (limited to 'target/linux/ar71xx/files/arch') diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-mr3x20.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-mr3x20.c index ee1a4b6a1..2869e3933 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-mr3x20.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-mr3x20.c @@ -9,8 +9,6 @@ */ #include -#include -#include #include @@ -34,41 +32,13 @@ #define TL_MR3X20_KEYS_POLL_INTERVAL 20 /* msecs */ #define TL_MR3X20_KEYS_DEBOUNCE_INTERVAL (3 * TL_MR3X20_KEYS_POLL_INTERVAL) -#ifdef CONFIG_MTD_PARTITIONS -static struct mtd_partition tl_mr3x20_partitions[] = { - { - .name = "u-boot", - .offset = 0, - .size = 0x020000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "kernel", - .offset = 0x020000, - .size = 0x140000, - }, { - .name = "rootfs", - .offset = 0x160000, - .size = 0x290000, - }, { - .name = "art", - .offset = 0x3f0000, - .size = 0x010000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "firmware", - .offset = 0x020000, - .size = 0x3d0000, - } +static const char *tl_mr3x20_part_probes[] = { + "tp-link", + NULL, }; -#define tl_mr3x20_num_partitions ARRAY_SIZE(tl_mr3x20_partitions) -#else -#define tl_mr3x20_partitions NULL -#define tl_mr3x20_num_partitions 0 -#endif /* CONFIG_MTD_PARTITIONS */ static struct flash_platform_data tl_mr3x20_flash_data = { - .parts = tl_mr3x20_partitions, - .nr_parts = tl_mr3x20_num_partitions, + .part_probes = tl_mr3x20_part_probes, }; static struct gpio_led tl_mr3x20_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd-v2.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd-v2.c index ab5d18716..7d9bbee83 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd-v2.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd-v2.c @@ -10,9 +10,6 @@ * by the Free Software Foundation. */ -#include -#include - #include #include "machtype.h" @@ -33,39 +30,14 @@ #define TL_WA901ND_V2_KEYS_POLL_INTERVAL 20 /* msecs */ #define TL_WA901ND_V2_KEYS_DEBOUNCE_INTERVAL \ (3 * TL_WA901ND_V2_KEYS_POLL_INTERVAL) -#ifdef CONFIG_MTD_PARTITIONS -static struct mtd_partition tl_wa901nd_v2_partitions[] = { - { - .name = "u-boot", - .offset = 0, - .size = 0x020000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "kernel", - .offset = 0x020000, - .size = 0x140000, - }, { - .name = "rootfs", - .offset = 0x160000, - .size = 0x290000, - }, { - .name = "art", - .offset = 0x3f0000, - .size = 0x010000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "firmware", - .offset = 0x020000, - .size = 0x3d0000, - } + +static const char *tl_wa901nd_v2_part_probes[] = { + "tp-link", + NULL, }; -#endif /* CONFIG_MTD_PARTITIONS */ static struct flash_platform_data tl_wa901nd_v2_flash_data = { -#ifdef CONFIG_MTD_PARTITIONS - .parts = tl_wa901nd_v2_partitions, - .nr_parts = ARRAY_SIZE(tl_wa901nd_v2_partitions), -#endif + .part_probes = tl_wa901nd_v2_part_probes, }; static struct gpio_led tl_wa901nd_v2_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd.c index ebe7ab5c7..7bc666a9f 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd.c @@ -9,9 +9,6 @@ * by the Free Software Foundation. */ -#include -#include - #include #include "machtype.h" @@ -30,39 +27,13 @@ #define TL_WA901ND_KEYS_POLL_INTERVAL 20 /* msecs */ #define TL_WA901ND_KEYS_DEBOUNCE_INTERVAL (3 * TL_WA901ND_KEYS_POLL_INTERVAL) -#ifdef CONFIG_MTD_PARTITIONS -static struct mtd_partition tl_wa901nd_partitions[] = { - { - .name = "u-boot", - .offset = 0, - .size = 0x020000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "kernel", - .offset = 0x020000, - .size = 0x140000, - }, { - .name = "rootfs", - .offset = 0x160000, - .size = 0x290000, - }, { - .name = "art", - .offset = 0x3f0000, - .size = 0x010000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "firmware", - .offset = 0x020000, - .size = 0x3d0000, - } +static const char *tl_wa901nd_part_probes[] = { + "tp-link", + NULL, }; -#endif /* CONFIG_MTD_PARTITIONS */ static struct flash_platform_data tl_wa901nd_flash_data = { -#ifdef CONFIG_MTD_PARTITIONS - .parts = tl_wa901nd_partitions, - .nr_parts = ARRAY_SIZE(tl_wa901nd_partitions), -#endif + .part_probes = tl_wa901nd_part_probes, }; static struct gpio_led tl_wa901nd_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c index 91aee70c3..3a844b774 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c @@ -8,8 +8,6 @@ * by the Free Software Foundation. */ -#include -#include #include #include #include @@ -36,39 +34,13 @@ #define TL_WR1043ND_KEYS_POLL_INTERVAL 20 /* msecs */ #define TL_WR1043ND_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR1043ND_KEYS_POLL_INTERVAL) -#ifdef CONFIG_MTD_PARTITIONS -static struct mtd_partition tl_wr1043nd_partitions[] = { - { - .name = "u-boot", - .offset = 0, - .size = 0x020000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "kernel", - .offset = 0x020000, - .size = 0x140000, - }, { - .name = "rootfs", - .offset = 0x160000, - .size = 0x690000, - }, { - .name = "art", - .offset = 0x7f0000, - .size = 0x010000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "firmware", - .offset = 0x020000, - .size = 0x7d0000, - } +static const char *tl_wr1043nd_part_probes[] = { + "tp-link", + NULL, }; -#endif /* CONFIG_MTD_PARTITIONS */ static struct flash_platform_data tl_wr1043nd_flash_data = { -#ifdef CONFIG_MTD_PARTITIONS - .parts = tl_wr1043nd_partitions, - .nr_parts = ARRAY_SIZE(tl_wr1043nd_partitions), -#endif + .part_probes = tl_wr1043nd_part_probes, }; static struct gpio_led tl_wr1043nd_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr703n.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr703n.c index 6ddd33b41..e9c2f25fe 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr703n.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr703n.c @@ -9,9 +9,6 @@ * by the Free Software Foundation. */ -#include -#include -#include #include #include @@ -32,41 +29,13 @@ #define TL_WR703N_KEYS_POLL_INTERVAL 20 /* msecs */ #define TL_WR703N_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR703N_KEYS_POLL_INTERVAL) -#ifdef CONFIG_MTD_PARTITIONS -static struct mtd_partition tl_wr703n_parts[] = { - { - .name = "u-boot", - .offset = 0, - .size = 0x020000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "kernel", - .offset = 0x020000, - .size = 0x100000, - }, { - .name = "rootfs", - .offset = 0x120000, - .size = 0x2d0000, - }, { - .name = "art", - .offset = 0x3f0000, - .size = 0x010000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "firmware", - .offset = 0x020000, - .size = 0x3d0000, - } +static const char *tl_wr703n_part_probes[] = { + "tp-link", + NULL, }; -#define tl_wr703n_nr_parts ARRAY_SIZE(tl_wr703n_parts) -#else -#define tl_wr703n_parts NULL -#define tl_wr703n_nr_parts 0 -#endif /* CONFIG_MTD_PARTITIONS */ static struct flash_platform_data tl_wr703n_flash_data = { - .parts = tl_wr703n_parts, - .nr_parts = tl_wr703n_nr_parts, + .part_probes = tl_wr703n_part_probes, }; static struct gpio_led tl_wr703n_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd-v4.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd-v4.c index 076000860..1ef7ade8a 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd-v4.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd-v4.c @@ -8,9 +8,6 @@ * by the Free Software Foundation. */ -#include -#include -#include #include #include @@ -32,41 +29,13 @@ #define TL_WR741NDV4_KEYS_POLL_INTERVAL 20 /* msecs */ #define TL_WR741NDV4_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR741NDV4_KEYS_POLL_INTERVAL) -#ifdef CONFIG_MTD_PARTITIONS -static struct mtd_partition tl_wr741ndv4_parts[] = { - { - .name = "u-boot", - .offset = 0, - .size = 0x020000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "kernel", - .offset = 0x020000, - .size = 0x100000, - }, { - .name = "rootfs", - .offset = 0x120000, - .size = 0x2d0000, - }, { - .name = "art", - .offset = 0x3f0000, - .size = 0x010000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "firmware", - .offset = 0x020000, - .size = 0x3d0000, - } +static const char *tl_wr741ndv4_part_probes[] = { + "tp-link", + NULL, }; -#define tl_wr741ndv4_nr_parts ARRAY_SIZE(tl_wr741ndv4_parts) -#else -#define tl_wr741ndv4_parts NULL -#define tl_wr741ndv4_nr_parts 0 -#endif /* CONFIG_MTD_PARTITIONS */ static struct flash_platform_data tl_wr741ndv4_flash_data = { - .parts = tl_wr741ndv4_parts, - .nr_parts = tl_wr741ndv4_nr_parts, + .part_probes = tl_wr741ndv4_part_probes, }; static struct gpio_led tl_wr741ndv4_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c index 60e6d24c8..07b791ada 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c @@ -8,9 +8,6 @@ * by the Free Software Foundation. */ -#include -#include - #include #include "machtype.h" @@ -29,39 +26,13 @@ #define TL_WR741ND_KEYS_POLL_INTERVAL 20 /* msecs */ #define TL_WR741ND_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR741ND_KEYS_POLL_INTERVAL) -#ifdef CONFIG_MTD_PARTITIONS -static struct mtd_partition tl_wr741nd_partitions[] = { - { - .name = "u-boot", - .offset = 0, - .size = 0x020000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "kernel", - .offset = 0x020000, - .size = 0x140000, - }, { - .name = "rootfs", - .offset = 0x160000, - .size = 0x290000, - }, { - .name = "art", - .offset = 0x3f0000, - .size = 0x010000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "firmware", - .offset = 0x020000, - .size = 0x3d0000, - } +static const char *tl_wr741nd_part_probes[] = { + "tp-link", + NULL, }; -#endif /* CONFIG_MTD_PARTITIONS */ static struct flash_platform_data tl_wr741nd_flash_data = { -#ifdef CONFIG_MTD_PARTITIONS - .parts = tl_wr741nd_partitions, - .nr_parts = ARRAY_SIZE(tl_wr741nd_partitions), -#endif + .part_probes = tl_wr741nd_part_probes, }; static struct gpio_led tl_wr741nd_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c index f8e605dcd..14176b87a 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c @@ -8,8 +8,6 @@ * by the Free Software Foundation. */ -#include -#include #include #include @@ -33,39 +31,13 @@ #define TL_WR941ND_KEYS_POLL_INTERVAL 20 /* msecs */ #define TL_WR941ND_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR941ND_KEYS_POLL_INTERVAL) -#ifdef CONFIG_MTD_PARTITIONS -static struct mtd_partition tl_wr941nd_partitions[] = { - { - .name = "u-boot", - .offset = 0, - .size = 0x020000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "kernel", - .offset = 0x020000, - .size = 0x140000, - }, { - .name = "rootfs", - .offset = 0x160000, - .size = 0x290000, - }, { - .name = "art", - .offset = 0x3f0000, - .size = 0x010000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "firmware", - .offset = 0x020000, - .size = 0x3d0000, - } +static const char *tl_wr941nd_part_probes[] = { + "tp-link", + NULL, }; -#endif /* CONFIG_MTD_PARTITIONS */ static struct flash_platform_data tl_wr941nd_flash_data = { -#ifdef CONFIG_MTD_PARTITIONS - .parts = tl_wr941nd_partitions, - .nr_parts = ARRAY_SIZE(tl_wr941nd_partitions), -#endif + .part_probes = tl_wr941nd_part_probes, }; static struct gpio_led tl_wr941nd_leds_gpio[] __initdata = { -- cgit v1.2.3