]> git.ipfire.org Git - people/ms/u-boot.git/commit
mtd: nand: davinci: add opportunity to write keystone U-boot image
authorKhoronzhuk, Ivan <ivan.khoronzhuk@ti.com>
Fri, 4 Jul 2014 12:03:25 +0000 (15:03 +0300)
committerTom Rini <trini@ti.com>
Fri, 25 Jul 2014 19:21:06 +0000 (15:21 -0400)
commit67ac6ffaeefb93ff294f976cbb03479f84aa0b1a
treed97b87e29f4628241c2a114727786fe38c676fb1
parent7aa5598aac3faf9188559f7a50940df11c30b656
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>
drivers/mtd/nand/davinci_nand.c
include/configs/k2hk_evm.h