From 8f69523213a2929fda1fb62fe018684444586c1b Mon Sep 17 00:00:00 2001 From: Lokesh Vutla Date: Wed, 13 Apr 2016 09:50:59 +0530 Subject: memory: Move TI_AEMIF config to KCONFIG Not all Keystone2 devices has AEMIF NAND controller. So adding Kconfig entry for CONFIG_TI_AEMIF and enabling it in respective defconfigs on platforms with AEMIF controller. Reported-by: Nishanth Menon Signed-off-by: Lokesh Vutla Reviewed-by: Tom Rini --- board/ti/ks2_evm/board.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'board') diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c index e16669da081..9e8ad932d4d 100644 --- a/board/ti/ks2_evm/board.c +++ b/board/ti/ks2_evm/board.c @@ -20,6 +20,7 @@ DECLARE_GLOBAL_DATA_PTR; +#if defined(CONFIG_TI_AEMIF) static struct aemif_config aemif_configs[] = { { /* CS0 */ .mode = AEMIF_MODE_NAND, @@ -33,6 +34,7 @@ static struct aemif_config aemif_configs[] = { .width = AEMIF_WIDTH_8, }, }; +#endif int dram_init(void) { @@ -42,7 +44,10 @@ int dram_init(void) gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, CONFIG_MAX_RAM_BANK_SIZE); +#if defined(CONFIG_TI_AEMIF) aemif_init(ARRAY_SIZE(aemif_configs), aemif_configs); +#endif + if (ddr3_size) ddr3_init_ecc(KS2_DDR3A_EMIF_CTRL_BASE, ddr3_size); return 0; -- cgit v1.2.3