ar71xx: use the tp-link parser on the tp-link boards
authorGabor Juhos <juhosg@openwrt.org>
Sat, 3 Dec 2011 18:13:31 +0000 (18:13 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sat, 3 Dec 2011 18:13:31 +0000 (18:13 +0000)
Also remove static partition maps.

SVN-Revision: 29416

target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-mr3x20.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd-v2.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wa901nd.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr703n.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd-v4.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr741nd.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c

index ee1a4b6a117c4405a501efaf25988298241c0556..2869e3933cf0332a1be0b32cbeffef901fc6c812 100644 (file)
@@ -9,8 +9,6 @@
  */
 
 #include <linux/gpio.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
 
 #include <asm/mach-ar71xx/ar71xx.h>
 
 #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 = {
index ab5d18716d7dc67722d5ff10edf0b69c8f8fbecb..7d9bbee835dcd911f92d955dcd46664a6f97457a 100644 (file)
@@ -10,9 +10,6 @@
  *  by the Free Software Foundation.
  */
 
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-
 #include <asm/mach-ar71xx/ar71xx.h>
 
 #include "machtype.h"
 #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 = {
index ebe7ab5c7d206267c7796d7baabcdb5d5c93edde..7bc666a9f9ecc34c64c93d2614c0c44a4497e858 100644 (file)
@@ -9,9 +9,6 @@
  *  by the Free Software Foundation.
  */
 
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-
 #include <asm/mach-ar71xx/ar71xx.h>
 
 #include "machtype.h"
 #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 = {
index 91aee70c3ac6d6cc41aa2740adbf2e9ad54035d6..3a844b774019f4dfda91fb13909c6791179ca6b3 100644 (file)
@@ -8,8 +8,6 @@
  *  by the Free Software Foundation.
  */
 
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
 #include <linux/platform_device.h>
 #include <linux/rtl8366.h>
 #include <asm/mach-ar71xx/ar71xx.h>
 #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 = {
index 6ddd33b4154c386b1375f38b8a73f3c0469a097b..e9c2f25fe3494ef53540b7da0469e8745a54b30d 100644 (file)
@@ -9,9 +9,6 @@
  *  by the Free Software Foundation.
  */
 
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/spi/flash.h>
 #include <linux/gpio.h>
 
 #include <asm/mach-ar71xx/ar71xx.h>
 #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 = {
index 0760008600aa729f9e500eec6495fc85b4802810..1ef7ade8a5f392b2fd077f4a9f5b1ddf01d47cf5 100644 (file)
@@ -8,9 +8,6 @@
  *  by the Free Software Foundation.
  */
 
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/spi/flash.h>
 #include <linux/gpio.h>
 
 #include <asm/mach-ar71xx/ar71xx.h>
 #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 = {
index 60e6d24c8b50d4e287391a4765614ca0b5441e5b..07b791ada87db5397f92bbdd50f96a55c6103db6 100644 (file)
@@ -8,9 +8,6 @@
  *  by the Free Software Foundation.
  */
 
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-
 #include <asm/mach-ar71xx/ar71xx.h>
 
 #include "machtype.h"
 #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 = {
index f8e605dcdc136c07efe803489c45f8595dafe3c1..14176b87a7a9b0ad0b764c66f959f87e802771e2 100644 (file)
@@ -8,8 +8,6 @@
  *  by the Free Software Foundation.
  */
 
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
 #include <linux/platform_device.h>
 
 #include <asm/mach-ar71xx/ar71xx.h>
 #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 = {