diff options
author | Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 2008-07-11 22:34:48 +0900 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-07-15 18:44:38 +0100 |
commit | 9528356308ecd2fb6368472615996a8602c02964 (patch) | |
tree | 1aa9e5909275eae0b373158bbbc75298b48bf955 /arch/mips | |
parent | 7b22609442a32050e37cec5f6735376af61e68a1 (diff) | |
download | kernel_samsung_aries-9528356308ecd2fb6368472615996a8602c02964.zip kernel_samsung_aries-9528356308ecd2fb6368472615996a8602c02964.tar.gz kernel_samsung_aries-9528356308ecd2fb6368472615996a8602c02964.tar.bz2 |
[MIPS] MTX-1 flash partition setup move to platform devices registration
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Acked-By: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/au1000/mtx-1/platform.c | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/arch/mips/au1000/mtx-1/platform.c b/arch/mips/au1000/mtx-1/platform.c index 9807be3..8b5914d 100644 --- a/arch/mips/au1000/mtx-1/platform.c +++ b/arch/mips/au1000/mtx-1/platform.c @@ -24,6 +24,9 @@ #include <linux/gpio.h> #include <linux/gpio_keys.h> #include <linux/input.h> +#include <linux/mtd/partitions.h> +#include <linux/mtd/physmap.h> +#include <mtd/mtd-abi.h> static struct gpio_keys_button mtx1_gpio_button[] = { { @@ -85,10 +88,56 @@ static struct platform_device mtx1_gpio_leds = { } }; +static struct mtd_partition mtx1_mtd_partitions[] = { + { + .name = "filesystem", + .size = 0x01C00000, + .offset = 0, + }, + { + .name = "yamon", + .size = 0x00100000, + .offset = MTDPART_OFS_APPEND, + .mask_flags = MTD_WRITEABLE, + }, + { + .name = "kernel", + .size = 0x002c0000, + .offset = MTDPART_OFS_APPEND, + }, + { + .name = "yamon env", + .size = 0x00040000, + .offset = MTDPART_OFS_APPEND, + }, +}; + +static struct physmap_flash_data mtx1_flash_data = { + .width = 4, + .nr_parts = 4, + .parts = mtx1_mtd_partitions, +}; + +static struct resource mtx1_mtd_resource = { + .start = 0x1e000000, + .end = 0x1fffffff, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device mtx1_mtd = { + .name = "physmap-flash", + .dev = { + .platform_data = &mtx1_flash_data, + }, + .num_resources = 1, + .resource = &mtx1_mtd_resource, +}; + static struct __initdata platform_device * mtx1_devs[] = { &mtx1_gpio_leds, &mtx1_wdt, - &mtx1_button + &mtx1_button, + &mtx1_mtd, }; static int __init mtx1_register_devices(void) |