aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/au1000
diff options
context:
space:
mode:
authorYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>2008-07-11 09:34:48 -0400
committerRalf Baechle <ralf@linux-mips.org>2008-07-15 13:44:38 -0400
commit9528356308ecd2fb6368472615996a8602c02964 (patch)
tree1aa9e5909275eae0b373158bbbc75298b48bf955 /arch/mips/au1000
parent7b22609442a32050e37cec5f6735376af61e68a1 (diff)
[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/au1000')
-rw-r--r--arch/mips/au1000/mtx-1/platform.c51
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 9807be37c32f..8b5914d1241f 100644
--- a/arch/mips/au1000/mtx-1/platform.c
+++ b/arch/mips/au1000/mtx-1/platform.c
@@ -24,6 +24,9 @@
24#include <linux/gpio.h> 24#include <linux/gpio.h>
25#include <linux/gpio_keys.h> 25#include <linux/gpio_keys.h>
26#include <linux/input.h> 26#include <linux/input.h>
27#include <linux/mtd/partitions.h>
28#include <linux/mtd/physmap.h>
29#include <mtd/mtd-abi.h>
27 30
28static struct gpio_keys_button mtx1_gpio_button[] = { 31static struct gpio_keys_button mtx1_gpio_button[] = {
29 { 32 {
@@ -85,10 +88,56 @@ static struct platform_device mtx1_gpio_leds = {
85 } 88 }
86}; 89};
87 90
91static struct mtd_partition mtx1_mtd_partitions[] = {
92 {
93 .name = "filesystem",
94 .size = 0x01C00000,
95 .offset = 0,
96 },
97 {
98 .name = "yamon",
99 .size = 0x00100000,
100 .offset = MTDPART_OFS_APPEND,
101 .mask_flags = MTD_WRITEABLE,
102 },
103 {
104 .name = "kernel",
105 .size = 0x002c0000,
106 .offset = MTDPART_OFS_APPEND,
107 },
108 {
109 .name = "yamon env",
110 .size = 0x00040000,
111 .offset = MTDPART_OFS_APPEND,
112 },
113};
114
115static struct physmap_flash_data mtx1_flash_data = {
116 .width = 4,
117 .nr_parts = 4,
118 .parts = mtx1_mtd_partitions,
119};
120
121static struct resource mtx1_mtd_resource = {
122 .start = 0x1e000000,
123 .end = 0x1fffffff,
124 .flags = IORESOURCE_MEM,
125};
126
127static struct platform_device mtx1_mtd = {
128 .name = "physmap-flash",
129 .dev = {
130 .platform_data = &mtx1_flash_data,
131 },
132 .num_resources = 1,
133 .resource = &mtx1_mtd_resource,
134};
135
88static struct __initdata platform_device * mtx1_devs[] = { 136static struct __initdata platform_device * mtx1_devs[] = {
89 &mtx1_gpio_leds, 137 &mtx1_gpio_leds,
90 &mtx1_wdt, 138 &mtx1_wdt,
91 &mtx1_button 139 &mtx1_button,
140 &mtx1_mtd,
92}; 141};
93 142
94static int __init mtx1_register_devices(void) 143static int __init mtx1_register_devices(void)