[PATCH 06/12] PCM051: Rename SPI NOR device

Teresa Gámez t.gamez at phytec.de
Mon Jul 8 09:17:04 EDT 2013


Renamed SPI NOR device from nor0 to m25p0,
to make booting from it possible.

Signed-off-by: Teresa Gámez <t.gamez at phytec.de>
---
 arch/arm/boards/pcm051/board.c               |    8 ++++----
 arch/arm/boards/pcm051/env/boot/spi-nor      |    2 +-
 arch/arm/boards/pcm051/env/init/mtdparts-nor |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/boards/pcm051/board.c b/arch/arm/boards/pcm051/board.c
index cb8c1d9..8701596 100644
--- a/arch/arm/boards/pcm051/board.c
+++ b/arch/arm/boards/pcm051/board.c
@@ -65,7 +65,7 @@ static int pcm051_mem_init(void)
 mem_initcall(pcm051_mem_init);
 
 static struct flash_platform_data pcm051_spi_flash = {
-	.name	= "nor",
+	.name	= "m25p",
 	.type	= "w25q64",
 };
 
@@ -176,11 +176,11 @@ static int pcm051_devices_init(void)
 
 	switch (bootsource_get()) {
 	case BOOTSOURCE_SPI:
-		devfs_add_partition("nor0", 0x00000, SZ_128K,
+		devfs_add_partition("m25p0", 0x00000, SZ_128K,
 					DEVFS_PARTITION_FIXED, "xload");
-		devfs_add_partition("nor0", SZ_128K, SZ_512K,
+		devfs_add_partition("m25p0", SZ_128K, SZ_512K,
 					DEVFS_PARTITION_FIXED, "self0");
-		devfs_add_partition("nor0", SZ_128K + SZ_512K, SZ_128K,
+		devfs_add_partition("m25p0", SZ_128K + SZ_512K, SZ_128K,
 					DEVFS_PARTITION_FIXED, "env0");
 		break;
 	default:
diff --git a/arch/arm/boards/pcm051/env/boot/spi-nor b/arch/arm/boards/pcm051/env/boot/spi-nor
index d5f77c8..9273b84 100644
--- a/arch/arm/boards/pcm051/env/boot/spi-nor
+++ b/arch/arm/boards/pcm051/env/boot/spi-nor
@@ -5,7 +5,7 @@ if [ "$1" = menu ]; then
         exit
 fi
 
-global.bootm.image="/dev/nor0.kernel"
+global.bootm.image="/dev/m25p0.kernel"
 
 # Use rootfs form SD-Card for now as rootfs partition < 4MB
 global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext3 rootwait"
diff --git a/arch/arm/boards/pcm051/env/init/mtdparts-nor b/arch/arm/boards/pcm051/env/init/mtdparts-nor
index 91aa847..5c762ad 100644
--- a/arch/arm/boards/pcm051/env/init/mtdparts-nor
+++ b/arch/arm/boards/pcm051/env/init/mtdparts-nor
@@ -5,8 +5,8 @@ if [ "$1" = menu ]; then
 	exit
 fi
 
-mtdparts="128k(nor0.xload),512k(nor0.barebox),128k(nor0.bareboxenv),4M(nor0.kernel),-(nor0.root)"
+mtdparts="128k(m25p0.xload),512k(m25p0.barebox),128k(m25p0.bareboxenv),4M(m25p0.kernel),-(m25p0.root)"
 kernelname="spi_flash"
 
-mtdparts-add -d nor0 -k ${kernelname} -p ${mtdparts}
+mtdparts-add -d m25p0 -k ${kernelname} -p ${mtdparts}
 
-- 
1.7.0.4




More information about the barebox mailing list