Skip to content

Commit

Permalink
ar71xx: remove the built-in MTD maps of several boards
Browse files Browse the repository at this point in the history
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
  • Loading branch information
juhosg committed Mar 27, 2012
1 parent 603bb2b commit e27017a
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 324 deletions.
46 changes: 1 addition & 45 deletions target/linux/ar71xx/files/arch/mips/ath79/mach-alfa-nx.c
Expand Up @@ -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>

Expand Down Expand Up @@ -38,47 +35,6 @@
#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",
Expand Down Expand Up @@ -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);
Expand Down
42 changes: 1 addition & 41 deletions target/linux/ar71xx/files/arch/mips/ath79/mach-ap113.c
Expand Up @@ -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"
Expand All @@ -29,42 +25,6 @@
#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",
Expand Down Expand Up @@ -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);
Expand Down
45 changes: 1 addition & 44 deletions target/linux/ar71xx/files/arch/mips/ath79/mach-dir-600-a1.c
Expand Up @@ -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>

Expand Down Expand Up @@ -43,46 +40,6 @@
#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",
Expand Down Expand Up @@ -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 |
Expand Down
40 changes: 1 addition & 39 deletions target/linux/ar71xx/files/arch/mips/ath79/mach-dir-615-c1.c
Expand Up @@ -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"
Expand Down Expand Up @@ -41,41 +38,6 @@
#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",
Expand Down Expand Up @@ -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);
Expand Down
37 changes: 1 addition & 36 deletions target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-b1.c
Expand Up @@ -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>

Expand Down Expand Up @@ -48,39 +46,6 @@
#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",
Expand Down Expand Up @@ -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);
Expand Down
40 changes: 1 addition & 39 deletions target/linux/ar71xx/files/arch/mips/ath79/mach-tew-632brp.c
Expand Up @@ -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"
Expand All @@ -34,41 +31,6 @@
#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",
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e27017a

Please sign in to comment.