summaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c14
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-eap7660d.c11
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-ja76pf.c11
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-jwap003.c11
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c11
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c11
-rw-r--r--target/linux/ar71xx/patches-2.6.39/104-mtd_m25p80_add_redboot_parser.patch18
7 files changed, 60 insertions, 27 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c
index e99536c91..54dc96c71 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c
@@ -9,9 +9,6 @@
* by the Free Software Foundation.
*/
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-
#include <asm/mips_machine.h>
#include <asm/mach-ar71xx/ar71xx.h>
@@ -76,6 +73,15 @@ static struct gpio_keys_button aw_nr580_gpio_keys[] __initdata = {
}
};
+static const char *aw_nr580_part_probes[] = {
+ "RedBoot",
+ NULL,
+};
+
+static struct flash_platform_data aw_nr580_flash_data = {
+ .part_probes = aw_nr580_part_probes,
+};
+
static void __init aw_nr580_setup(void)
{
ar71xx_add_device_mdio(0, 0x0);
@@ -88,7 +94,7 @@ static void __init aw_nr580_setup(void)
pb42_pci_init();
- ar71xx_add_device_m25p80(NULL);
+ ar71xx_add_device_m25p80(&aw_nr580_flash_data);
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(aw_nr580_leds_gpio),
aw_nr580_leds_gpio);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-eap7660d.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-eap7660d.c
index 230bf78ed..d1e49eef0 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-eap7660d.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-eap7660d.c
@@ -153,6 +153,15 @@ static struct gpio_keys_button eap7660d_gpio_keys[] __initdata = {
}
};
+static const char *eap7660d_part_probes[] = {
+ "RedBoot",
+ NULL,
+};
+
+static struct flash_platform_data eap7660d_flash_data = {
+ .part_probes = eap7660d_part_probes,
+};
+
static void __init eap7660d_setup(void)
{
u8 *boardconfig = (u8 *) KSEG1ADDR(EAP7660D_BOARDCONFIG);
@@ -164,7 +173,7 @@ static void __init eap7660d_setup(void)
ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
ar71xx_eth0_data.phy_mask = EAP7660D_PHYMASK;
ar71xx_add_device_eth(0);
- ar71xx_add_device_m25p80(NULL);
+ ar71xx_add_device_m25p80(&eap7660d_flash_data);
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(eap7660d_leds_gpio),
eap7660d_leds_gpio);
ar71xx_register_gpio_keys_polled(-1, EAP7660D_KEYS_POLL_INTERVAL,
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ja76pf.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ja76pf.c
index 0e21fdb58..e972a1bdc 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ja76pf.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ja76pf.c
@@ -65,13 +65,22 @@ static struct platform_device ja76pf_i2c_gpio_device = {
}
};
+static const char *ja76pf_part_probes[] = {
+ "RedBoot",
+ NULL,
+};
+
+static struct flash_platform_data ja76pf_flash_data = {
+ .part_probes = ja76pf_part_probes,
+};
+
#define JA76PF_WAN_PHYMASK (1 << 4)
#define JA76PF_LAN_PHYMASK ((1 << 0) | (1 << 1) | (1 << 2) | (1 < 3))
#define JA76PF_MDIO_PHYMASK (JA76PF_LAN_PHYMASK | JA76PF_WAN_PHYMASK)
static void __init ja76pf_init(void)
{
- ar71xx_add_device_m25p80(NULL);
+ ar71xx_add_device_m25p80(&ja76pf_flash_data);
ar71xx_add_device_mdio(0, ~JA76PF_MDIO_PHYMASK);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-jwap003.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-jwap003.c
index d64203187..7d85ba17f 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-jwap003.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-jwap003.c
@@ -46,12 +46,21 @@ static struct platform_device jwap003_i2c_gpio_device = {
}
};
+static const char *jwap003_part_probes[] = {
+ "RedBoot",
+ NULL,
+};
+
+static struct flash_platform_data jwap003_flash_data = {
+ .part_probes = jwap003_part_probes,
+};
+
#define JWAP003_WAN_PHYMASK BIT(0)
#define JWAP003_LAN_PHYMASK BIT(4)
static void __init jwap003_init(void)
{
- ar71xx_add_device_m25p80(NULL);
+ ar71xx_add_device_m25p80(&jwap003_flash_data);
ar71xx_add_device_mdio(0, 0x0);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c
index b3858545f..1a3d8c51a 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c
@@ -42,13 +42,22 @@ static struct gpio_keys_button pb42_gpio_keys[] __initdata = {
}
};
+static const char *pb42_part_probes[] = {
+ "RedBoot",
+ NULL,
+};
+
+static struct flash_platform_data pb42_flash_data = {
+ .part_probes = pb42_part_probes,
+};
+
#define PB42_WAN_PHYMASK BIT(20)
#define PB42_LAN_PHYMASK (BIT(16) | BIT(17) | BIT(18) | BIT(19))
#define PB42_MDIO_PHYMASK (PB42_LAN_PHYMASK | PB42_WAN_PHYMASK)
static void __init pb42_init(void)
{
- ar71xx_add_device_m25p80(NULL);
+ ar71xx_add_device_m25p80(&pb42_flash_data);
ar71xx_add_device_mdio(0, ~PB42_MDIO_PHYMASK);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
index ab399f6f1..1d8af0ccc 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
@@ -123,9 +123,18 @@ static struct gpio_keys_button ubnt_m_gpio_keys[] __initdata = {
}
};
+static const char *ubnt_part_probes[] = {
+ "RedBoot",
+ NULL,
+};
+
+static struct flash_platform_data ubnt_flash_data = {
+ .part_probes = ubnt_part_probes,
+};
+
static void __init ubnt_generic_setup(void)
{
- ar71xx_add_device_m25p80(NULL);
+ ar71xx_add_device_m25p80(&ubnt_flash_data);
ar71xx_register_gpio_keys_polled(-1, UBNT_KEYS_POLL_INTERVAL,
ARRAY_SIZE(ubnt_gpio_keys),
diff --git a/target/linux/ar71xx/patches-2.6.39/104-mtd_m25p80_add_redboot_parser.patch b/target/linux/ar71xx/patches-2.6.39/104-mtd_m25p80_add_redboot_parser.patch
deleted file mode 100644
index d9139237a..000000000
--- a/target/linux/ar71xx/patches-2.6.39/104-mtd_m25p80_add_redboot_parser.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/drivers/mtd/devices/m25p80.c
-+++ b/drivers/mtd/devices/m25p80.c
-@@ -972,6 +972,15 @@ static int __devinit m25p_probe(struct s
- nr_parts = parse_mtd_partitions(&flash->mtd,
- data->part_probes, &parts, 0);
-
-+#ifdef CONFIG_MTD_REDBOOT_PARTS
-+ if (nr_parts <= 0) {
-+ static const char *part_probes[]
-+ = { "RedBoot", NULL, };
-+
-+ nr_parts = parse_mtd_partitions(&flash->mtd,
-+ part_probes, &parts, 0);
-+ }
-+#endif
- if (nr_parts <= 0 && data && data->parts) {
- parts = data->parts;
- nr_parts = data->nr_parts;