summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKhoronzhuk, Ivan <ivan.khoronzhuk@ti.com>2014-07-04 15:03:25 +0300
committerTom Rini <trini@ti.com>2014-07-25 15:21:06 -0400
commit67ac6ffaeefb93ff294f976cbb03479f84aa0b1a (patch)
treed97b87e29f4628241c2a114727786fe38c676fb1 /include
parent7aa5598aac3faf9188559f7a50940df11c30b656 (diff)
downloadu-boot-imx-67ac6ffaeefb93ff294f976cbb03479f84aa0b1a.zip
u-boot-imx-67ac6ffaeefb93ff294f976cbb03479f84aa0b1a.tar.gz
u-boot-imx-67ac6ffaeefb93ff294f976cbb03479f84aa0b1a.tar.bz2
mtd: nand: davinci: add opportunity to write keystone U-boot image
The Keystone SoCs use the same NAND driver as Davinci. This patch adds opportunity to write Keystone U-boot image to NAND device using appropriate RBL ECC layout. This is needed only if RBL boots U-boot from NAND device and that's supposed that raw u-boot partition is used only for writing image. The main problem is that default Davinci ECC layout is different from Keystone RBL layout. To read U-boot image the RBL needs that image was written using RBL ECC layout. The BBT table is written using default Davinci layout and has to be updated using one. The BBT can be updated only while erasing chip or by forced bad block assigning, so erase function has to use native ecc layout in order to be able to write BBT correctly. So if we're writing to NAND U-boot address we use RBL layout for others we use default ECC layout. Also remove definition for CONFIG_CMD_NAND_ECCLAYOUT as there is no reasons to use ECC layout commands. It was added by mistake. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Diffstat (limited to 'include')
-rw-r--r--include/configs/k2hk_evm.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/configs/k2hk_evm.h b/include/configs/k2hk_evm.h
index 858329f..3f87741 100644
--- a/include/configs/k2hk_evm.h
+++ b/include/configs/k2hk_evm.h
@@ -135,7 +135,8 @@
/* NAND Configuration */
#define CONFIG_NAND_DAVINCI
-#define CONFIG_CMD_NAND_ECCLAYOUT
+#define CONFIG_KEYSTONE_RBL_NAND
+#define CONFIG_KEYSTONE_NAND_MAX_RBL_SIZE CONFIG_ENV_OFFSET
#define CONFIG_SYS_NAND_CS 2
#define CONFIG_SYS_NAND_USE_FLASH_BBT
#define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
@@ -155,6 +156,7 @@
#define CONFIG_MTD_DEVICE
#define CONFIG_RBTREE
#define CONFIG_LZO
+#define MTDIDS_DEFAULT "nand0=davinci_nand.0"
#define MTDPARTS_DEFAULT "mtdparts=davinci_nand.0:" \
"1024k(bootloader)ro,512k(params)ro," \
"-(ubifs)"