public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] arm: socfpga: Enabling MTD default partitions
@ 2015-12-21 15:01 Chin Liang See
  2015-12-21 23:17 ` Marek Vasut
  0 siblings, 1 reply; 4+ messages in thread
From: Chin Liang See @ 2015-12-21 15:01 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Dinh Nguyen <dinh.linux@gmail.com>
Cc: Pavel Machek <pavel@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
---
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(-)

diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index 699e78a..f7c0eb5 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -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:
-- 
1.9.2.468.g3f0c02a

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH v2] arm: socfpga: Enabling MTD default partitions
  2015-12-21 15:01 [U-Boot] [PATCH v2] arm: socfpga: Enabling MTD default partitions Chin Liang See
@ 2015-12-21 23:17 ` Marek Vasut
  2015-12-23 18:04   ` Pavel Machek
  0 siblings, 1 reply; 4+ messages in thread
From: Marek Vasut @ 2015-12-21 23:17 UTC (permalink / raw)
  To: u-boot

On Monday, December 21, 2015 at 04:01:51 PM, Chin Liang See wrote:
> 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.

>  #: 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
> 
> Signed-off-by: Chin Liang See <clsee@altera.com>
> Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
> Cc: Dinh Nguyen <dinh.linux@gmail.com>
> Cc: Pavel Machek <pavel@denx.de>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Stefan Roese <sr@denx.de>

Applied, thanks.

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH v2] arm: socfpga: Enabling MTD default partitions
  2015-12-21 23:17 ` Marek Vasut
@ 2015-12-23 18:04   ` Pavel Machek
  2015-12-23 23:14     ` Chin Liang See
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2015-12-23 18:04 UTC (permalink / raw)
  To: u-boot

On Tue 2015-12-22 00:17:15, Marek Vasut wrote:
> On Monday, December 21, 2015 at 04:01:51 PM, Chin Liang See wrote:
> > 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.
> 
> >  #: 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
> > 
> > Signed-off-by: Chin Liang See <clsee@altera.com>
> > Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
> > Cc: Dinh Nguyen <dinh.linux@gmail.com>
> > Cc: Pavel Machek <pavel@denx.de>
> > Cc: Marek Vasut <marex@denx.de>
> > Cc: Stefan Roese <sr@denx.de>
> 
> Applied, thanks.

Would we normally list "offset" first?

									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH v2] arm: socfpga: Enabling MTD default partitions
  2015-12-23 18:04   ` Pavel Machek
@ 2015-12-23 23:14     ` Chin Liang See
  0 siblings, 0 replies; 4+ messages in thread
From: Chin Liang See @ 2015-12-23 23:14 UTC (permalink / raw)
  To: u-boot

On Wed, 2015-12-23 at 19:04 +0100, Pavel Machek wrote:
> On Tue 2015-12-22 00:17:15, Marek Vasut wrote:
> > On Monday, December 21, 2015 at 04:01:51 PM, Chin Liang See wrote:
> > > 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.
> > 
> > >  #: 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
> > > 
> > > Signed-off-by: Chin Liang See <clsee@altera.com>
> > > Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
> > > Cc: Dinh Nguyen <dinh.linux@gmail.com>
> > > Cc: Pavel Machek <pavel@denx.de>
> > > Cc: Marek Vasut <marex@denx.de>
> > > Cc: Stefan Roese <sr@denx.de>
> > 
> > Applied, thanks.
> 
> Would we normally list "offset" first?
> 

Haha probably size does matter :)

Thanks
Chin Liang

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-12-23 23:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-21 15:01 [U-Boot] [PATCH v2] arm: socfpga: Enabling MTD default partitions Chin Liang See
2015-12-21 23:17 ` Marek Vasut
2015-12-23 18:04   ` Pavel Machek
2015-12-23 23:14     ` Chin Liang See

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox