Title: [4143] trunk/arch/blackfin: setup default partition map for bf548-ezkit in the board resources file rather than using the deprecated kconfig option
Revision
4143
Author
vapier
Date
2008-01-23 10:48:35 -0600 (Wed, 23 Jan 2008)

Log Message

setup default partition map for bf548-ezkit in the board resources file rather than using the deprecated kconfig option

Diffstat

 configs/BF548-EZKIT_defconfig |    2 +-
 mach-bf548/boards/ezkit.c     |   40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 1 deletion(-)

Modified Paths

Diff

Modified: trunk/arch/blackfin/configs/BF548-EZKIT_defconfig (4142 => 4143)


--- trunk/arch/blackfin/configs/BF548-EZKIT_defconfig	2008-01-23 08:01:02 UTC (rev 4142)
+++ trunk/arch/blackfin/configs/BF548-EZKIT_defconfig	2008-01-23 16:48:35 UTC (rev 4143)
@@ -554,7 +554,7 @@
 CONFIG_MTD_COMPLEX_MAPPINGS=y
 CONFIG_MTD_PHYSMAP=y
 CONFIG_MTD_PHYSMAP_START=0x20000000
-CONFIG_MTD_PHYSMAP_LEN=0x400000
+CONFIG_MTD_PHYSMAP_LEN=0
 CONFIG_MTD_PHYSMAP_BANKWIDTH=2
 # CONFIG_MTD_UCLINUX is not set
 # CONFIG_MTD_PLATRAM is not set

Modified: trunk/arch/blackfin/mach-bf548/boards/ezkit.c (4142 => 4143)


--- trunk/arch/blackfin/mach-bf548/boards/ezkit.c	2008-01-23 08:01:02 UTC (rev 4142)
+++ trunk/arch/blackfin/mach-bf548/boards/ezkit.c	2008-01-23 16:48:35 UTC (rev 4143)
@@ -32,6 +32,7 @@
 #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/spi/flash.h>
 #include <linux/irq.h>
@@ -327,6 +328,44 @@
 };
 #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   = 0x20ffffff,
+	.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,
+};
+
 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
 /* all SPI peripherals info goes here */
 #if defined(CONFIG_MTD_M25P80) \
@@ -589,6 +628,7 @@
 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
 	&bfin_device_gpiokeys,
 #endif
+	&ezkit_flash_device,
 };
 
 static int __init stamp_init(void)
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to