From 68b747397b9313cb476858413d817d9cd807803e Mon Sep 17 00:00:00 2001 From: Prabhakar Kushwaha Date: Wed, 2 Apr 2014 17:26:23 +0530 Subject: [PATCH] powerpc/T1040: add mtdparts suppport for T104xRDB and T1040QDS We use dynamical mtdparts partition instead of directly puting mtd partitions nodes in device tree. Signed-off-by: Prabhakar Kushwaha Reviewed-by: York Sun --- include/configs/T1040QDS.h | 17 +++++++++++++++++ include/configs/T104xRDB.h | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/include/configs/T1040QDS.h b/include/configs/T1040QDS.h index 63a7efccf2..030ea7e660 100644 --- a/include/configs/T1040QDS.h +++ b/include/configs/T1040QDS.h @@ -650,6 +650,23 @@ unsigned long get_board_ddr_clk(void); #define CONFIG_PHY_GIGE /* Include GbE speed/duplex detection */ #endif +/* + * Dynamic MTD Partition support with mtdparts + */ +#ifndef CONFIG_SYS_NO_FLASH +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#define CONFIG_FLASH_CFI_MTD +#define MTDIDS_DEFAULT "nor0=fe8000000.nor,nand0=fff800000.flash," \ + "spi0=spife110000.0" +#define MTDPARTS_DEFAULT "mtdparts=fe8000000.nor:1m(uboot),5m(kernel)," \ + "128k(dtb),96m(fs),-(user);"\ + "fff800000.flash:2m(uboot),9m(kernel),"\ + "128k(dtb),96m(fs),-(user);spife110000.0:" \ + "2m(uboot),9m(kernel),128k(dtb),-(user)" +#endif + /* * Environment */ diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h index eacbdf0cee..ffc96f1b6f 100644 --- a/include/configs/T104xRDB.h +++ b/include/configs/T104xRDB.h @@ -614,6 +614,23 @@ #define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */ #endif +/* + * Dynamic MTD Partition support with mtdparts + */ +#ifndef CONFIG_SYS_NO_FLASH +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#define CONFIG_FLASH_CFI_MTD +#define MTDIDS_DEFAULT "nor0=fe8000000.nor,nand0=fff800000.flash," \ + "spi0=spife110000.0" +#define MTDPARTS_DEFAULT "mtdparts=fe8000000.nor:1m(uboot),5m(kernel)," \ + "128k(dtb),96m(fs),-(user);"\ + "fff800000.flash:2m(uboot),9m(kernel),"\ + "128k(dtb),96m(fs),-(user);spife110000.0:" \ + "2m(uboot),9m(kernel),128k(dtb),-(user)" +#endif + /* * Environment Configuration */ -- 2.25.1