|
|
@ -8,8 +8,6 @@ |
|
|
|
* by the Free Software Foundation. |
|
|
|
* by the Free Software Foundation. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
#include <linux/mtd/mtd.h> |
|
|
|
|
|
|
|
#include <linux/mtd/partitions.h> |
|
|
|
|
|
|
|
#include <linux/platform_device.h> |
|
|
|
#include <linux/platform_device.h> |
|
|
|
#include <linux/rtl8366.h> |
|
|
|
#include <linux/rtl8366.h> |
|
|
|
#include <asm/mach-ar71xx/ar71xx.h> |
|
|
|
#include <asm/mach-ar71xx/ar71xx.h> |
|
|
@ -36,39 +34,13 @@ |
|
|
|
#define TL_WR1043ND_KEYS_POLL_INTERVAL 20 /* msecs */ |
|
|
|
#define TL_WR1043ND_KEYS_POLL_INTERVAL 20 /* msecs */ |
|
|
|
#define TL_WR1043ND_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR1043ND_KEYS_POLL_INTERVAL) |
|
|
|
#define TL_WR1043ND_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR1043ND_KEYS_POLL_INTERVAL) |
|
|
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_MTD_PARTITIONS |
|
|
|
static const char *tl_wr1043nd_part_probes[] = { |
|
|
|
static struct mtd_partition tl_wr1043nd_partitions[] = { |
|
|
|
"tp-link", |
|
|
|
{ |
|
|
|
NULL, |
|
|
|
.name = "u-boot", |
|
|
|
|
|
|
|
.offset = 0, |
|
|
|
|
|
|
|
.size = 0x020000, |
|
|
|
|
|
|
|
.mask_flags = MTD_WRITEABLE, |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
.name = "kernel", |
|
|
|
|
|
|
|
.offset = 0x020000, |
|
|
|
|
|
|
|
.size = 0x140000, |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
.name = "rootfs", |
|
|
|
|
|
|
|
.offset = 0x160000, |
|
|
|
|
|
|
|
.size = 0x690000, |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
.name = "art", |
|
|
|
|
|
|
|
.offset = 0x7f0000, |
|
|
|
|
|
|
|
.size = 0x010000, |
|
|
|
|
|
|
|
.mask_flags = MTD_WRITEABLE, |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
.name = "firmware", |
|
|
|
|
|
|
|
.offset = 0x020000, |
|
|
|
|
|
|
|
.size = 0x7d0000, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
#endif /* CONFIG_MTD_PARTITIONS */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static struct flash_platform_data tl_wr1043nd_flash_data = { |
|
|
|
static struct flash_platform_data tl_wr1043nd_flash_data = { |
|
|
|
#ifdef CONFIG_MTD_PARTITIONS |
|
|
|
.part_probes = tl_wr1043nd_part_probes, |
|
|
|
.parts = tl_wr1043nd_partitions, |
|
|
|
|
|
|
|
.nr_parts = ARRAY_SIZE(tl_wr1043nd_partitions), |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
static struct gpio_led tl_wr1043nd_leds_gpio[] __initdata = { |
|
|
|
static struct gpio_led tl_wr1043nd_leds_gpio[] __initdata = { |
|
|
|