arm: socfpga: Enabling MTD default partitions
PATCH v2 1/1 arm: socfpga: Enabling MTD default partitions
Enabling MTD default partitions if its not defined in board configuration file. The layout as below
device nor0 <ff705000.spi0>, # parts = 6
#: name size offset mask_flags 0: u-boot 0x00100000 0x00000000 0 1: env1 0x00040000 0x00100000 0 2: env2 0x00040000 0x00140000 0 3: UBI 0x03e80000 0x00180000 0 4: boot 0x00e80000 0x00180000 0 5: rootfs 0x01000000 0x01000000 0
---
Changes for v2
- include mtd layout as part of commit message
- using spi0 in mtdparts for multiple spi support
- fix the checking condition
--- include/configs/socfpga_common.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)
include/configs/socfpga_common.h +24 -1
@@ -197,7 +197,7 @@ unsigned int cm_get_l4_sp_clk_hz(void);#define CONFIG_CMD_MTDPARTS #define CONFIG_MTD_DEVICE #define CONFIG_MTD_PARTITIONS -#define MTDIDS_DEFAULT "nor0=ff705000.spi" +#define MTDIDS_DEFAULT "nor0=ff705000.spi.0"#endif /* QSPI reference clock */ #ifndef __ASSEMBLY__
@@ -278,6 +278,29 @@ unsigned int cm_get_qspi_controller_clk_hz(void);#endif /* +* mtd partitioning for serial NOR flash +* +* device nor0 <ff705000.spi.0>, # parts = 6 +* #: name size offset mask_flags +* 0: u-boot 0x00100000 0x00000000 0 +* 1: env1 0x00040000 0x00100000 0 +* 2: env2 0x00040000 0x00140000 0 +* 3: UBI 0x03e80000 0x00180000 0 +* 4: boot 0x00e80000 0x00180000 0 +* 5: rootfs 0x01000000 0x01000000 0 +* +*/ +#if defined(CONFIG_CMD_SF ) && !defined(MTDPARTS_DEFAULT ) +#define MTDPARTS_DEFAULT "mtdparts=ff705000.spi.0:"\ + "1m(u-boot)," \ + "256k(env1)," \ + "256k(env2)," \ + "14848k(boot)," \ + "16m(rootfs)," \ + "- at 1536k(UBI)\0" +#endif + +/* * SPL * * SRAM Memory layout:
Signature · 1 line
1.9.2.468.g3f0c02a
Marek Vasut
AppliedPATCH v2 1/1 arm: socfpga: Enabling MTD default partitions
Quoted 3 lines · Chin Liang See
Enabling MTD default partitions if its not defined in board configuration file. The layout as below
device nor0 <ff705000.spi0>, # parts = 6
ff705000.spi.0 (the dot is missing). I can fix it while applying though.
Quoted 8 lines
#: name size offset mask_flags 0: u-boot 0x00100000 0x00000000 0 1: env1 0x00040000 0x00100000 0 2: env2 0x00040000 0x00140000 0 3: UBI 0x03e80000 0x00180000 0 4: boot 0x00e80000 0x00180000 0 5: rootfs 0x01000000 0x01000000 0
Quoted 6 lines
Signed-off-by Chin Liang See <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Pavel Machek <[email protected]>Cc Marek Vasut <[email protected]>Cc Stefan Roese <[email protected]>
Applied, thanks.
Best regards,
Marek Vasut
PATCH v2 1/1 arm: socfpga: Enabling MTD default partitions
Quoted 15 lines · Marek Vasut
Quoted 3 lines · Chin Liang See
Enabling MTD default partitions if its not defined in board configuration file. The layout as below
device nor0 <ff705000.spi0>, # parts = 6ff705000.spi.0 (the dot is missing). I can fix it while applying though.
Quoted 8 lines
#: name size offset mask_flags 0: u-boot 0x00100000 0x00000000 0 1: env1 0x00040000 0x00100000 0 2: env2 0x00040000 0x00140000 0 3: UBI 0x03e80000 0x00180000 0 4: boot 0x00e80000 0x00180000 0 5: rootfs 0x01000000 0x01000000 0
Quoted 8 lines
Quoted 6 lines
Signed-off-by Chin Liang See <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Pavel Machek <[email protected]>Cc Marek Vasut <[email protected]>Cc Stefan Roese <[email protected]>Applied, thanks.
Would we normally list "offset" first?
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
PATCH v2 1/1 arm: socfpga: Enabling MTD default partitions
Quoted 25 lines · Pavel Machek
Quoted 24 lines · Marek Vasut
Quoted 3 lines · Chin Liang See
Enabling MTD default partitions if its not defined in board configuration file. The layout as below
device nor0 <ff705000.spi0>, # parts = 6ff705000.spi.0 (the dot is missing). I can fix it while applying though.
Quoted 15 lines
#: name size offset
mask_flags0: u-boot 0x00100000 0x00000000 0 1: env1 0x00040000 0x00100000 0 2: env2 0x00040000 0x00140000 0 3: UBI 0x03e80000 0x00180000 0 4: boot 0x00e80000 0x00180000 0 5: rootfs 0x01000000 0x01000000 0Signed-off-by Chin Liang See <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Pavel Machek <[email protected]>Cc Marek Vasut <[email protected]>Cc Stefan Roese <[email protected]>
Quoted 4 lines
Quoted 1 line
Applied, thanks.
Would we normally list "offset" first?
Haha probably size does matter :)
Thanks
Chin Liang