From: Fabien Parent <fparent@baylibre.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/6] davinci: omapl138_lcdk: add NAND SPL boot support
Date: Tue, 29 Nov 2016 14:31:34 +0100 [thread overview]
Message-ID: <20161129133134.19415-7-fparent@baylibre.com> (raw)
In-Reply-To: <20161129133134.19415-1-fparent@baylibre.com>
NAND SPL boot was missing. Add it. The README specific to omapl138-lcdk
is also removed because its content does not apply anymore, i.e. the
generated AIS image can be flashed directly to the NAND without
using any external tool to create and bootable AIS image.
Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
board/davinci/da8xxevm/README.omapl138-lcdk | 28 ----------------------------
configs/omapl138_lcdk_defconfig | 3 +++
include/configs/omapl138_lcdk.h | 27 +++++++++++++++++++++++++++
3 files changed, 30 insertions(+), 28 deletions(-)
delete mode 100644 board/davinci/da8xxevm/README.omapl138-lcdk
diff --git a/board/davinci/da8xxevm/README.omapl138-lcdk b/board/davinci/da8xxevm/README.omapl138-lcdk
deleted file mode 100644
index ea0c53d..0000000
--- a/board/davinci/da8xxevm/README.omapl138-lcdk
+++ /dev/null
@@ -1,28 +0,0 @@
-Summary
-=======
-This README assumes you have read README.da850. It contains some additional
-information specific to building the omapl138-lcdk. The AIS file as generated
-by the build is, currently, not useable due to differences in the flash
-available on this board, as compared to the da850evm boards.
-
-Flash Differences
-=================
-Refer to the discussion in [1] for more detail - basically the da850evm uses
-SPI flash whereas the lcdk uses NAND flash to store the bootloader, and
-the support isn't there in the SPL code.
-
-It should be possible to add the support in the SPL code should someone be
-sufficiently motivated.
-
-Using the built image
-=====================
-The output image to use is u-boot.bin. This needs to be converted to an
-AIS file as described in [1] and then flashed using the utitilty linked to
-there and also described in README.da850. You _may_ be able to write using
-u-boot itself, but the commands in README.da850 won't work as they write to
-SPI rather than NAND.
-
-Links
-=====
-[1]
- http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/386829
\ No newline at end of file
diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig
index bcd1acb..c5c978f 100644
--- a/configs/omapl138_lcdk_defconfig
+++ b/configs/omapl138_lcdk_defconfig
@@ -3,6 +3,7 @@ CONFIG_ARCH_DAVINCI=y
CONFIG_TARGET_OMAPL138_LCDK=y
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SPL_NAND_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_BOOTDELAY=3
CONFIG_VERSION_VARIABLE=y
@@ -22,6 +23,8 @@ CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
CONFIG_CMD_UBI=y
+CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
+CONFIG_SYS_NAND_U_BOOT_OFFS=0x28000
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SPI_FLASH_WINBOND=y
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index 3e27778..e3f8265 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -131,6 +131,33 @@
#define CONFIG_SYS_NAND_MASK_ALE 0x8
#undef CONFIG_SYS_NAND_HW_ECC
#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND devices */
+#define CONFIG_SYS_NAND_HW_ECC_OOBFIRST
+#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_SIZE 0x200 /*0x60000*/
+#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 - \
+ CONFIG_SYS_NAND_U_BOOT_SIZE - \
+ CONFIG_SYS_MALLOC_LEN - \
+ GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_NAND_ECCPOS { \
+ 24, 25, 26, 27, 28, \
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, \
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, \
+ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, \
+ 59, 60, 61, 62, 63 }
+#define CONFIG_SYS_NAND_PAGE_COUNT 64
+#define CONFIG_SYS_NAND_BAD_BLOCK_POS 0
+#define CONFIG_SYS_NAND_ECCSIZE 512
+#define CONFIG_SYS_NAND_ECCBYTES 10
+#define CONFIG_SYS_NAND_OOBSIZE 64
+#define CONFIG_SPL_NAND_BASE
+#define CONFIG_SPL_NAND_DRIVERS
+#define CONFIG_SPL_NAND_ECC
+#define CONFIG_SPL_NAND_SIMPLE
+#define CONFIG_SPL_NAND_LOAD
#endif
#ifdef CONFIG_SYS_USE_NOR
--
2.10.2
next prev parent reply other threads:[~2016-11-29 13:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-29 13:31 [U-Boot] [PATCH 0/6] davinci: omapl138_lcdk: add SPL NAND boot support Fabien Parent
2016-11-29 13:31 ` [U-Boot] [PATCH 1/6] NAND: davinci: add support for NAND chips with 16 bits bus Fabien Parent
2016-11-29 18:08 ` Tom Rini
2016-12-04 0:56 ` [U-Boot] [U-Boot, " Tom Rini
2016-11-29 13:31 ` [U-Boot] [PATCH 2/6] davinci: omapl138_lcdk: use correct define for 16 bit NAND chips Fabien Parent
2016-11-29 18:08 ` Tom Rini
2016-12-04 0:57 ` [U-Boot] [U-Boot, " Tom Rini
2016-11-29 13:31 ` [U-Boot] [PATCH 3/6] davinci: omapl138_lcdk: use correct name for CONFIG_SYS_NAND_MASK_CLE Fabien Parent
2016-11-29 18:09 ` Tom Rini
2016-12-04 0:59 ` [U-Boot] [U-Boot, " Tom Rini
2016-11-29 13:31 ` [U-Boot] [PATCH 4/6] davinci: omapl138_lcdk: use correct name for CONFIG_SYS_NAND_MASK_ALE Fabien Parent
2016-11-29 18:09 ` Tom Rini
2016-12-04 0:59 ` [U-Boot] [U-Boot, " Tom Rini
2016-11-29 13:31 ` [U-Boot] [PATCH 5/6] davinci: omapl138_lck: remove obsolete define Fabien Parent
2016-11-29 18:09 ` Tom Rini
2016-12-04 1:00 ` [U-Boot] [U-Boot, " Tom Rini
2016-11-29 13:31 ` Fabien Parent [this message]
2016-11-29 18:10 ` [U-Boot] [PATCH 6/6] davinci: omapl138_lcdk: add NAND SPL boot support Tom Rini
2016-12-04 1:00 ` [U-Boot] [U-Boot, " Tom Rini
2016-11-29 18:10 ` [U-Boot] [PATCH 0/6] davinci: omapl138_lcdk: add SPL NAND " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161129133134.19415-7-fparent@baylibre.com \
--to=fparent@baylibre.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.