diff options
Diffstat (limited to 'arch/blackfin/mach-bf561')
-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) |