From: Ivan Khoronzhuk Date: Tue, 24 Jun 2014 16:49:06 +0300 Subject: [U-Boot] [U-boot] [Patch v3 3/3] k2hk: change default nand ecc layout In-Reply-To: <1403617746-25024-1-git-send-email-ivan.khoronzhuk@ti.com> References: <1403617746-25024-1-git-send-email-ivan.khoronzhuk@ti.com> Message-ID: <1403617746-25024-4-git-send-email-ivan.khoronzhuk@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de For keystyone k2hk board the default nand layout is different from davinci. So swich ecc layout at init in board file. Signed-off-by: Ivan Khoronzhuk --- board/ti/k2hk_evm/board.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/board/ti/k2hk_evm/board.c b/board/ti/k2hk_evm/board.c index ef90f9d..baa6ab7 100644 --- a/board/ti/k2hk_evm/board.c +++ b/board/ti/k2hk_evm/board.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -19,6 +20,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -147,6 +149,15 @@ int cpu_to_bus(u32 *ptr, u32 length) return 0; } +int board_nand_init(struct nand_chip *chip) +{ + davinci_nand_init(chip); + chip->ecc.layout = + board_nand_get_ecclayout(NAND_KEYSTONE_RBL_4BIT_LAYOUT); + + return 0; +} + #if defined(CONFIG_BOARD_EARLY_INIT_F) int board_early_init_f(void) { -- 1.8.3.2