ar71xx: remove the built-in MTD maps of several boards
authorGabor Juhos <juhosg@openwrt.org>
Tue, 27 Mar 2012 19:38:01 +0000 (19:38 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Tue, 27 Mar 2012 19:38:01 +0000 (19:38 +0000)
We are passing the MTD layout via the kernel command line, so
it makes no sense to duplicate it in mach-* files. The patch
removes the built-in MTD maps of the following boards:

 * AP113
 * ALFA N2/N5
 * DIR-600
 * DIR-615
 * DIR-825
 * TEW-6{3,5}2BRP
 * TEW-673GRU
 * WHR-G301N
 * WHR-HP-GN
 * WHR-HP-G300N

SVN-Revision: 31108

target/linux/ar71xx/files/arch/mips/ath79/mach-alfa-nx.c
target/linux/ar71xx/files/arch/mips/ath79/mach-ap113.c
target/linux/ar71xx/files/arch/mips/ath79/mach-dir-600-a1.c
target/linux/ar71xx/files/arch/mips/ath79/mach-dir-615-c1.c
target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-b1.c
target/linux/ar71xx/files/arch/mips/ath79/mach-tew-632brp.c
target/linux/ar71xx/files/arch/mips/ath79/mach-tew-673gru.c
target/linux/ar71xx/files/arch/mips/ath79/mach-whr-hp-g300n.c

index d37e63fe129b6fd1035b6cdb171ed732753af0a2..a515f4f5408cfa77149f4886bbf357cbce3e63ec 100644 (file)
@@ -8,9 +8,6 @@
  *  by the Free Software Foundation.
  */
 
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-
 #include <asm/mach-ath79/ar71xx_regs.h>
 #include <asm/mach-ath79/ath79.h>
 
 #define ALFA_NX_MAC1_OFFSET            6
 #define ALFA_NX_CALDATA_OFFSET         0x1000
 
-static struct mtd_partition alfa_nx_partitions[] = {
-       {
-               .name           = "u-boot",
-               .offset         = 0,
-               .size           = 0x040000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "u-boot-env",
-               .offset         = 0x040000,
-               .size           = 0x010000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "rootfs",
-               .offset         = 0x050000,
-               .size           = 0x600000,
-       }, {
-               .name           = "kernel",
-               .offset         = 0x650000,
-               .size           = 0x190000,
-       }, {
-               .name           = "nvram",
-               .offset         = 0x7e0000,
-               .size           = 0x010000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "art",
-               .offset         = 0x7f0000,
-               .size           = 0x010000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "firmware",
-               .offset         = 0x050000,
-               .size           = 0x780000,
-       }
-};
-
-static struct flash_platform_data alfa_nx_flash_data = {
-       .parts          = alfa_nx_partitions,
-       .nr_parts       = ARRAY_SIZE(alfa_nx_partitions),
-};
-
 static struct gpio_keys_button alfa_nx_gpio_keys[] __initdata = {
        {
                .desc           = "Reset button",
@@ -129,7 +85,7 @@ static void __init alfa_nx_setup(void)
                                  AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
                                  AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
 
-       ath79_register_m25p80(&alfa_nx_flash_data);
+       ath79_register_m25p80(NULL);
 
        ath79_register_leds_gpio(0, ARRAY_SIZE(alfa_nx_leds_gpio),
                                 alfa_nx_leds_gpio);
index 178815cf91e5b12250583622c62f3ddca7259b73..9b38faa47cddb241519bcb91302d44ecc0a36d7c 100644 (file)
@@ -8,10 +8,6 @@
  *  by the Free Software Foundation.
  */
 
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/spi/flash.h>
-
 #include "dev-eth.h"
 #include "dev-gpio-buttons.h"
 #include "dev-leds-gpio.h"
 #define AP113_KEYS_POLL_INTERVAL       20      /* msecs */
 #define AP113_KEYS_DEBOUNCE_INTERVAL   (3 * AP113_KEYS_POLL_INTERVAL)
 
-static struct mtd_partition ap113_parts[] = {
-       {
-               .name           = "u-boot",
-               .offset         = 0,
-               .size           = 0x010000,
-               .mask_flags     = MTD_WRITEABLE,
-       },
-       {
-               .name           = "rootfs",
-               .offset         = 0x010000,
-               .size           = 0x300000,
-       },
-       {
-               .name           = "uImage",
-               .offset         = 0x300000,
-               .size           = 0x3e0000,
-       },
-       {
-               .name           = "NVRAM",
-               .offset         = 0x3e0000,
-               .size           = 0x010000,
-       },
-       {
-               .name           = "ART",
-               .offset         = 0x3f0000,
-               .size           = 0x010000,
-               .mask_flags     = MTD_WRITEABLE,
-       },
-};
-#define ap113_nr_parts         ARRAY_SIZE(ap113_parts)
-
-static struct flash_platform_data ap113_flash_data = {
-       .parts          = ap113_parts,
-       .nr_parts       = ap113_nr_parts,
-};
-
 static struct gpio_led ap113_leds_gpio[] __initdata = {
        {
                .name           = "ap113:green:usb",
@@ -98,7 +58,7 @@ static void __init ap113_setup(void)
 {
        u8 *mac = (u8 *) KSEG1ADDR(0x1fff0000);
 
-       ath79_register_m25p80(&ap113_flash_data);
+       ath79_register_m25p80(NULL);
 
        ath79_register_mdio(0, ~BIT(0));
        ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
index 931a7292e212fcf06b621ddac0e5952b796e2715..c0fa9008c0a4111755550accb1a085b6f90edb91 100644 (file)
@@ -9,9 +9,6 @@
  *  by the Free Software Foundation.
  */
 
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-
 #include <asm/mach-ath79/ath79.h>
 #include <asm/mach-ath79/ar71xx_regs.h>
 
 #define DIR_600_A1_NVRAM_ADDR  0x1f030000
 #define DIR_600_A1_NVRAM_SIZE  0x10000
 
-static struct mtd_partition dir_600_a1_partitions[] = {
-       {
-               .name           = "u-boot",
-               .offset         = 0,
-               .size           = 0x030000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "nvram",
-               .offset         = 0x030000,
-               .size           = 0x010000,
-       }, {
-               .name           = "kernel",
-               .offset         = 0x040000,
-               .size           = 0x0e0000,
-       }, {
-               .name           = "rootfs",
-               .offset         = 0x120000,
-               .size           = 0x2c0000,
-       }, {
-               .name           = "mac",
-               .offset         = 0x3e0000,
-               .size           = 0x010000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "art",
-               .offset         = 0x3f0000,
-               .size           = 0x010000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "firmware",
-               .offset         = 0x040000,
-               .size           = 0x3a0000,
-       }
-};
-
-static struct flash_platform_data dir_600_a1_flash_data = {
-       .parts          = dir_600_a1_partitions,
-       .nr_parts       = ARRAY_SIZE(dir_600_a1_partitions),
-};
-
 static struct gpio_led dir_600_a1_leds_gpio[] __initdata = {
        {
                .name           = "d-link:green:power",
@@ -152,7 +109,7 @@ static void __init dir_600_a1_setup(void)
                mac = mac_buff;
        }
 
-       ath79_register_m25p80(&dir_600_a1_flash_data);
+       ath79_register_m25p80(NULL);
 
        ath79_gpio_function_disable(AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
                                    AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
index b15fc6814c33a151c3e2a2e562eac927fea3f488..425be301e093621ae0fdcea05fc28ea7a7b3ee1a 100644 (file)
@@ -9,9 +9,6 @@
  *  by the Free Software Foundation.
  */
 
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-
 #include <asm/mach-ath79/ath79.h>
 
 #include "dev-eth.h"
 #define DIR_615C1_CONFIG_ADDR          0x1f020000
 #define DIR_615C1_CONFIG_SIZE          0x10000
 
-static struct mtd_partition dir_615c1_partitions[] = {
-       {
-               .name           = "u-boot",
-               .offset         = 0,
-               .size           = 0x020000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "config",
-               .offset         = 0x020000,
-               .size           = 0x010000,
-       }, {
-               .name           = "kernel",
-               .offset         = 0x030000,
-               .size           = 0x0e0000,
-       }, {
-               .name           = "rootfs",
-               .offset         = 0x110000,
-               .size           = 0x2e0000,
-       }, {
-               .name           = "art",
-               .offset         = 0x3f0000,
-               .size           = 0x010000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "firmware",
-               .offset         = 0x030000,
-               .size           = 0x3c0000,
-       }
-};
-
-static struct flash_platform_data dir_615c1_flash_data = {
-       .parts          = dir_615c1_partitions,
-       .nr_parts       = ARRAY_SIZE(dir_615c1_partitions),
-};
-
 static struct gpio_led dir_615c1_leds_gpio[] __initdata = {
        {
                .name           = "d-link:orange:status",
@@ -155,7 +117,7 @@ static void __init dir_615c1_setup(void)
        ath79_register_eth(0);
        ath79_register_eth(1);
 
-       ath79_register_m25p80(&dir_615c1_flash_data);
+       ath79_register_m25p80(NULL);
 
        ath79_register_leds_gpio(-1, ARRAY_SIZE(dir_615c1_leds_gpio),
                                 dir_615c1_leds_gpio);
index ab973ebfb838450ff4fefaa649899df0fdb62a46..1b4b4907511c2be05047db75a72f0d9a3916c43d 100644 (file)
@@ -11,8 +11,6 @@
  */
 
 #include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
 #include <linux/delay.h>
 #include <linux/rtl8366.h>
 
 #define DIR825B1_MAC_LOCATION_0                        0x1f66ffa0
 #define DIR825B1_MAC_LOCATION_1                        0x1f66ffb4
 
-static struct mtd_partition dir825b1_partitions[] = {
-       {
-               .name           = "uboot",
-               .offset         = 0,
-               .size           = 0x040000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "config",
-               .offset         = 0x040000,
-               .size           = 0x010000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "firmware",
-               .offset         = 0x050000,
-               .size           = 0x610000,
-       }, {
-               .name           = "caldata",
-               .offset         = 0x660000,
-               .size           = 0x010000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "unknown",
-               .offset         = 0x670000,
-               .size           = 0x190000,
-               .mask_flags     = MTD_WRITEABLE,
-       }
-};
-
-static struct flash_platform_data dir825b1_flash_data = {
-       .parts          = dir825b1_partitions,
-       .nr_parts       = ARRAY_SIZE(dir825b1_partitions),
-};
-
 static struct gpio_led dir825b1_leds_gpio[] __initdata = {
        {
                .name           = "d-link:blue:usb",
@@ -184,7 +149,7 @@ static void __init dir825b1_setup(void)
        ath79_register_eth(0);
        ath79_register_eth(1);
 
-       ath79_register_m25p80(&dir825b1_flash_data);
+       ath79_register_m25p80(NULL);
 
        ath79_register_leds_gpio(-1, ARRAY_SIZE(dir825b1_leds_gpio),
                                 dir825b1_leds_gpio);
index de2d2a5376794351616a15141589a0277d2e3771..b76d4a7a00d3622c0342b8e2c2585ac5809c9254 100644 (file)
@@ -9,9 +9,6 @@
  *  by the Free Software Foundation.
  */
 
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-
 #include <asm/mach-ath79/ath79.h>
 
 #include "dev-eth.h"
 #define TEW_632BRP_CONFIG_ADDR 0x1f020000
 #define TEW_632BRP_CONFIG_SIZE 0x10000
 
-static struct mtd_partition tew_632brp_partitions[] = {
-       {
-               .name           = "u-boot",
-               .offset         = 0,
-               .size           = 0x020000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "config",
-               .offset         = 0x020000,
-               .size           = 0x010000,
-       }, {
-               .name           = "kernel",
-               .offset         = 0x030000,
-               .size           = 0x0e0000,
-       }, {
-               .name           = "rootfs",
-               .offset         = 0x110000,
-               .size           = 0x2e0000,
-       }, {
-               .name           = "art",
-               .offset         = 0x3f0000,
-               .size           = 0x010000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "firmware",
-               .offset         = 0x030000,
-               .size           = 0x3c0000,
-       }
-};
-
-static struct flash_platform_data tew_632brp_flash_data = {
-       .parts          = tew_632brp_partitions,
-       .nr_parts       = ARRAY_SIZE(tew_632brp_partitions),
-};
-
 static struct gpio_led tew_632brp_leds_gpio[] __initdata = {
        {
                .name           = "tew-632brp:green:status",
@@ -131,7 +93,7 @@ static void __init tew_632brp_setup(void)
        ath79_register_eth(0);
        ath79_register_eth(1);
 
-       ath79_register_m25p80(&tew_632brp_flash_data);
+       ath79_register_m25p80(NULL);
 
        ath79_register_leds_gpio(-1, ARRAY_SIZE(tew_632brp_leds_gpio),
                                 tew_632brp_leds_gpio);
index 71f2ec00e44c711a76c4e4ba34ffeb17154679a2..8fe8259368eb1605b582c77cc0e7897101f7cc25 100644 (file)
@@ -9,8 +9,6 @@
  */
 
 #include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
 #include <linux/delay.h>
 #include <linux/rtl8366.h>
 #include <linux/spi/spi.h>
 #define TEW673GRU_MAC_LOCATION_0       0x1f66ffa0
 #define TEW673GRU_MAC_LOCATION_1       0x1f66ffb4
 
-static struct mtd_partition tew673gru_partitions[] = {
-       {
-               .name           = "uboot",
-               .offset         = 0,
-               .size           = 0x040000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "config",
-               .offset         = 0x040000,
-               .size           = 0x010000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "firmware",
-               .offset         = 0x050000,
-               .size           = 0x610000,
-       }, {
-               .name           = "caldata",
-               .offset         = 0x660000,
-               .size           = 0x010000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "unknown",
-               .offset         = 0x670000,
-               .size           = 0x190000,
-               .mask_flags     = MTD_WRITEABLE,
-       }
-};
-
-static struct flash_platform_data tew673gru_flash_data = {
-       .parts          = tew673gru_partitions,
-       .nr_parts       = ARRAY_SIZE(tew673gru_partitions),
-};
-
 static struct gpio_led tew673gru_leds_gpio[] __initdata = {
        {
                .name           = "trendnet:blue:wps",
@@ -189,7 +154,7 @@ static void __init tew673gru_setup(void)
        ath79_register_eth(0);
        ath79_register_eth(1);
 
-       ath79_register_m25p80(&tew673gru_flash_data);
+       ath79_register_m25p80(NULL);
 
        ath79_register_leds_gpio(-1, ARRAY_SIZE(tew673gru_leds_gpio),
                                 tew673gru_leds_gpio);
index 3e3924b87773b6bec17f66ab73acb769ccddf237..48f49ad0f7a5571bdf508718dc9c05edb7f6ec0d 100644 (file)
@@ -12,9 +12,6 @@
  *  by the Free Software Foundation.
  */
 
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-
 #include <asm/mach-ath79/ath79.h>
 #include <asm/mach-ath79/ar71xx_regs.h>
 
 
 #define WHRHPG300N_MAC_OFFSET          0x20c
 
-static struct mtd_partition whrhpg300n_partitions[] = {
-       {
-               .name           = "u-boot",
-               .offset         = 0,
-               .size           = 0x03e000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "u-boot-env",
-               .offset         = 0x03e000,
-               .size           = 0x002000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "kernel",
-               .offset         = 0x040000,
-               .size           = 0x0e0000,
-       }, {
-               .name           = "rootfs",
-               .offset         = 0x120000,
-               .size           = 0x2c0000,
-       }, {
-               .name           = "user_property",
-               .offset         = 0x3e0000,
-               .size           = 0x010000,
-       }, {
-               .name           = "ART",
-               .offset         = 0x3f0000,
-               .size           = 0x010000,
-               .mask_flags     = MTD_WRITEABLE,
-       }, {
-               .name           = "firmware",
-               .offset         = 0x040000,
-               .size           = 0x3a0000,
-       }
-};
-
-static struct flash_platform_data whrhpg300n_flash_data = {
-       .parts          = whrhpg300n_partitions,
-       .nr_parts       = ARRAY_SIZE(whrhpg300n_partitions),
-};
-
 static struct gpio_led whrhpg300n_leds_gpio[] __initdata = {
        {
                .name           = "buffalo:orange:security",
@@ -158,7 +115,7 @@ static void __init whrhpg300n_setup(void)
        u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
        u8 *mac = (u8 *) KSEG1ADDR(ee + WHRHPG300N_MAC_OFFSET);
 
-       ath79_register_m25p80(&whrhpg300n_flash_data);
+       ath79_register_m25p80(NULL);
 
        ath79_gpio_function_disable(AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
                                    AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN |