Skip to contentSkip to conversation

powerpc/85xx: enable mtdparts for nor flash

PATCH Superseded Yangbo Lu 2 participants 2 messages Jul 28, 2014

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Yangbo Lu

author
#0 lore raw

PATCH 1/1 powerpc/85xx: enable mtdparts for nor flash

Enable mtdparts for nor flash of some P1/P2 boards that include p1020rdb-pd, p1021rdb-pc, p1022ds, p1025twr, and p2020rdb-pc.

---
 include/configs/P1022DS.h      | 11 +++++++++++
 include/configs/p1_p2_rdb_pc.h | 30 ++++++++++++++++++++++++++++++
 include/configs/p1_twr.h       | 11 +++++++++++
 3 files changed, 52 insertions(+)
include/configs/P1022DS.h +11 -0
index 139d4fe..6f5c19c 100644
@@ -620,6 +620,17 @@
 #endif
 
 /*
+ * Dynamic MTD Partition support with mtdparts
+ */
+#define CONFIG_MTD_DEVICE
+#define CONFIG_MTD_PARTITIONS
+#define CONFIG_CMD_MTDPARTS
+#define CONFIG_FLASH_CFI_MTD
+#define MTDIDS_DEFAULT		"nor0=e8000000.nor"
+#define MTDPARTS_DEFAULT	\
+	"mtdparts=e8000000.nor:48m(ramdisk),14m(diagnostic),2m(dink),6m(kernel),58112k(fs),512k(dtb),768k(u-boot)"
+
+/*
  * Environment
  */
 #ifdef CONFIG_SPIFLASH
include/configs/p1_p2_rdb_pc.h +30 -0
index 07b6179..ec7d105 100644
@@ -77,6 +77,16 @@
 #define __SW_BOOT_NAND		0x44
 #define __SW_BOOT_PCIE		0x74
 #define CONFIG_SYS_L2_SIZE	(256 << 10)
+/*
+ * Dynamic MTD Partition support with mtdparts
+ */
+#define CONFIG_MTD_DEVICE
+#define CONFIG_MTD_PARTITIONS
+#define CONFIG_CMD_MTDPARTS
+#define CONFIG_FLASH_CFI_MTD
+#define MTDIDS_DEFAULT		"nor0=ec000000.nor"
+#define MTDPARTS_DEFAULT	\
+	"mtdparts=ec000000.nor:128k(dtb),6016k(kernel),57088k(fs),1m(vsc7385-firmware),1280k(u-boot)"
 #endif
 
 #if defined(CONFIG_P1021RDB)
@@ -95,6 +105,16 @@
 #define __SW_BOOT_NAND		0xec
 #define __SW_BOOT_PCIE		0x6c
 #define CONFIG_SYS_L2_SIZE	(256 << 10)
+/*
+ * Dynamic MTD Partition support with mtdparts
+ */
+#define CONFIG_MTD_DEVICE
+#define CONFIG_MTD_PARTITIONS
+#define CONFIG_CMD_MTDPARTS
+#define CONFIG_FLASH_CFI_MTD
+#define MTDIDS_DEFAULT		"nor0=ef000000.nor"
+#define MTDPARTS_DEFAULT	\
+	"mtdparts=ef000000.nor:256k(vsc7385-firmware),256k(dtb),4608k(kernel),9728k(fs),256k(qe-ucode-firmware),1280k(u-boot)"
 #endif
 
 #if defined(CONFIG_P1024RDB)
@@ -142,6 +162,16 @@
 #define __SW_BOOT_NAND		0xe8
 #define __SW_BOOT_PCIE		0xa8
 #define CONFIG_SYS_L2_SIZE	(512 << 10)
+/*
+ * Dynamic MTD Partition support with mtdparts
+ */
+#define CONFIG_MTD_DEVICE
+#define CONFIG_MTD_PARTITIONS
+#define CONFIG_CMD_MTDPARTS
+#define CONFIG_FLASH_CFI_MTD
+#define MTDIDS_DEFAULT		"nor0=ef000000.nor"
+#define MTDPARTS_DEFAULT	\
+	"mtdparts=ef000000.nor:256k(vsc7385-firmware),256k(dtb),4608k(kernel),9984k(fs),1280k(u-boot)"
 #endif
 
 #ifdef CONFIG_SDCARD
include/configs/p1_twr.h +11 -0
index c296a07..f34ea33 100644
@@ -389,6 +389,17 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #endif /* CONFIG_TWR-P1025 */
 
 /*
+ * Dynamic MTD Partition support with mtdparts
+ */
+#define CONFIG_MTD_DEVICE
+#define CONFIG_MTD_PARTITIONS
+#define CONFIG_CMD_MTDPARTS
+#define CONFIG_FLASH_CFI_MTD
+#define MTDIDS_DEFAULT		"nor0=ec000000.nor"
+#define MTDPARTS_DEFAULT	\
+	"mtdparts=ec000000.nor:256k(vsc7385-firmware),256k(dtb),5632k(kernel),57856k(fs),256k(qe-ucode-firmware),1280k(u-boot)"
+
+/*
  * Environment
  */
 #ifdef CONFIG_SYS_RAMBOOT
Signature · 1 line
1.8.5
#1 lore raw

PATCH 1/1 powerpc/85xx: enable mtdparts for nor flash

Dear Yangbo Lu,

Quoted 2 lines · In message <[email protected]> you wrote:

Enable mtdparts for nor flash of some P1/P2 boards that include p1020rdb-pd, p1021rdb-pc, p1022ds, p1025twr, and p2020rdb-pc.

The Subject: is misleading - it suggest a global change for all 85xx boards, while actually only a few p10xx and p20xx boards are affected.

Quoted 2 lines
include/configs/P1022DS.h +2 -0
+#define MTDPARTS_DEFAULT	\
+	"mtdparts=e8000000.nor:48m(ramdisk),14m(diagnostic),2m(dink),6m(kernel),58112k(fs),512k(dtb),768k(u-boot)"

...

Quoted 2 lines
include/configs/p1_p2_rdb_pc.h +2 -0
+#define MTDPARTS_DEFAULT	\
+	"mtdparts=ec000000.nor:128k(dtb),6016k(kernel),57088k(fs),1m(vsc7385-firmware),1280k(u-boot)"

...

Quoted 2 lines
include/configs/p1_p2_rdb_pc.h +2 -0
+#define MTDPARTS_DEFAULT	\
+	"mtdparts=ef000000.nor:256k(vsc7385-firmware),256k(dtb),4608k(kernel),9728k(fs),256k(qe-ucode-firmware),1280k(u-boot)"

...

Quoted 2 lines
include/configs/p1_p2_rdb_pc.h +2 -0
+#define MTDPARTS_DEFAULT	\
+	"mtdparts=ef000000.nor:256k(vsc7385-firmware),256k(dtb),4608k(kernel),9984k(fs),1280k(u-boot)"

...

include/configs/p1_twr.h extern unsigned long get_board_sys_clk(unsigned long dummy); · line 400

Quoted 2 lines
include/configs/p1_twr.h +2 -0
+#define MTDPARTS_DEFAULT	\
+	"mtdparts=ec000000.nor:256k(vsc7385-firmware),256k(dtb),5632k(kernel),57856k(fs),256k(qe-ucode-firmware),1280k(u-boot)"

Max line legth is still 80 characters. Please fix.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You can fool some of the people all of the time, and You can fool all
of the people some of the time, but You can't fool mom.