Re: [U-Boot] [PATCH 4/4] configs: ti_omap5_common: Add NAND environment settings

2019-02-26 Thread Faiz Abbas
Hi Tom,

On 22/02/19 4:52 AM, Tom Rini wrote:
> On Wed, Feb 20, 2019 at 03:34:53PM +0530, Faiz Abbas wrote:
> 
>> Now that NAND is supported on DRA71x include various NAND environment
>> settings
>>
>> Signed-off-by: Faiz Abbas 
> [snip]
>> +#ifdef CONFIG_NAND
>> +#define NANDARGS \
>> +"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
>> +"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
>> +"nandargs=setenv bootargs console=${console} " \
>> +"${optargs} " \
>> +"root=${nandroot} " \
>> +"rootfstype=${nandrootfstype}\0" \
>> +"nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048\0" \
>> +"nandrootfstype=ubifs rootwait=1\0" \
>> +"nandboot=echo Booting from nand ...; " \
>> +"run nandargs; " \
>> +"nand read ${fdtaddr} NAND.u-boot-spl-os; " \
>> +"nand read ${loadaddr} NAND.kernel; " \
>> +"bootz ${loadaddr} - ${fdtaddr}\0"
>> +#else
>> +#define NANDARGS ""
>> +#endif
> 
> This kind of stuff needs to fit into include/environment/ti/ somehow,
> not added to, thanks!
> 

Ok. I will create an environment/ti/nand.h

Thanks,
Faiz
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] configs: ti_omap5_common: Add NAND environment settings

2019-02-21 Thread Tom Rini
On Wed, Feb 20, 2019 at 03:34:53PM +0530, Faiz Abbas wrote:

> Now that NAND is supported on DRA71x include various NAND environment
> settings
> 
> Signed-off-by: Faiz Abbas 
[snip]
> +#ifdef CONFIG_NAND
> +#define NANDARGS \
> + "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
> + "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
> + "nandargs=setenv bootargs console=${console} " \
> + "${optargs} " \
> + "root=${nandroot} " \
> + "rootfstype=${nandrootfstype}\0" \
> + "nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048\0" \
> + "nandrootfstype=ubifs rootwait=1\0" \
> + "nandboot=echo Booting from nand ...; " \
> + "run nandargs; " \
> + "nand read ${fdtaddr} NAND.u-boot-spl-os; " \
> + "nand read ${loadaddr} NAND.kernel; " \
> + "bootz ${loadaddr} - ${fdtaddr}\0"
> +#else
> +#define NANDARGS ""
> +#endif

This kind of stuff needs to fit into include/environment/ti/ somehow,
not added to, thanks!

-- 
Tom


signature.asc
Description: PGP signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 4/4] configs: ti_omap5_common: Add NAND environment settings

2019-02-20 Thread Faiz Abbas
Now that NAND is supported on DRA71x include various NAND environment
settings

Signed-off-by: Faiz Abbas 
---
 configs/dra7xx_evm_defconfig  |  4 +++-
 configs/dra7xx_hs_evm_defconfig   |  4 +++-
 include/configs/dra7xx_evm.h  |  2 +-
 include/configs/ti_omap5_common.h | 20 
 4 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index 7b8517a06d..3f194ed2aa 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -23,13 +23,15 @@ CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_SEPARATE_BSS=y
 CONFIG_SPL_DMA_SUPPORT=y
-# CONFIG_SPL_NAND_SUPPORT is not set
 CONFIG_SPL_OS_BOOT=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_CMD_SPL=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_NAND=y
 # CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nand0=nand.0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:256k(NAND.SPL),256k(NAND.SPL.backup1),256k(NAND.SPL.backup2),256k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),2m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)"
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="dra7-evm"
diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig
index ad8c612729..d3a7afc6d1 100644
--- a/configs/dra7xx_hs_evm_defconfig
+++ b/configs/dra7xx_hs_evm_defconfig
@@ -33,7 +33,9 @@ CONFIG_SPL_DMA_SUPPORT=y
 CONFIG_SPL_SPI_LOAD=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_NAND=y
-# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nand0=nand.0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:256k(NAND.SPL),256k(NAND.SPL.backup1),256k(NAND.SPL.backup2),256k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),2m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)"
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="dra7-evm"
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index f36a9c3e08..955d315608 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -136,7 +136,7 @@
 50, 51, 52, 53, 54, 55, 56, 57, }
 #define CONFIG_SYS_NAND_ECCSIZE512
 #define CONFIG_SYS_NAND_ECCBYTES   14
-#define CONFIG_SYS_NAND_U_BOOT_OFFS0x000c
+#define CONFIG_SYS_NAND_U_BOOT_OFFS0x0014
 /* NAND: SPL related configs */
 /* NAND: SPL falcon mode configs */
 #ifdef CONFIG_SPL_OS_BOOT
diff --git a/include/configs/ti_omap5_common.h 
b/include/configs/ti_omap5_common.h
index ba57c40182..1ba20a4a7f 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -65,6 +65,7 @@
DEFAULT_FDT_TI_ARGS \
DFUARGS \
NETARGS \
+   NANDARGS \
 
 /*
  * SPL related defines.  The Public RAM memory map the ROM defines the
@@ -101,6 +102,25 @@
 #define CONFIG_SYS_SPL_ARGS_ADDR   (CONFIG_SYS_SDRAM_BASE + \
 (128 << 20))
 
+#ifdef CONFIG_NAND
+#define NANDARGS \
+   "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
+   "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
+   "nandargs=setenv bootargs console=${console} " \
+   "${optargs} " \
+   "root=${nandroot} " \
+   "rootfstype=${nandrootfstype}\0" \
+   "nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048\0" \
+   "nandrootfstype=ubifs rootwait=1\0" \
+   "nandboot=echo Booting from nand ...; " \
+   "run nandargs; " \
+   "nand read ${fdtaddr} NAND.u-boot-spl-os; " \
+   "nand read ${loadaddr} NAND.kernel; " \
+   "bootz ${loadaddr} - ${fdtaddr}\0"
+#else
+#define NANDARGS ""
+#endif
+
 #ifdef CONFIG_SPL_BUILD
 #undef CONFIG_TIMER
 #endif
-- 
2.19.2

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot