Skip to contentSkip to conversation

sh: ap325rxa: create CPLD data area in mtd

PATCH Applied Nobuhiro Iwamatsu 3 participants 4 messages Aug 25, 2008 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: ap325rxa: create CPLD data area in mtd

AP320 and AP325RXA has CPLD data in NOR Flash.
If this area erased, this board can not boot.
This patch create CPLD data area and set writeable mask bit.

---
 arch/sh/boards/board-ap325rxa.c |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)
arch/sh/boards/board-ap325rxa.c +16 -2
index fd16125..9e24455 100644
@@ -52,6 +52,10 @@ static struct platform_device smc9118_device = {
 	},
 };
 
+/*
+ * AP320 and AP325RXA has CPLD data in NOR Flash(0xA80000-0xABFFFF).
+ * If this area erased, this board can not boot.
+ */
 static struct mtd_partition ap325rxa_nor_flash_partitions[] = {
 	{
 		 .name = "uboot",
@@ -63,7 +67,17 @@ static struct mtd_partition ap325rxa_nor_flash_partitions[] = {
 		 .offset = MTDPART_OFS_APPEND,
 		 .size = (2 * 1024 * 1024),
 	}, {
-		 .name = "other",
+		 .name = "free-area0",
+		 .offset = MTDPART_OFS_APPEND,
+		 .size = ((7 * 1024 * 1024) + (512 * 1024)),
+	}, {
+		 .name = "FPGA-Data",
+		 .offset = MTDPART_OFS_APPEND,
+		 .mask_flags = MTD_WRITEABLE,	/* Read-only */
+		 .size = (1024 * 128 * 2),
+		 .size = MTDPART_SIZ_FULL,
+	}, {
+		 .name = "free-area1",
 		 .offset = MTDPART_OFS_APPEND,
 		 .size = MTDPART_SIZ_FULL,
 	},
@@ -292,7 +306,7 @@ static int __init ap325rxa_devices_setup(void)
 
 	i2c_register_board_info(0, ap325rxa_i2c_devices,
 				ARRAY_SIZE(ap325rxa_i2c_devices));
-
+
 	return platform_add_devices(ap325rxa_devices,
 				ARRAY_SIZE(ap325rxa_devices));
 }
Signature · 1 line
1.5.6.3
Applied
#1 lore raw
Quoted 5 lines · Nobuhiro Iwamatsu

AP320 and AP325RXA has CPLD data in NOR Flash.
If this area erased, this board can not boot.
This patch create CPLD data area and set writeable mask bit.

Applied, thanks.

#2 lore raw

PATCH 1/1 sh: ap325rxa: create CPLD data area in mtd

In reply to Nobuhiro Iwamatsu

AP320 and AP325RXA has CPLD data in NOR Flash.
If this area erased, this board can not boot.
This patch create CPLD data area and set writeable mask bit.

---
 arch/sh/boards/board-ap325rxa.c |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)
arch/sh/boards/board-ap325rxa.c +16 -2
index fd16125..9e24455 100644
@@ -52,6 +52,10 @@ static struct platform_device smc9118_device = {
 	},
 };
 
+/*
+ * AP320 and AP325RXA has CPLD data in NOR Flash(0xA80000-0xABFFFF).
+ * If this area erased, this board can not boot.
+ */
 static struct mtd_partition ap325rxa_nor_flash_partitions[] = {
 	{
 		 .name = "uboot",
@@ -63,7 +67,17 @@ static struct mtd_partition ap325rxa_nor_flash_partitions[] = {
 		 .offset = MTDPART_OFS_APPEND,
 		 .size = (2 * 1024 * 1024),
 	}, {
-		 .name = "other",
+		 .name = "free-area0",
+		 .offset = MTDPART_OFS_APPEND,
+		 .size = ((7 * 1024 * 1024) + (512 * 1024)),
+	}, {
+		 .name = "FPGA-Data",
+		 .offset = MTDPART_OFS_APPEND,
+		 .mask_flags = MTD_WRITEABLE,	/* Read-only */
+		 .size = (1024 * 128 * 2),
+		 .size = MTDPART_SIZ_FULL,
+	}, {
+		 .name = "free-area1",
 		 .offset = MTDPART_OFS_APPEND,
 		 .size = MTDPART_SIZ_FULL,
 	},
@@ -292,7 +306,7 @@ static int __init ap325rxa_devices_setup(void)
 
 	i2c_register_board_info(0, ap325rxa_i2c_devices,
 				ARRAY_SIZE(ap325rxa_i2c_devices));
-
+
 	return platform_add_devices(ap325rxa_devices,
 				ARRAY_SIZE(ap325rxa_devices));
 }
Signature · 1 line
1.5.6.3