Skip to contentSkip to conversation

ARM: configs: Add da850evm_nand to boot from NAND

PATCH New Adam Ford 2 participants 2 messages Aug 15, 2018 – Sep 18, 2018

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH v2 1/1 ARM: configs: Add da850evm_nand to boot from NAND

The DA850-EVM supports booting from NAND when used with the UI expander board. da850evm_nand will create an ais file that can be burned to NAND and booted while storing the env in NAND along with some partitions tables for storing kernel, dtb and rootfs in NAND.

---
V2: Increase the U-Boot size to fit u-boot.ais (not u-boot.bin)

board/davinci/da8xxevm/MAINTAINERS +1 -0
index 99b4786dd5..59589867b3 100644
@@ -5,6 +5,7 @@ F:	board/davinci/da8xxevm/
 F:	include/configs/da850evm.h
 F:	configs/da850_am18xxevm_defconfig
 F:	configs/da850evm_defconfig
+F:	configs/da850evm_nand_defconfig
 F:	configs/da850evm_direct_nor_defconfig
 
 OMAPL138_LCDK BOARD
configs/da850evm_nand_defconfig new file +60 -0

60 lines not on this page · raw message

include/configs/da850evm.h +8 -3
index 3dcd1390ca..93aa02cfa0 100644
@@ -37,6 +37,7 @@
 #define CONFIG_SYS_OSCIN_FREQ		24000000
 #define CONFIG_SYS_TIMERBASE		DAVINCI_TIMER0_BASE
 #define CONFIG_SYS_HZ_CLOCK		clk_get(DAVINCI_AUXCLK_CLKID)
+#define CONFIG_SKIP_LOWLEVEL_INIT
 
 #ifdef CONFIG_DIRECT_NOR_BOOT
 #define CONFIG_ARCH_CPU_INIT
@@ -149,8 +150,11 @@
  * Flash & Environment
  */
 #ifdef CONFIG_NAND
+#ifdef CONFIG_ENV_IS_IN_NAND
 #define CONFIG_ENV_OFFSET		0x0 /* Block 0--not used by bootcode */
 #define CONFIG_ENV_SIZE			(128 << 10)
+#define CONFIG_ENV_SECT_SIZE	(128 << 10)
+#endif
 #define	CONFIG_SYS_NAND_USE_FLASH_BBT
 #define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
 #define	CONFIG_SYS_NAND_PAGE_2K
@@ -164,8 +168,7 @@
 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
 #define CONFIG_SYS_NAND_PAGE_SIZE	(2 << 10)
 #define CONFIG_SYS_NAND_BLOCK_SIZE	(128 << 10)
-#define CONFIG_SYS_NAND_U_BOOT_OFFS	0x28000
-#define CONFIG_SYS_NAND_U_BOOT_SIZE	0x60000
+#define CONFIG_SYS_NAND_U_BOOT_SIZE	0x40000
 #define CONFIG_SYS_NAND_U_BOOT_DST	0xc1080000
 #define CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_NAND_U_BOOT_DST
 #define CONFIG_SYS_NAND_U_BOOT_RELOC_SP	(CONFIG_SYS_NAND_U_BOOT_DST - \
@@ -215,9 +218,11 @@
 #endif
 
 #ifdef CONFIG_USE_SPIFLASH
+#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
 #define CONFIG_ENV_SIZE			(64 << 10)
 #define CONFIG_ENV_OFFSET		(512 << 10)
-#define CONFIG_ENV_SECT_SIZE		(64 << 10)
+#define CONFIG_ENV_SECT_SIZE	(64 << 10)
+#endif
 #ifdef CONFIG_SPL_BUILD
 #undef CONFIG_SPI_FLASH_MTD
 #endif
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/1 ARM: configs: Add da850evm_nand to boot from NAND

Quoted 7 lines · Adam Ford

The DA850-EVM supports booting from NAND when used with the UI expander board. da850evm_nand will create an ais file that can be burned to NAND and booted while storing the env in NAND along with some partitions tables for storing kernel, dtb and rootfs in NAND.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180918/c2b4ac12/attachment.sig>