This add target patches to unobtrusively fix to the new MTD api for all needed boards in order to support Linux-3.0.
When we drop kernel support <3.0 we can easily patch the boards files directly and remove this patches. Signed-off-by: Otto Estuardo Solares Cabrera <so...@guug.org> --- .../ar71xx/patches-3.0/401-mtd_api_ap81.patch | 24 ++++++++++++ .../ar71xx/patches-3.0/402-mtd_api_ap83.patch | 25 +++++++++++++ .../ar71xx/patches-3.0/403-mtd_api_ap96.patch | 24 ++++++++++++ .../ar71xx/patches-3.0/404-mtd_api_ap121.patch | 24 ++++++++++++ .../ar71xx/patches-3.0/405-mtd_api_db120.patch | 24 ++++++++++++ .../patches-3.0/406-mtd_api_dir_600_a1.patch | 24 ++++++++++++ .../patches-3.0/407-mtd_api_dir_615_c1.patch | 24 ++++++++++++ .../patches-3.0/408-mtd_api_dir_825_b1.patch | 24 ++++++++++++ .../ar71xx/patches-3.0/409-mtd_api_mzk_w04nu.patch | 24 ++++++++++++ .../patches-3.0/410-mtd_api_mzk_w300nh.patch | 24 ++++++++++++ .../ar71xx/patches-3.0/411-mtd_api_nbg460n.patch | 24 ++++++++++++ .../ar71xx/patches-3.0/412-mtd_api_pb92.patch | 24 ++++++++++++ .../ar71xx/patches-3.0/413-mtd_api_rb4xx.patch | 38 ++++++++++++++++++++ .../ar71xx/patches-3.0/414-mtd_api_rb750.patch | 17 +++++++++ .../patches-3.0/415-mtd_api_tew_632brp.patch | 24 ++++++++++++ .../ar71xx/patches-3.0/416-mtd_api_tl_mr3x20.patch | 21 +++++++++++ .../patches-3.0/417-mtd_api_tl_wa901nd.patch | 24 ++++++++++++ .../patches-3.0/418-mtd_api_tl_wa901nd_v2.patch | 24 ++++++++++++ .../patches-3.0/419-mtd_api_tl_wr1043nd.patch | 24 ++++++++++++ .../patches-3.0/420-mtd_api_tl_wr741nd.patch | 24 ++++++++++++ .../ar71xx/patches-3.0/421-mtd_api_tl_wr841n.patch | 24 ++++++++++++ .../patches-3.0/422-mtd_api_tl_wr941nd.patch | 24 ++++++++++++ .../ar71xx/patches-3.0/423-mtd_api_wndr3700.patch | 23 ++++++++++++ .../ar71xx/patches-3.0/424-mtd_api_wnr2000.patch | 24 ++++++++++++ .../ar71xx/patches-3.0/425-mtd_api_wrt160nl.patch | 24 ++++++++++++ .../ar71xx/patches-3.0/426-mtd_api_wrt400n.patch | 24 ++++++++++++ .../patches-3.0/427-mtd_api_wzr_hp_ag300h.patch | 33 +++++++++++++++++ .../patches-3.0/428-mtd_api_wzr_hp_g300nh.patch | 25 +++++++++++++ .../ar71xx/patches-3.0/429-mtd_api_zcn_1523h.patch | 24 ++++++++++++ 29 files changed, 710 insertions(+), 0 deletions(-) create mode 100644 target/linux/ar71xx/patches-3.0/401-mtd_api_ap81.patch create mode 100644 target/linux/ar71xx/patches-3.0/402-mtd_api_ap83.patch create mode 100644 target/linux/ar71xx/patches-3.0/403-mtd_api_ap96.patch create mode 100644 target/linux/ar71xx/patches-3.0/404-mtd_api_ap121.patch create mode 100644 target/linux/ar71xx/patches-3.0/405-mtd_api_db120.patch create mode 100644 target/linux/ar71xx/patches-3.0/406-mtd_api_dir_600_a1.patch create mode 100644 target/linux/ar71xx/patches-3.0/407-mtd_api_dir_615_c1.patch create mode 100644 target/linux/ar71xx/patches-3.0/408-mtd_api_dir_825_b1.patch create mode 100644 target/linux/ar71xx/patches-3.0/409-mtd_api_mzk_w04nu.patch create mode 100644 target/linux/ar71xx/patches-3.0/410-mtd_api_mzk_w300nh.patch create mode 100644 target/linux/ar71xx/patches-3.0/411-mtd_api_nbg460n.patch create mode 100644 target/linux/ar71xx/patches-3.0/412-mtd_api_pb92.patch create mode 100644 target/linux/ar71xx/patches-3.0/413-mtd_api_rb4xx.patch create mode 100644 target/linux/ar71xx/patches-3.0/414-mtd_api_rb750.patch create mode 100644 target/linux/ar71xx/patches-3.0/415-mtd_api_tew_632brp.patch create mode 100644 target/linux/ar71xx/patches-3.0/416-mtd_api_tl_mr3x20.patch create mode 100644 target/linux/ar71xx/patches-3.0/417-mtd_api_tl_wa901nd.patch create mode 100644 target/linux/ar71xx/patches-3.0/418-mtd_api_tl_wa901nd_v2.patch create mode 100644 target/linux/ar71xx/patches-3.0/419-mtd_api_tl_wr1043nd.patch create mode 100644 target/linux/ar71xx/patches-3.0/420-mtd_api_tl_wr741nd.patch create mode 100644 target/linux/ar71xx/patches-3.0/421-mtd_api_tl_wr841n.patch create mode 100644 target/linux/ar71xx/patches-3.0/422-mtd_api_tl_wr941nd.patch create mode 100644 target/linux/ar71xx/patches-3.0/423-mtd_api_wndr3700.patch create mode 100644 target/linux/ar71xx/patches-3.0/424-mtd_api_wnr2000.patch create mode 100644 target/linux/ar71xx/patches-3.0/425-mtd_api_wrt160nl.patch create mode 100644 target/linux/ar71xx/patches-3.0/426-mtd_api_wrt400n.patch create mode 100644 target/linux/ar71xx/patches-3.0/427-mtd_api_wzr_hp_ag300h.patch create mode 100644 target/linux/ar71xx/patches-3.0/428-mtd_api_wzr_hp_g300nh.patch create mode 100644 target/linux/ar71xx/patches-3.0/429-mtd_api_zcn_1523h.patch diff --git a/target/linux/ar71xx/patches-3.0/401-mtd_api_ap81.patch b/target/linux/ar71xx/patches-3.0/401-mtd_api_ap81.patch new file mode 100644 index 0000000..acaa38c --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/401-mtd_api_ap81.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-ap81.c ++++ b/arch/mips/ar71xx/mach-ap81.c +@@ -33,7 +33,6 @@ + #define AP81_KEYS_POLL_INTERVAL 20 /* msecs */ + #define AP81_KEYS_DEBOUNCE_INTERVAL (3 * AP81_KEYS_POLL_INTERVAL) + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition ap81_partitions[] = { + { + .name = "u-boot", +@@ -59,13 +58,10 @@ static struct mtd_partition ap81_partiti + .mask_flags = MTD_WRITEABLE, + } + }; +-#endif /* CONFIG_MTD_PARTITIONS */ + + static struct flash_platform_data ap81_flash_data = { +-#ifdef CONFIG_MTD_PARTITIONS + .parts = ap81_partitions, + .nr_parts = ARRAY_SIZE(ap81_partitions), +-#endif + }; + + static struct gpio_led ap81_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/patches-3.0/402-mtd_api_ap83.patch b/target/linux/ar71xx/patches-3.0/402-mtd_api_ap83.patch new file mode 100644 index 0000000..0d5a279 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/402-mtd_api_ap83.patch @@ -0,0 +1,25 @@ +--- a/arch/mips/ar71xx/mach-ap83.c ++++ b/arch/mips/ar71xx/mach-ap83.c +@@ -41,7 +41,6 @@ + #define AP83_KEYS_POLL_INTERVAL 20 /* msecs */ + #define AP83_KEYS_DEBOUNCE_INTERVAL (3 * AP83_KEYS_POLL_INTERVAL) + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition ap83_flash_partitions[] = { + { + .name = "u-boot", +@@ -72,14 +71,11 @@ static struct mtd_partition ap83_flash_p + .size = 0x790000, + } + }; +-#endif /* CONFIG_MTD_PARTITIONS */ + + static struct ar91xx_flash_platform_data ap83_flash_data = { + .width = 2, +-#ifdef CONFIG_MTD_PARTITIONS + .parts = ap83_flash_partitions, + .nr_parts = ARRAY_SIZE(ap83_flash_partitions), +-#endif + }; + + static struct resource ap83_flash_resources[] = { diff --git a/target/linux/ar71xx/patches-3.0/403-mtd_api_ap96.patch b/target/linux/ar71xx/patches-3.0/403-mtd_api_ap96.patch new file mode 100644 index 0000000..6baa07f --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/403-mtd_api_ap96.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-ap96.c ++++ b/arch/mips/ar71xx/mach-ap96.c +@@ -45,7 +45,6 @@ + #define AP96_CALDATA0_OFFSET 0x1000 + #define AP96_CALDATA1_OFFSET 0x5000 + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition ap96_partitions[] = { + { + .name = "uboot", +@@ -72,13 +71,10 @@ static struct mtd_partition ap96_partiti + .mask_flags = MTD_WRITEABLE, + } + }; +-#endif /* CONFIG_MTD_PARTITIONS */ + + static struct flash_platform_data ap96_flash_data = { +-#ifdef CONFIG_MTD_PARTITIONS + .parts = ap96_partitions, + .nr_parts = ARRAY_SIZE(ap96_partitions), +-#endif + }; + + /* diff --git a/target/linux/ar71xx/patches-3.0/404-mtd_api_ap121.patch b/target/linux/ar71xx/patches-3.0/404-mtd_api_ap121.patch new file mode 100644 index 0000000..9d9dc76 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/404-mtd_api_ap121.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-ap121.c ++++ b/arch/mips/ar71xx/mach-ap121.c +@@ -38,7 +38,6 @@ + #define AP121_MINI_GPIO_BTN_JUMPSTART 12 + #define AP121_MINI_GPIO_BTN_RESET 11 + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition ap121_parts[] = { + { + .name = "u-boot", +@@ -108,13 +107,6 @@ static struct mtd_partition ap121_mini_p + + #define ap121_mini_nr_parts ARRAY_SIZE(ap121_parts) + +-#else +-#define ap121_parts NULL +-#define ap121_nr_parts 0 +-#define ap121_mini_parts NULL +-#define ap121_mini_nr_parts 0 +-#endif /* CONFIG_MTD_PARTITIONS */ +- + static struct flash_platform_data ap121_flash_data = { + .parts = ap121_parts, + .nr_parts = ap121_nr_parts, diff --git a/target/linux/ar71xx/patches-3.0/405-mtd_api_db120.patch b/target/linux/ar71xx/patches-3.0/405-mtd_api_db120.patch new file mode 100644 index 0000000..6b1f556 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/405-mtd_api_db120.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-db120.c ++++ b/arch/mips/ar71xx/mach-db120.c +@@ -38,7 +38,6 @@ + #define DB120_KEYS_POLL_INTERVAL 20 /* msecs */ + #define DB120_KEYS_DEBOUNCE_INTERVAL (3 * DB120_KEYS_POLL_INTERVAL) + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition db120_partitions[] = { + { + .name = "u-boot", +@@ -68,13 +67,10 @@ static struct mtd_partition db120_partit + .mask_flags = MTD_WRITEABLE, + } + }; +-#endif /* CONFIG_MTD_PARTITIONS */ + + static struct flash_platform_data db120_flash_data = { +-#ifdef CONFIG_MTD_PARTITIONS + .parts = db120_partitions, + .nr_parts = ARRAY_SIZE(db120_partitions), +-#endif + }; + + static struct gpio_led db120_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/patches-3.0/406-mtd_api_dir_600_a1.patch b/target/linux/ar71xx/patches-3.0/406-mtd_api_dir_600_a1.patch new file mode 100644 index 0000000..13942f4 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/406-mtd_api_dir_600_a1.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-dir-600-a1.c ++++ b/arch/mips/ar71xx/mach-dir-600-a1.c +@@ -34,7 +34,6 @@ + #define DIR_600_A1_NVRAM_ADDR 0x1f030000 + #define DIR_600_A1_NVRAM_SIZE 0x10000 + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition dir_600_a1_partitions[] = { + { + .name = "u-boot", +@@ -69,13 +68,10 @@ static struct mtd_partition dir_600_a1_p + .size = 0x3a0000, + } + }; +-#endif /* CONFIG_MTD_PARTITIONS */ + + static struct flash_platform_data dir_600_a1_flash_data = { +-#ifdef CONFIG_MTD_PARTITIONS + .parts = dir_600_a1_partitions, + .nr_parts = ARRAY_SIZE(dir_600_a1_partitions), +-#endif + }; + + static struct gpio_led dir_600_a1_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/patches-3.0/407-mtd_api_dir_615_c1.patch b/target/linux/ar71xx/patches-3.0/407-mtd_api_dir_615_c1.patch new file mode 100644 index 0000000..f189726 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/407-mtd_api_dir_615_c1.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-dir-615-c1.c ++++ b/arch/mips/ar71xx/mach-dir-615-c1.c +@@ -41,7 +41,6 @@ + #define DIR_615C1_CONFIG_ADDR 0x1f020000 + #define DIR_615C1_CONFIG_SIZE 0x10000 + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition dir_615c1_partitions[] = { + { + .name = "u-boot", +@@ -71,13 +70,10 @@ static struct mtd_partition dir_615c1_pa + .size = 0x3c0000, + } + }; +-#endif /* CONFIG_MTD_PARTITIONS */ + + static struct flash_platform_data dir_615c1_flash_data = { +-#ifdef CONFIG_MTD_PARTITIONS + .parts = dir_615c1_partitions, + .nr_parts = ARRAY_SIZE(dir_615c1_partitions), +-#endif + }; + + static struct gpio_led dir_615c1_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/patches-3.0/408-mtd_api_dir_825_b1.patch b/target/linux/ar71xx/patches-3.0/408-mtd_api_dir_825_b1.patch new file mode 100644 index 0000000..8047c83 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/408-mtd_api_dir_825_b1.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-dir-825-b1.c ++++ b/arch/mips/ar71xx/mach-dir-825-b1.c +@@ -48,7 +48,6 @@ + #define DIR825B1_MAC_LOCATION_0 0x1f66ffa0 + #define DIR825B1_MAC_LOCATION_1 0x1f66ffb4 + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition dir825b1_partitions[] = { + { + .name = "uboot", +@@ -76,13 +75,10 @@ static struct mtd_partition dir825b1_par + .mask_flags = MTD_WRITEABLE, + } + }; +-#endif /* CONFIG_MTD_PARTITIONS */ + + static struct flash_platform_data dir825b1_flash_data = { +-#ifdef CONFIG_MTD_PARTITIONS + .parts = dir825b1_partitions, + .nr_parts = ARRAY_SIZE(dir825b1_partitions), +-#endif + }; + + static struct gpio_led dir825b1_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/patches-3.0/409-mtd_api_mzk_w04nu.patch b/target/linux/ar71xx/patches-3.0/409-mtd_api_mzk_w04nu.patch new file mode 100644 index 0000000..6edf194 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/409-mtd_api_mzk_w04nu.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-mzk-w04nu.c ++++ b/arch/mips/ar71xx/mach-mzk-w04nu.c +@@ -35,7 +35,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", +@@ -65,13 +64,10 @@ static struct mtd_partition mzk_w04nu_pa + .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 = { diff --git a/target/linux/ar71xx/patches-3.0/410-mtd_api_mzk_w300nh.patch b/target/linux/ar71xx/patches-3.0/410-mtd_api_mzk_w300nh.patch new file mode 100644 index 0000000..b1755a5 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/410-mtd_api_mzk_w300nh.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-mzk-w300nh.c ++++ b/arch/mips/ar71xx/mach-mzk-w300nh.c +@@ -34,7 +34,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", +@@ -64,13 +63,10 @@ static struct mtd_partition mzk_w300nh_p + .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 = { diff --git a/target/linux/ar71xx/patches-3.0/411-mtd_api_nbg460n.patch b/target/linux/ar71xx/patches-3.0/411-mtd_api_nbg460n.patch new file mode 100644 index 0000000..29ea93d --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/411-mtd_api_nbg460n.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-nbg460n.c ++++ b/arch/mips/ar71xx/mach-nbg460n.c +@@ -50,7 +50,6 @@ + #define NBG460N_GPIO_RTL8366_SDA 16 + #define NBG460N_GPIO_RTL8366_SCK 18 + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition nbg460n_partitions[] = { + { + .name = "Bootbase", +@@ -84,13 +83,10 @@ static struct mtd_partition nbg460n_part + .size = 0x380000, + } + }; +-#endif /* CONFIG_MTD_PARTITIONS */ + + static struct flash_platform_data nbg460n_flash_data = { +-#ifdef CONFIG_MTD_PARTITIONS + .parts = nbg460n_partitions, + .nr_parts = ARRAY_SIZE(nbg460n_partitions), +-#endif + }; + + static struct gpio_led nbg460n_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/patches-3.0/412-mtd_api_pb92.patch b/target/linux/ar71xx/patches-3.0/412-mtd_api_pb92.patch new file mode 100644 index 0000000..3f895e5 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/412-mtd_api_pb92.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-pb92.c ++++ b/arch/mips/ar71xx/mach-pb92.c +@@ -21,7 +21,6 @@ + #include "dev-pb9x-pci.h" + #include "dev-usb.h" + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition pb92_partitions[] = { + { + .name = "u-boot", +@@ -47,13 +46,10 @@ static struct mtd_partition pb92_partiti + .mask_flags = MTD_WRITEABLE, + } + }; +-#endif /* CONFIG_MTD_PARTITIONS */ + + static struct flash_platform_data pb92_flash_data = { +-#ifdef CONFIG_MTD_PARTITIONS + .parts = pb92_partitions, + .nr_parts = ARRAY_SIZE(pb92_partitions), +-#endif + }; + + #define PB92_KEYS_POLL_INTERVAL 20 /* msecs */ diff --git a/target/linux/ar71xx/patches-3.0/413-mtd_api_rb4xx.patch b/target/linux/ar71xx/patches-3.0/413-mtd_api_rb4xx.patch new file mode 100644 index 0000000..471d65b --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/413-mtd_api_rb4xx.patch @@ -0,0 +1,38 @@ +--- a/arch/mips/ar71xx/mach-rb4xx.c ++++ b/arch/mips/ar71xx/mach-rb4xx.c +@@ -110,7 +110,6 @@ static struct ar71xx_pci_irq rb4xx_pci_i + } + }; + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition rb4xx_partitions[] = { + { + .name = "routerboot", +@@ -134,10 +133,6 @@ static struct mtd_partition rb4xx_partit + } + }; + #define rb4xx_num_partitions ARRAY_SIZE(rb4xx_partitions) +-#else /* CONFIG_MTD_PARTITIONS */ +-#define rb4xx_partitions NULL +-#define rb4xx_num_partitions 0 +-#endif /* CONFIG_MTD_PARTITIONS */ + + static struct flash_platform_data rb4xx_flash_data = { + .type = "pm25lv512", +--- a/drivers/mtd/nand/rb4xx_nand.c ++++ b/drivers/mtd/nand/rb4xx_nand.c +@@ -238,12 +238,8 @@ static int __init rb4xx_nand_probe(struc + goto err_set_drvdata; + } + +-#ifdef CONFIG_MTD_PARTITIONS +- ret = add_mtd_partitions(&info->mtd, rb4xx_nand_partitions, +- ARRAY_SIZE(rb4xx_nand_partitions)); +-#else +- ret = add_mtd_device(&info->mtd); +-#endif ++ ret = mtd_device_register(&info->mtd, rb4xx_nand_partitions, ++ ARRAY_SIZE(rb4xx_nand_partitions)); + if (ret) + goto err_release_nand; + diff --git a/target/linux/ar71xx/patches-3.0/414-mtd_api_rb750.patch b/target/linux/ar71xx/patches-3.0/414-mtd_api_rb750.patch new file mode 100644 index 0000000..e6b8d51 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/414-mtd_api_rb750.patch @@ -0,0 +1,17 @@ +--- a/drivers/mtd/nand/rb750_nand.c ++++ b/drivers/mtd/nand/rb750_nand.c +@@ -306,12 +306,8 @@ static int __init rb750_nand_probe(struc + goto err_set_drvdata; + } + +-#ifdef CONFIG_MTD_PARTITIONS +- ret = add_mtd_partitions(&info->mtd, rb750_nand_partitions, +- ARRAY_SIZE(rb750_nand_partitions)); +-#else +- ret = add_mtd_device(&info->mtd); +-#endif ++ ret = mtd_device_register(&info->mtd, rb750_nand_partitions, ++ ARRAY_SIZE(rb750_nand_partitions)); + if (ret) + goto err_release_nand; + diff --git a/target/linux/ar71xx/patches-3.0/415-mtd_api_tew_632brp.patch b/target/linux/ar71xx/patches-3.0/415-mtd_api_tew_632brp.patch new file mode 100644 index 0000000..52f4aea --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/415-mtd_api_tew_632brp.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-tew-632brp.c ++++ b/arch/mips/ar71xx/mach-tew-632brp.c +@@ -34,7 +34,6 @@ + #define TEW_632BRP_CONFIG_ADDR 0x1f020000 + #define TEW_632BRP_CONFIG_SIZE 0x10000 + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition tew_632brp_partitions[] = { + { + .name = "u-boot", +@@ -64,13 +63,10 @@ static struct mtd_partition tew_632brp_p + .size = 0x3c0000, + } + }; +-#endif /* CONFIG_MTD_PARTITIONS */ + + static struct flash_platform_data tew_632brp_flash_data = { +-#ifdef CONFIG_MTD_PARTITIONS + .parts = tew_632brp_partitions, + .nr_parts = ARRAY_SIZE(tew_632brp_partitions), +-#endif + }; + + static struct gpio_led tew_632brp_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/patches-3.0/416-mtd_api_tl_mr3x20.patch b/target/linux/ar71xx/patches-3.0/416-mtd_api_tl_mr3x20.patch new file mode 100644 index 0000000..0d713f1 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/416-mtd_api_tl_mr3x20.patch @@ -0,0 +1,21 @@ +--- a/arch/mips/ar71xx/mach-tl-mr3x20.c ++++ b/arch/mips/ar71xx/mach-tl-mr3x20.c +@@ -34,7 +34,6 @@ + #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", +@@ -61,10 +60,6 @@ static struct mtd_partition tl_mr3x20_pa + } + }; + #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, diff --git a/target/linux/ar71xx/patches-3.0/417-mtd_api_tl_wa901nd.patch b/target/linux/ar71xx/patches-3.0/417-mtd_api_tl_wa901nd.patch new file mode 100644 index 0000000..72d8ebf --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/417-mtd_api_tl_wa901nd.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-tl-wa901nd.c ++++ b/arch/mips/ar71xx/mach-tl-wa901nd.c +@@ -30,7 +30,6 @@ + #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", +@@ -56,13 +55,10 @@ static struct mtd_partition tl_wa901nd_p + .size = 0x3d0000, + } + }; +-#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 + }; + + static struct gpio_led tl_wa901nd_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/patches-3.0/418-mtd_api_tl_wa901nd_v2.patch b/target/linux/ar71xx/patches-3.0/418-mtd_api_tl_wa901nd_v2.patch new file mode 100644 index 0000000..890a40f --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/418-mtd_api_tl_wa901nd_v2.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-tl-wa901nd-v2.c ++++ b/arch/mips/ar71xx/mach-tl-wa901nd-v2.c +@@ -33,7 +33,6 @@ + #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", +@@ -59,13 +58,10 @@ static struct mtd_partition tl_wa901nd_v + .size = 0x3d0000, + } + }; +-#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 + }; + + static struct gpio_led tl_wa901nd_v2_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/patches-3.0/419-mtd_api_tl_wr1043nd.patch b/target/linux/ar71xx/patches-3.0/419-mtd_api_tl_wr1043nd.patch new file mode 100644 index 0000000..b641ab7 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/419-mtd_api_tl_wr1043nd.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-tl-wr1043nd.c ++++ b/arch/mips/ar71xx/mach-tl-wr1043nd.c +@@ -36,7 +36,6 @@ + #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", +@@ -62,13 +61,10 @@ static struct mtd_partition tl_wr1043nd_ + .size = 0x7d0000, + } + }; +-#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 + }; + + static struct gpio_led tl_wr1043nd_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/patches-3.0/420-mtd_api_tl_wr741nd.patch b/target/linux/ar71xx/patches-3.0/420-mtd_api_tl_wr741nd.patch new file mode 100644 index 0000000..405a592 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/420-mtd_api_tl_wr741nd.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-tl-wr741nd.c ++++ b/arch/mips/ar71xx/mach-tl-wr741nd.c +@@ -29,7 +29,6 @@ + #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", +@@ -55,13 +54,10 @@ static struct mtd_partition tl_wr741nd_p + .size = 0x3d0000, + } + }; +-#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 + }; + + static struct gpio_led tl_wr741nd_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/patches-3.0/421-mtd_api_tl_wr841n.patch b/target/linux/ar71xx/patches-3.0/421-mtd_api_tl_wr841n.patch new file mode 100644 index 0000000..4624eb1 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/421-mtd_api_tl_wr841n.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-tl-wr841n.c ++++ b/arch/mips/ar71xx/mach-tl-wr841n.c +@@ -33,7 +33,6 @@ + #define TL_WR841ND_V1_KEYS_DEBOUNCE_INTERVAL \ + (3 * TL_WR841ND_V1_KEYS_POLL_INTERVAL) + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition tl_wr841n_v1_partitions[] = { + { + .name = "redboot", +@@ -59,13 +58,10 @@ static struct mtd_partition tl_wr841n_v1 + .size = 0x3c0000, + } + }; +-#endif /* CONFIG_MTD_PARTITIONS */ + + static struct flash_platform_data tl_wr841n_v1_flash_data = { +-#ifdef CONFIG_MTD_PARTITIONS + .parts = tl_wr841n_v1_partitions, + .nr_parts = ARRAY_SIZE(tl_wr841n_v1_partitions), +-#endif + }; + + static struct gpio_led tl_wr841n_v1_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/patches-3.0/422-mtd_api_tl_wr941nd.patch b/target/linux/ar71xx/patches-3.0/422-mtd_api_tl_wr941nd.patch new file mode 100644 index 0000000..20b4962 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/422-mtd_api_tl_wr941nd.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-tl-wr941nd.c ++++ b/arch/mips/ar71xx/mach-tl-wr941nd.c +@@ -33,7 +33,6 @@ + #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", +@@ -59,13 +58,10 @@ static struct mtd_partition tl_wr941nd_p + .size = 0x3d0000, + } + }; +-#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 + }; + + static struct gpio_led tl_wr941nd_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/patches-3.0/423-mtd_api_wndr3700.patch b/target/linux/ar71xx/patches-3.0/423-mtd_api_wndr3700.patch new file mode 100644 index 0000000..5cc5799 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/423-mtd_api_wndr3700.patch @@ -0,0 +1,23 @@ +--- a/arch/mips/ar71xx/mach-wndr3700.c ++++ b/arch/mips/ar71xx/mach-wndr3700.c +@@ -49,7 +49,6 @@ + #define WNDR3700_CALDATA0_OFFSET 0x1000 + #define WNDR3700_CALDATA1_OFFSET 0x5000 + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition wndr3700_partitions[] = { + { + .name = "uboot", +@@ -147,12 +146,6 @@ static struct mtd_partition wndr3700v2_p + }; + #define wndr3700_num_partitions ARRAY_SIZE(wndr3700_partitions) + #define wndr3700v2_num_partitions ARRAY_SIZE(wndr3700v2_partitions) +-#else +-#define wndr3700_partitions NULL +-#define wndr3700_num_partitions 0 +-#define wndr3700v2_partitions NULL +-#define wndr3700v2_num_partitions 0 +-#endif /* CONFIG_MTD_PARTITIONS */ + + static struct flash_platform_data wndr3700_flash_data; + diff --git a/target/linux/ar71xx/patches-3.0/424-mtd_api_wnr2000.patch b/target/linux/ar71xx/patches-3.0/424-mtd_api_wnr2000.patch new file mode 100644 index 0000000..b55fb35 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/424-mtd_api_wnr2000.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-wnr2000.c ++++ b/arch/mips/ar71xx/mach-wnr2000.c +@@ -32,7 +32,6 @@ + #define WNR2000_KEYS_POLL_INTERVAL 20 /* msecs */ + #define WNR2000_KEYS_DEBOUNCE_INTERVAL (3 * WNR2000_KEYS_POLL_INTERVAL) + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition wnr2000_partitions[] = { + { + .name = "u-boot", +@@ -70,13 +69,10 @@ static struct mtd_partition wnr2000_part + .mask_flags = MTD_WRITEABLE, + } + }; +-#endif /* CONFIG_MTD_PARTITIONS */ + + static struct flash_platform_data wnr2000_flash_data = { +-#ifdef CONFIG_MTD_PARTITIONS + .parts = wnr2000_partitions, + .nr_parts = ARRAY_SIZE(wnr2000_partitions), +-#endif + }; + + static struct gpio_led wnr2000_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/patches-3.0/425-mtd_api_wrt160nl.patch b/target/linux/ar71xx/patches-3.0/425-mtd_api_wrt160nl.patch new file mode 100644 index 0000000..9a4a9b2 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/425-mtd_api_wrt160nl.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-wrt160nl.c ++++ b/arch/mips/ar71xx/mach-wrt160nl.c +@@ -36,7 +36,6 @@ + #define WRT160NL_NVRAM_ADDR 0x1f7e0000 + #define WRT160NL_NVRAM_SIZE 0x10000 + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition wrt160nl_partitions[] = { + { + .name = "u-boot", +@@ -67,13 +66,10 @@ static struct mtd_partition wrt160nl_par + .size = 0x7a0000, + } + }; +-#endif /* CONFIG_MTD_PARTITIONS */ + + static struct flash_platform_data wrt160nl_flash_data = { +-#ifdef CONFIG_MTD_PARTITIONS + .parts = wrt160nl_partitions, + .nr_parts = ARRAY_SIZE(wrt160nl_partitions), +-#endif + }; + + static struct gpio_led wrt160nl_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/patches-3.0/426-mtd_api_wrt400n.patch b/target/linux/ar71xx/patches-3.0/426-mtd_api_wrt400n.patch new file mode 100644 index 0000000..531f88f --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/426-mtd_api_wrt400n.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-wrt400n.c ++++ b/arch/mips/ar71xx/mach-wrt400n.c +@@ -36,7 +36,6 @@ + #define WRT400N_CALDATA0_OFFSET 0x1000 + #define WRT400N_CALDATA1_OFFSET 0x5000 + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition wrt400n_partitions[] = { + { + .name = "uboot", +@@ -82,13 +81,10 @@ static struct mtd_partition wrt400n_part + .size = 0x770000, + } + }; +-#endif /* CONFIG_MTD_PARTITIONS */ + + static struct flash_platform_data wrt400n_flash_data = { +-#ifdef CONFIG_MTD_PARTITIONS + .parts = wrt400n_partitions, + .nr_parts = ARRAY_SIZE(wrt400n_partitions), +-#endif + }; + + static struct gpio_led wrt400n_leds_gpio[] __initdata = { diff --git a/target/linux/ar71xx/patches-3.0/427-mtd_api_wzr_hp_ag300h.patch b/target/linux/ar71xx/patches-3.0/427-mtd_api_wzr_hp_ag300h.patch new file mode 100644 index 0000000..3cc70e2 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/427-mtd_api_wzr_hp_ag300h.patch @@ -0,0 +1,33 @@ +--- a/arch/mips/ar71xx/mach-wzr-hp-ag300h.c ++++ b/arch/mips/ar71xx/mach-wzr-hp-ag300h.c +@@ -29,7 +29,6 @@ + #define WZRHPAG300H_KEYS_POLL_INTERVAL 20 /* msecs */ + #define WZRHPAG300H_KEYS_DEBOUNCE_INTERVAL (3 * WZRHPAG300H_KEYS_POLL_INTERVAL) + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition wzrhpag300h_flash_partitions[] = { + { + .name = "u-boot", +@@ -66,8 +65,6 @@ static struct mtd_partition wzrhpag300h_ + } + }; + +-#endif /* CONFIG_MTD_PARTITIONS */ +- + static struct mtd_info *concat_devs[2] = { NULL, NULL }; + static struct work_struct mtd_concat_work; + +@@ -77,12 +74,8 @@ static void mtd_concat_add_work(struct w + + mtd = mtd_concat_create(concat_devs, ARRAY_SIZE(concat_devs), "flash"); + +-#ifdef CONFIG_MTD_PARTITIONS +- add_mtd_partitions(mtd, wzrhpag300h_flash_partitions, ++ mtd_device_register(mtd, wzrhpag300h_flash_partitions, + ARRAY_SIZE(wzrhpag300h_flash_partitions)); +-#else +- add_mtd_device(mtd); +-#endif + } + + static void mtd_concat_add(struct mtd_info *mtd) diff --git a/target/linux/ar71xx/patches-3.0/428-mtd_api_wzr_hp_g300nh.patch b/target/linux/ar71xx/patches-3.0/428-mtd_api_wzr_hp_g300nh.patch new file mode 100644 index 0000000..a30c1e2 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/428-mtd_api_wzr_hp_g300nh.patch @@ -0,0 +1,25 @@ +--- a/arch/mips/ar71xx/mach-wzr-hp-g300nh.c ++++ b/arch/mips/ar71xx/mach-wzr-hp-g300nh.c +@@ -53,7 +53,6 @@ + + #define WZRHPG300NH_MAC_OFFSET 0x20c + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition wzrhpg300nh_flash_partitions[] = { + { + .name = "u-boot", +@@ -89,14 +88,11 @@ static struct mtd_partition wzrhpg300nh_ + .size = 0x1f60000, + } + }; +-#endif /* CONFIG_MTD_PARTITIONS */ + + static struct ar91xx_flash_platform_data wzrhpg300nh_flash_data = { + .width = 2, +-#ifdef CONFIG_MTD_PARTITIONS + .parts = wzrhpg300nh_flash_partitions, + .nr_parts = ARRAY_SIZE(wzrhpg300nh_flash_partitions), +-#endif + }; + + #define WZRHPG300NH_FLASH_BASE 0x1e000000 diff --git a/target/linux/ar71xx/patches-3.0/429-mtd_api_zcn_1523h.patch b/target/linux/ar71xx/patches-3.0/429-mtd_api_zcn_1523h.patch new file mode 100644 index 0000000..6e886f8 --- /dev/null +++ b/target/linux/ar71xx/patches-3.0/429-mtd_api_zcn_1523h.patch @@ -0,0 +1,24 @@ +--- a/arch/mips/ar71xx/mach-zcn-1523h.c ++++ b/arch/mips/ar71xx/mach-zcn-1523h.c +@@ -37,7 +37,6 @@ + #define ZCN_1523H_KEYS_POLL_INTERVAL 20 /* msecs */ + #define ZCN_1523H_KEYS_DEBOUNCE_INTERVAL (3 * ZCN_1523H_KEYS_POLL_INTERVAL) + +-#ifdef CONFIG_MTD_PARTITIONS + static struct mtd_partition zcn_1523h_partitions[] = { + { + .name = "u-boot", +@@ -78,13 +77,10 @@ static struct mtd_partition zcn_1523h_pa + .size = 0x780000, + } + }; +-#endif /* CONFIG_MTD_PARTITIONS */ + + static struct flash_platform_data zcn_1523h_flash_data = { +-#ifdef CONFIG_MTD_PARTITIONS + .parts = zcn_1523h_partitions, + .nr_parts = ARRAY_SIZE(zcn_1523h_partitions), +-#endif + }; + + static struct gpio_keys_button zcn_1523h_gpio_keys[] __initdata = { -- 1.7.2.5 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel