diff options
author | Mike Frysinger <michael.frysinger@analog.com> | 2008-01-24 04:14:04 -0500 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2008-01-24 04:14:04 -0500 |
commit | de8c43f2fca9bb06f3ee87b38a61d5d9966ce221 (patch) | |
tree | c39c995e31e29703056cd547f5aa4e3a967ba9ab /arch/blackfin/mach-bf561/boards/ezkit.c | |
parent | 96a5c6f9bef027e1187b2f168bb3e08ef21d0b6f (diff) |
[Blackfin] arch: use common flash driver to setup partitions rather than the bf5xx-flash driver
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin/mach-bf561/boards/ezkit.c')
-rw-r--r-- | arch/blackfin/mach-bf561/boards/ezkit.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index 36114dd4ab3a..7601c3be1b5c 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c | |||
@@ -29,6 +29,9 @@ | |||
29 | 29 | ||
30 | #include <linux/device.h> | 30 | #include <linux/device.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/mtd/mtd.h> | ||
33 | #include <linux/mtd/partitions.h> | ||
34 | #include <linux/mtd/physmap.h> | ||
32 | #include <linux/spi/spi.h> | 35 | #include <linux/spi/spi.h> |
33 | #include <linux/irq.h> | 36 | #include <linux/irq.h> |
34 | #include <linux/interrupt.h> | 37 | #include <linux/interrupt.h> |
@@ -155,6 +158,44 @@ static struct platform_device bfin_uart_device = { | |||
155 | }; | 158 | }; |
156 | #endif | 159 | #endif |
157 | 160 | ||
161 | static struct mtd_partition ezkit_partitions[] = { | ||
162 | { | ||
163 | .name = "Bootloader", | ||
164 | .size = 0x20000, | ||
165 | .offset = 0, | ||
166 | }, { | ||
167 | .name = "Kernel", | ||
168 | .size = 0xE0000, | ||
169 | .offset = MTDPART_OFS_APPEND, | ||
170 | }, { | ||
171 | .name = "RootFS", | ||
172 | .size = MTDPART_SIZ_FULL, | ||
173 | .offset = MTDPART_OFS_APPEND, | ||
174 | } | ||
175 | }; | ||
176 | |||
177 | static struct physmap_flash_data ezkit_flash_data = { | ||
178 | .width = 2, | ||
179 | .parts = ezkit_partitions, | ||
180 | .nr_parts = ARRAY_SIZE(ezkit_partitions), | ||
181 | }; | ||
182 | |||
183 | static struct resource ezkit_flash_resource = { | ||
184 | .start = 0x20000000, | ||
185 | .end = 0x207fffff, | ||
186 | .flags = IORESOURCE_MEM, | ||
187 | }; | ||
188 | |||
189 | static struct platform_device ezkit_flash_device = { | ||
190 | .name = "physmap-flash", | ||
191 | .id = 0, | ||
192 | .dev = { | ||
193 | .platform_data = &ezkit_flash_data, | ||
194 | }, | ||
195 | .num_resources = 1, | ||
196 | .resource = &ezkit_flash_resource, | ||
197 | }; | ||
198 | |||
158 | #ifdef CONFIG_SPI_BFIN | 199 | #ifdef CONFIG_SPI_BFIN |
159 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ | 200 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ |
160 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 201 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) |
@@ -318,6 +359,7 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
318 | #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) | 359 | #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) |
319 | &i2c_gpio_device, | 360 | &i2c_gpio_device, |
320 | #endif | 361 | #endif |
362 | &ezkit_flash_device, | ||
321 | }; | 363 | }; |
322 | 364 | ||
323 | static int __init ezkit_init(void) | 365 | static int __init ezkit_init(void) |