summaryrefslogtreecommitdiff
path: root/arch/blackfin/mach-bf561/boards/ezkit.c
diff options
context:
space:
mode:
authorMike Frysinger <michael.frysinger@analog.com>2008-01-24 09:14:04 (GMT)
committerBryan Wu <bryan.wu@analog.com>2008-01-24 09:14:04 (GMT)
commitde8c43f2fca9bb06f3ee87b38a61d5d9966ce221 (patch)
treec39c995e31e29703056cd547f5aa4e3a967ba9ab /arch/blackfin/mach-bf561/boards/ezkit.c
parent96a5c6f9bef027e1187b2f168bb3e08ef21d0b6f (diff)
downloadlinux-de8c43f2fca9bb06f3ee87b38a61d5d9966ce221.tar.xz
[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.c42
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 36114dd..7601c3b 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -29,6 +29,9 @@
#include <linux/device.h>
#include <linux/platform_device.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
#include <linux/spi/spi.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
@@ -155,6 +158,44 @@ static struct platform_device bfin_uart_device = {
};
#endif
+static struct mtd_partition ezkit_partitions[] = {
+ {
+ .name = "Bootloader",
+ .size = 0x20000,
+ .offset = 0,
+ }, {
+ .name = "Kernel",
+ .size = 0xE0000,
+ .offset = MTDPART_OFS_APPEND,
+ }, {
+ .name = "RootFS",
+ .size = MTDPART_SIZ_FULL,
+ .offset = MTDPART_OFS_APPEND,
+ }
+};
+
+static struct physmap_flash_data ezkit_flash_data = {
+ .width = 2,
+ .parts = ezkit_partitions,
+ .nr_parts = ARRAY_SIZE(ezkit_partitions),
+};
+
+static struct resource ezkit_flash_resource = {
+ .start = 0x20000000,
+ .end = 0x207fffff,
+ .flags = IORESOURCE_MEM,
+};
+
+static struct platform_device ezkit_flash_device = {
+ .name = "physmap-flash",
+ .id = 0,
+ .dev = {
+ .platform_data = &ezkit_flash_data,
+ },
+ .num_resources = 1,
+ .resource = &ezkit_flash_resource,
+};
+
#ifdef CONFIG_SPI_BFIN
#if defined(CONFIG_SND_BLACKFIN_AD1836) \
|| defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
@@ -318,6 +359,7 @@ static struct platform_device *ezkit_devices[] __initdata = {
#if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE)
&i2c_gpio_device,
#endif
+ &ezkit_flash_device,
};
static int __init ezkit_init(void)