summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2008-09-18 12:38:53 +0000
committerGabor Juhos <juhosg@openwrt.org>2008-09-18 12:38:53 +0000
commitd590c14151eb8f39676afb47c276801095bc7107 (patch)
tree0477bc87fdd05893e2665d59f0665af2747be97a /target/linux
parent40f6992324064e38b538ee55b405ecb77042c85d (diff)
downloadmtk-20170518-d590c14151eb8f39676afb47c276801095bc7107.zip
mtk-20170518-d590c14151eb8f39676afb47c276801095bc7107.tar.gz
mtk-20170518-d590c14151eb8f39676afb47c276801095bc7107.tar.bz2
WP543: add static mtd partitions
SVN-Revision: 12624
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c
index 9044011..4abecd8 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c
@@ -10,6 +10,8 @@
*/
#include <linux/platform_device.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
#include <linux/input.h>
@@ -29,8 +31,30 @@
#define WP543_BUTTONS_POLL_INTERVAL 20
+#ifdef CONFIG_MTD_PARTITIONS
+static struct mtd_partition wp543_partitions[] = {
+ {
+ .name = "myloader",
+ .offset = 0,
+ .size = 0x20000,
+ .mask_flags = MTD_WRITEABLE,
+ } , {
+ .name = "kernel",
+ .offset = 0x30000,
+ .size = 0xd0000,
+ } , {
+ .name = "rootfs",
+ .offset = 0x100000,
+ .size = 0x100000,
+ }
+};
+#endif /* CONFIG_MTD_PARTITIONS */
+
static struct flash_platform_data wp543_flash_data = {
- /* TODO: add partition map */
+#ifdef CONFIG_MTD_PARTITIONS
+ .parts = wp543_partitions,
+ .nr_parts = ARRAY_SIZE(wp543_partitions),
+#endif
};
static struct spi_board_info wp543_spi_info[] = {