* [U-Boot] [PATCH] mx28evk: Introduce a new target for saving env vars to NAND
@ 2013-03-07 21:28 Fabio Estevam
2013-03-08 13:44 ` Otavio Salvador
2013-04-03 8:56 ` Stefano Babic
0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2013-03-07 21:28 UTC (permalink / raw)
To: u-boot
Introduce 'mx28evk_nand' target for saving environment variables into NAND.
The mx28evk board does not come with a NAND flash populated from the
factory. It comes with an empty slot (U23), which allows the insertion of a
48-pin TSOP flash device.
Tested with a K9LBG08U0D.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
boards.cfg | 3 ++-
doc/README.mx28evk | 18 ++++++++++++++++++
include/configs/mx28evk.h | 31 ++++++++++++++++++++++++++++++-
3 files changed, 50 insertions(+), 2 deletions(-)
diff --git a/boards.cfg b/boards.cfg
index 7a0b79d..a9a061b 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -195,7 +195,8 @@ mx23_olinuxino arm arm926ejs mx23_olinuxino olimex
apx4devkit arm arm926ejs apx4devkit bluegiga mxs apx4devkit
mx23evk arm arm926ejs mx23evk freescale mxs mx23evk
m28evk arm arm926ejs m28evk denx mxs m28evk
-mx28evk arm arm926ejs mx28evk freescale mxs mx28evk
+mx28evk arm arm926ejs mx28evk freescale mxs mx28evk:ENV_IS_IN_MMC
+mx28evk_nand arm arm926ejs mx28evk freescale mxs mx28evk:ENV_IS_IN_NAND
sc_sps_1 arm arm926ejs sc_sps_1 schulercontrol mxs
nhk8815 arm arm926ejs nhk8815 st nomadik
nhk8815_onenand arm arm926ejs nhk8815 st nomadik nhk8815:BOOT_ONENAND
diff --git a/doc/README.mx28evk b/doc/README.mx28evk
index 2fc5069..d0c5ae8 100644
--- a/doc/README.mx28evk
+++ b/doc/README.mx28evk
@@ -23,6 +23,24 @@ To boot MX28EVK from an SD card, set the boot mode DIP switches as:
* VDD 5V: To the left (off)
* Hold Button: Down (off)
+
+Environment Storage
+-------------------
+
+There are two targets for mx28evk:
+
+"make mx28evk_config" - store enviroment variables into MMC
+
+or
+
+"make mx28evk_nand_config" - store enviroment variables into NAND flash
+
+Choose the target accordingly.
+
+Note: The mx28evk board does not come with a NAND flash populated from the
+factory. It comes with an empty slot (U23), which allows the insertion of a
+48-pin TSOP flash device.
+
Follow the instructions from doc/README.mx28_common to generate a bootable SD
card.
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 0d918a1..9cc236f 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -69,6 +69,7 @@
#define CONFIG_CMD_USB
#define CONFIG_CMD_BOOTZ
#define CONFIG_CMD_I2C
+#define CONFIG_CMD_NAND
/*
* Memory configurations
@@ -132,7 +133,6 @@
/*
* MMC Driver
*/
-#define CONFIG_ENV_IS_IN_MMC
#ifdef CONFIG_ENV_IS_IN_MMC
#define CONFIG_ENV_OFFSET (256 * 1024)
#define CONFIG_ENV_SIZE (16 * 1024)
@@ -149,11 +149,40 @@
/*
* NAND Driver
*/
+#define CONFIG_ENV_SIZE (16 * 1024)
#ifdef CONFIG_CMD_NAND
#define CONFIG_NAND_MXS
#define CONFIG_SYS_MAX_NAND_DEVICE 1
#define CONFIG_SYS_NAND_BASE 0x60000000
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
+
+/* Environment is in NAND */
+#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+#define CONFIG_ENV_SECT_SIZE (128 * 1024)
+#define CONFIG_ENV_RANGE (512 * 1024)
+#ifndef CONFIG_ENV_OFFSET
+#define CONFIG_ENV_OFFSET 0x300000
+#endif
+#define CONFIG_ENV_OFFSET_REDUND \
+ (CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE)
+
+#define CONFIG_CMD_UBI
+#define CONFIG_CMD_UBIFS
+#define CONFIG_CMD_MTDPARTS
+#define CONFIG_RBTREE
+#define CONFIG_LZO
+#define CONFIG_MTD_DEVICE
+#define CONFIG_MTD_PARTITIONS
+#define MTDIDS_DEFAULT "nand0=gpmi-nand"
+#define MTDPARTS_DEFAULT \
+ "mtdparts=gpmi-nand:" \
+ "3m(bootloader)ro," \
+ "512k(environment)," \
+ "512k(redundant-environment)," \
+ "4m(kernel)," \
+ "128k(fdt)," \
+ "8m(ramdisk)," \
+ "-(filesystem)"
#endif
/*
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] mx28evk: Introduce a new target for saving env vars to NAND
2013-03-07 21:28 [U-Boot] [PATCH] mx28evk: Introduce a new target for saving env vars to NAND Fabio Estevam
@ 2013-03-08 13:44 ` Otavio Salvador
2013-04-03 8:56 ` Stefano Babic
1 sibling, 0 replies; 3+ messages in thread
From: Otavio Salvador @ 2013-03-08 13:44 UTC (permalink / raw)
To: u-boot
On Thu, Mar 7, 2013 at 6:28 PM, Fabio Estevam
<fabio.estevam@freescale.com> wrote:
> Introduce 'mx28evk_nand' target for saving environment variables into NAND.
>
> The mx28evk board does not come with a NAND flash populated from the
> factory. It comes with an empty slot (U23), which allows the insertion of a
> 48-pin TSOP flash device.
>
> Tested with a K9LBG08U0D.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>
--
Otavio Salvador O.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] mx28evk: Introduce a new target for saving env vars to NAND
2013-03-07 21:28 [U-Boot] [PATCH] mx28evk: Introduce a new target for saving env vars to NAND Fabio Estevam
2013-03-08 13:44 ` Otavio Salvador
@ 2013-04-03 8:56 ` Stefano Babic
1 sibling, 0 replies; 3+ messages in thread
From: Stefano Babic @ 2013-04-03 8:56 UTC (permalink / raw)
To: u-boot
On 07/03/2013 22:28, Fabio Estevam wrote:
> Introduce 'mx28evk_nand' target for saving environment variables into NAND.
>
> The mx28evk board does not come with a NAND flash populated from the
> factory. It comes with an empty slot (U23), which allows the insertion of a
> 48-pin TSOP flash device.
>
> Tested with a K9LBG08U0D.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Applied to u-boot-imx (Fabio, I rebased on current TOT), thanks.
Best regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-03 8:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-07 21:28 [U-Boot] [PATCH] mx28evk: Introduce a new target for saving env vars to NAND Fabio Estevam
2013-03-08 13:44 ` Otavio Salvador
2013-04-03 8:56 ` Stefano Babic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox