Patchwork [U-Boot,v2,3/4] am335x_evm: Add CONFIG_CMD_MTDPARTS and relevant defaults

login
register
mail settings
Submitter Tom Rini
Date Feb. 26, 2013, 3:56 p.m.
Message ID <1361894171-3379-4-git-send-email-trini@ti.com>
Download mbox | patch
Permalink /patch/223256/
State Superseded
Delegated to: Tom Rini
Headers show

Comments

Tom Rini - Feb. 26, 2013, 3:56 p.m.
Signed-off-by: Tom Rini <trini@ti.com>
---
 include/configs/am335x_evm.h |    9 +++++++++
 1 file changed, 9 insertions(+)
Peter Korsgaard - Feb. 27, 2013, 8:54 a.m.
>>>>> "Tom" == Tom Rini <trini@ti.com> writes:

 Tom> Signed-off-by: Tom Rini <trini@ti.com>
 Tom> ---
 Tom>  include/configs/am335x_evm.h |    9 +++++++++
 Tom>  1 file changed, 9 insertions(+)

 Tom> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
 Tom> index 59647d1..61b861d 100644
 Tom> --- a/include/configs/am335x_evm.h
 Tom> +++ b/include/configs/am335x_evm.h
 Tom> @@ -60,6 +60,8 @@
 Tom>  	"fdtfile=\0" \
 Tom>  	"console=ttyO0,115200n8\0" \
 Tom>  	"optargs=\0" \
 Tom> +	"mtdids=" MTDIDS_DEFAULT "\0" \
 Tom> +	"mtdparts=" MTDPARTS_DEFAULT "\0" \
 Tom>  	"mmcdev=0\0" \
 Tom>  	"mmcroot=/dev/mmcblk0p2 ro\0" \
 Tom>  	"mmcrootfstype=ext4 rootwait\0" \
 Tom> @@ -341,6 +343,13 @@
 Tom>  /* NAND support */
 Tom>  #ifdef CONFIG_NAND
 Tom>  #define CONFIG_CMD_NAND
 Tom> +#define CONFIG_CMD_MTDPARTS
 Tom> +#define MTDIDS_DEFAULT			"nand0=omap2-nand.0"
 Tom> +#define MTDPARTS_DEFAULT		"mtdparts=omap2-nand.0:128k(SPL)," \
 Tom> +					"128k(SPL.backup1)," \
 Tom> +					"128k(SPL.backup2)," \
 Tom> +					"128k(SPL.backup3),1920k(u-boot)," \
 Tom> +					"128k(u-boot-env),5m(kernel),-(rootfs)"

Is there a particular reason why the u-boot partition is so big?
Tom Rini - Feb. 27, 2013, 1:21 p.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/27/2013 03:54 AM, Peter Korsgaard wrote:
>>>>>> "Tom" == Tom Rini <trini@ti.com> writes:
> 
> Tom> Signed-off-by: Tom Rini <trini@ti.com> Tom> --- Tom>
> include/configs/am335x_evm.h |    9 +++++++++ Tom>  1 file changed,
> 9 insertions(+)
> 
> Tom> diff --git a/include/configs/am335x_evm.h
> b/include/configs/am335x_evm.h Tom> index 59647d1..61b861d 100644 
> Tom> --- a/include/configs/am335x_evm.h Tom> +++
> b/include/configs/am335x_evm.h Tom> @@ -60,6 +60,8 @@ Tom>
> "fdtfile=\0" \ Tom>  	"console=ttyO0,115200n8\0" \ Tom>
> "optargs=\0" \ Tom> +	"mtdids=" MTDIDS_DEFAULT "\0" \ Tom> +
> "mtdparts=" MTDPARTS_DEFAULT "\0" \ Tom>  	"mmcdev=0\0" \ Tom>
> "mmcroot=/dev/mmcblk0p2 ro\0" \ Tom>  	"mmcrootfstype=ext4
> rootwait\0" \ Tom> @@ -341,6 +343,13 @@ Tom>  /* NAND support */ 
> Tom>  #ifdef CONFIG_NAND Tom>  #define CONFIG_CMD_NAND Tom>
> +#define CONFIG_CMD_MTDPARTS Tom> +#define MTDIDS_DEFAULT
> "nand0=omap2-nand.0" Tom> +#define MTDPARTS_DEFAULT
> "mtdparts=omap2-nand.0:128k(SPL)," \ Tom> +
> "128k(SPL.backup1)," \ Tom> +					"128k(SPL.backup2)," \ Tom> +
> "128k(SPL.backup3),1920k(u-boot)," \ Tom> +
> "128k(u-boot-env),5m(kernel),-(rootfs)"
> 
> Is there a particular reason why the u-boot partition is so big?

Convention (which would allow for redundant copies of U-Boot within
this area) I believe.  Same as some of the semi-related boards.

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRLghGAAoJENk4IS6UOR1WU20QAJZdE9KI282/72AA6i47SDzG
G1TLymHDOddNBp2ylcjyxkdWNKRxk348Z/bGJ25VIv+jcbRv/SubTnyXsT1RkFX2
qxzJU5/hsMqEQ5++jVbAjph0zBCBFYR68XJ7r4vjLO0N9/eJKR/zNkxqMeQMMY2j
LVsdju2DfRYAWn9d8CuM2vRrf5iscK3PB6AEqO4SafMtHCxkzLScmAsvQMEUekkZ
sWkYRVnLEbSmdSnRdnHi0Yt0jiMSULVoGelMbyOA+I9FEsgQaaY0S4Sy7YOOR6ml
Ajkv8j7TZvHsOZRponsxv6dsJq9CZlnzlSLrhrXi1EjAKnSlUukF6D4mWdkMQnXX
MoX2o1ICLL5qti1fqlv6f+JWeT5a0PydWRHy9Y8+g3kZCRcXFLKwrdVb1F/x7AVt
5z1g6f9QEzw9CoJZDSRSLnc2+wdntsZs4KGGeoWFfqzQfej5eW11j43Is23zNkys
XB+6EILlotNttLoHJ2SzcHUG5dRKJ+I6sCuVDtWd90Bw7uFO1i9p+uwYcNhOiDXz
qbxu11ZSvH8A7/XD5vfdsDmStGl7+SMikO/rY0YHrS575AWcbOC4tcUaJtSHpyMD
nUDOsQ25G59pdA0+B2CoY22nbRM4tRpQA5S+jlSuAtYpPL5GcSifE6zXvO96zX9D
lUzhyJmHgxs8/caWWgFe
=NVWs
-----END PGP SIGNATURE-----

Patch

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 59647d1..61b861d 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -60,6 +60,8 @@ 
 	"fdtfile=\0" \
 	"console=ttyO0,115200n8\0" \
 	"optargs=\0" \
+	"mtdids=" MTDIDS_DEFAULT "\0" \
+	"mtdparts=" MTDPARTS_DEFAULT "\0" \
 	"mmcdev=0\0" \
 	"mmcroot=/dev/mmcblk0p2 ro\0" \
 	"mmcrootfstype=ext4 rootwait\0" \
@@ -341,6 +343,13 @@ 
 /* NAND support */
 #ifdef CONFIG_NAND
 #define CONFIG_CMD_NAND
+#define CONFIG_CMD_MTDPARTS
+#define MTDIDS_DEFAULT			"nand0=omap2-nand.0"
+#define MTDPARTS_DEFAULT		"mtdparts=omap2-nand.0:128k(SPL)," \
+					"128k(SPL.backup1)," \
+					"128k(SPL.backup2)," \
+					"128k(SPL.backup3),1920k(u-boot)," \
+					"128k(u-boot-env),5m(kernel),-(rootfs)"
 #define CONFIG_NAND_OMAP_GPMC
 #define GPMC_NAND_ECC_LP_x16_LAYOUT	1
 #define CONFIG_SYS_NAND_BASE		(0x08000000)	/* physical address */