diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-01-24 18:40:34 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-01-24 18:40:34 +0000 |
commit | c8f5aae9fde6d4b560ddbb7e284b6d42927a2277 (patch) | |
tree | be49424e35c275cbd79bfc71e06d5e44289bba32 | |
parent | 8b3aaef2dd6245c2e6e42e434f946ef71846385a (diff) |
ar71xx: remove hardcoded MTD layout from planex files
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29895 3c298f89-4303-0410-b956-a3cf2f4a3e73
4 files changed, 4 insertions, 164 deletions
diff --git a/target/linux/ar71xx/files-2.6.39/arch/mips/ar71xx/mach-mzk-w04nu.c b/target/linux/ar71xx/files-2.6.39/arch/mips/ar71xx/mach-mzk-w04nu.c index dbb408cbb..b88edeec3 100644 --- a/target/linux/ar71xx/files-2.6.39/arch/mips/ar71xx/mach-mzk-w04nu.c +++ b/target/linux/ar71xx/files-2.6.39/arch/mips/ar71xx/mach-mzk-w04nu.c @@ -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" @@ -35,45 +32,6 @@ #define MZK_W04NU_KEYS_POLL_INTERVAL 20 /* msecs */ #define MZK_W04NU_KEYS_DEBOUNCE_INTERVAL (3 * MZK_W04NU_KEYS_POLL_INTERVAL) -#ifdef CONFIG_MTD_PARTITIONS -static struct mtd_partition mzk_w04nu_partitions[] = { - { - .name = "u-boot", - .offset = 0, - .size = 0x040000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "u-boot-env", - .offset = 0x040000, - .size = 0x010000, - }, { - .name = "kernel", - .offset = 0x050000, - .size = 0x160000, - }, { - .name = "rootfs", - .offset = 0x1b0000, - .size = 0x630000, - }, { - .name = "art", - .offset = 0x7e0000, - .size = 0x020000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "firmware", - .offset = 0x050000, - .size = 0x790000, - } -}; -#endif /* CONFIG_MTD_PARTITIONS */ - -static struct flash_platform_data mzk_w04nu_flash_data = { -#ifdef CONFIG_MTD_PARTITIONS - .parts = mzk_w04nu_partitions, - .nr_parts = ARRAY_SIZE(mzk_w04nu_partitions), -#endif -}; - static struct gpio_led mzk_w04nu_leds_gpio[] __initdata = { { .name = "planex:green:status", @@ -149,7 +107,7 @@ static void __init mzk_w04nu_setup(void) ar71xx_add_device_eth(0); ar71xx_add_device_eth(1); - ar71xx_add_device_m25p80(&mzk_w04nu_flash_data); + ar71xx_add_device_m25p80(NULL); ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(mzk_w04nu_leds_gpio), mzk_w04nu_leds_gpio); diff --git a/target/linux/ar71xx/files-2.6.39/arch/mips/ar71xx/mach-mzk-w300nh.c b/target/linux/ar71xx/files-2.6.39/arch/mips/ar71xx/mach-mzk-w300nh.c index 98b3f0092..ca98c7c04 100644 --- a/target/linux/ar71xx/files-2.6.39/arch/mips/ar71xx/mach-mzk-w300nh.c +++ b/target/linux/ar71xx/files-2.6.39/arch/mips/ar71xx/mach-mzk-w300nh.c @@ -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" @@ -34,45 +31,6 @@ #define MZK_W300NH_KEYS_POLL_INTERVAL 20 /* msecs */ #define MZK_W300NH_KEYS_DEBOUNCE_INTERVAL (3 * MZK_W300NH_KEYS_POLL_INTERVAL) -#ifdef CONFIG_MTD_PARTITIONS -static struct mtd_partition mzk_w300nh_partitions[] = { - { - .name = "u-boot", - .offset = 0, - .size = 0x040000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "u-boot-env", - .offset = 0x040000, - .size = 0x010000, - }, { - .name = "kernel", - .offset = 0x050000, - .size = 0x160000, - }, { - .name = "rootfs", - .offset = 0x1b0000, - .size = 0x630000, - }, { - .name = "art", - .offset = 0x7e0000, - .size = 0x020000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "firmware", - .offset = 0x050000, - .size = 0x790000, - } -}; -#endif /* CONFIG_MTD_PARTITIONS */ - -static struct flash_platform_data mzk_w300nh_flash_data = { -#ifdef CONFIG_MTD_PARTITIONS - .parts = mzk_w300nh_partitions, - .nr_parts = ARRAY_SIZE(mzk_w300nh_partitions), -#endif -}; - static struct gpio_led mzk_w300nh_leds_gpio[] __initdata = { { .name = "planex:green:status", @@ -144,7 +102,7 @@ static void __init mzk_w300nh_setup(void) ar71xx_add_device_eth(0); ar71xx_add_device_eth(1); - ar71xx_add_device_m25p80(&mzk_w300nh_flash_data); + ar71xx_add_device_m25p80(NULL); ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(mzk_w300nh_leds_gpio), mzk_w300nh_leds_gpio); diff --git a/target/linux/ar71xx/files-3.2/arch/mips/ath79/mach-mzk-w04nu.c b/target/linux/ar71xx/files-3.2/arch/mips/ath79/mach-mzk-w04nu.c index a50436678..c2460ce33 100644 --- a/target/linux/ar71xx/files-3.2/arch/mips/ath79/mach-mzk-w04nu.c +++ b/target/linux/ar71xx/files-3.2/arch/mips/ath79/mach-mzk-w04nu.c @@ -8,9 +8,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" @@ -35,41 +32,6 @@ #define MZK_W04NU_KEYS_POLL_INTERVAL 20 /* msecs */ #define MZK_W04NU_KEYS_DEBOUNCE_INTERVAL (3 * MZK_W04NU_KEYS_POLL_INTERVAL) -static struct mtd_partition mzk_w04nu_partitions[] = { - { - .name = "u-boot", - .offset = 0, - .size = 0x040000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "u-boot-env", - .offset = 0x040000, - .size = 0x010000, - }, { - .name = "kernel", - .offset = 0x050000, - .size = 0x160000, - }, { - .name = "rootfs", - .offset = 0x1b0000, - .size = 0x630000, - }, { - .name = "art", - .offset = 0x7e0000, - .size = 0x020000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "firmware", - .offset = 0x050000, - .size = 0x790000, - } -}; - -static struct flash_platform_data mzk_w04nu_flash_data = { - .parts = mzk_w04nu_partitions, - .nr_parts = ARRAY_SIZE(mzk_w04nu_partitions), -}; - static struct gpio_led mzk_w04nu_leds_gpio[] __initdata = { { .name = "planex:green:status", @@ -145,7 +107,7 @@ static void __init mzk_w04nu_setup(void) ath79_register_eth(0); ath79_register_eth(1); - ath79_register_m25p80(&mzk_w04nu_flash_data); + ath79_register_m25p80(NULL); ath79_register_leds_gpio(-1, ARRAY_SIZE(mzk_w04nu_leds_gpio), mzk_w04nu_leds_gpio); diff --git a/target/linux/ar71xx/files-3.2/arch/mips/ath79/mach-mzk-w300nh.c b/target/linux/ar71xx/files-3.2/arch/mips/ath79/mach-mzk-w300nh.c index 4a6d06b92..4ff19e884 100644 --- a/target/linux/ar71xx/files-3.2/arch/mips/ath79/mach-mzk-w300nh.c +++ b/target/linux/ar71xx/files-3.2/arch/mips/ath79/mach-mzk-w300nh.c @@ -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" @@ -34,41 +31,6 @@ #define MZK_W300NH_KEYS_POLL_INTERVAL 20 /* msecs */ #define MZK_W300NH_KEYS_DEBOUNCE_INTERVAL (3 * MZK_W300NH_KEYS_POLL_INTERVAL) -static struct mtd_partition mzk_w300nh_partitions[] = { - { - .name = "u-boot", - .offset = 0, - .size = 0x040000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "u-boot-env", - .offset = 0x040000, - .size = 0x010000, - }, { - .name = "kernel", - .offset = 0x050000, - .size = 0x160000, - }, { - .name = "rootfs", - .offset = 0x1b0000, - .size = 0x630000, - }, { - .name = "art", - .offset = 0x7e0000, - .size = 0x020000, - .mask_flags = MTD_WRITEABLE, - }, { - .name = "firmware", - .offset = 0x050000, - .size = 0x790000, - } -}; - -static struct flash_platform_data mzk_w300nh_flash_data = { - .parts = mzk_w300nh_partitions, - .nr_parts = ARRAY_SIZE(mzk_w300nh_partitions), -}; - static struct gpio_led mzk_w300nh_leds_gpio[] __initdata = { { .name = "planex:green:status", @@ -140,7 +102,7 @@ static void __init mzk_w300nh_setup(void) ath79_register_eth(0); ath79_register_eth(1); - ath79_register_m25p80(&mzk_w300nh_flash_data); + ath79_register_m25p80(NULL); ath79_register_leds_gpio(-1, ARRAY_SIZE(mzk_w300nh_leds_gpio), mzk_w300nh_leds_gpio); |