ar71xx: remove the built-in MTD maps of several boards
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 27 Mar 2012 19:38:01 +0000 (19:38 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
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

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31108 3c298f89-4303-0410-b956-a3cf2f4a3e73

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 d37e63f..a515f4f 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 178815c..9b38faa 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 931a729..c0fa900 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 b15fc68..425be30 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 ab973eb..1b4b490 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 de2d2a5..b76d4a7 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 71f2ec0..8fe8259 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 3e3924b..48f49ad 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 |
This page took 0.054158 seconds and 4 git commands to generate.