[U-Boot] [PATCH v2 0/2] configs: ks2: Move NAND configs to defconfigs

This series move NAND specific configs to defconfigs. This fixes an asynchronous abort generated by NAND on K2G-evm.
Tested on K2g-evm: With this series: http://pastebin.ubuntu.com/15804343/ Without this series: http://pastebin.ubuntu.com/15804352/
Changes since v1: - Move NAND configs to defconfigs. V1 posted here: http://patchwork.ozlabs.org/patch/607940/
Lokesh Vutla (2): memory: Move TI_AEMIF config to KCONFIG configs: ks2: move CMD_NAND to defconfigs
board/ti/ks2_evm/board.c | 5 +++++ configs/k2e_evm_defconfig | 2 ++ configs/k2hk_evm_defconfig | 2 ++ configs/k2l_evm_defconfig | 2 ++ drivers/Kconfig | 2 ++ drivers/memory/Kconfig | 18 ++++++++++++++++++ include/configs/ti_armv7_keystone2.h | 3 --- 7 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 drivers/memory/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 nm@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com --- board/ti/ks2_evm/board.c | 5 +++++ configs/k2e_evm_defconfig | 1 + configs/k2hk_evm_defconfig | 1 + configs/k2l_evm_defconfig | 1 + drivers/Kconfig | 2 ++ drivers/memory/Kconfig | 18 ++++++++++++++++++ include/configs/ti_armv7_keystone2.h | 2 -- 7 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 drivers/memory/Kconfig
diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c index e16669d..9e8ad93 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; diff --git a/configs/k2e_evm_defconfig b/configs/k2e_evm_defconfig index a3fa758..f45bce0 100644 --- a/configs/k2e_evm_defconfig +++ b/configs/k2e_evm_defconfig @@ -15,3 +15,4 @@ CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_DM_ETH=y CONFIG_SYS_NS16550=y +CONFIG_TI_AEMIF=y diff --git a/configs/k2hk_evm_defconfig b/configs/k2hk_evm_defconfig index 83efcbb..56b3fe4 100644 --- a/configs/k2hk_evm_defconfig +++ b/configs/k2hk_evm_defconfig @@ -15,3 +15,4 @@ CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_DM_ETH=y CONFIG_SYS_NS16550=y +CONFIG_TI_AEMIF=y diff --git a/configs/k2l_evm_defconfig b/configs/k2l_evm_defconfig index d2ebb1d..3863c56 100644 --- a/configs/k2l_evm_defconfig +++ b/configs/k2l_evm_defconfig @@ -15,3 +15,4 @@ CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_DM_ETH=y CONFIG_SYS_NS16550=y +CONFIG_TI_AEMIF=y diff --git a/drivers/Kconfig b/drivers/Kconfig index c82a94b..118b66e 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -30,6 +30,8 @@ source "drivers/input/Kconfig"
source "drivers/led/Kconfig"
+source "drivers/memory/Kconfig" + source "drivers/misc/Kconfig"
source "drivers/mmc/Kconfig" diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig new file mode 100644 index 0000000..4fbb5aa --- /dev/null +++ b/drivers/memory/Kconfig @@ -0,0 +1,18 @@ +# +# Memory devices +# + +menu "Memory Controller drivers" + +config TI_AEMIF + tristate "Texas Instruments AEMIF driver" + depends on ARCH_KEYSTONE + help + This driver is for the AEMIF module available in Texas Instruments + SoCs. AEMIF stands for Asynchronous External Memory Interface and + is intended to provide a glue-less interface to a variety of + asynchronuous memory devices like ASRAM, NOR and NAND memory. A total + of 256M bytes of any of these memories can be accessed at a given + time via four chip selects with 64M byte access per chip select. + +endmenu diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h index 41185a1..61c7174 100644 --- a/include/configs/ti_armv7_keystone2.h +++ b/include/configs/ti_armv7_keystone2.h @@ -145,8 +145,6 @@ /* SerDes */ #define CONFIG_TI_KEYSTONE_SERDES
-/* AEMIF */ -#define CONFIG_TI_AEMIF #define CONFIG_AEMIF_CNTRL_BASE KS2_AEMIF_CNTRL_BASE
/* I2C Configuration */

On Wed, Apr 13, 2016 at 09:50:59AM +0530, Lokesh Vutla wrote:
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 nm@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

On Wed, Apr 13, 2016 at 09:50:59AM +0530, Lokesh Vutla wrote:
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 nm@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!

NAND is not yet enabled on all Keystone2 platforms. So enabled CMD_NAND in the respective defconfigs only if available.
Reported-by: Nishanth Menon nm@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com --- configs/k2e_evm_defconfig | 1 + configs/k2hk_evm_defconfig | 1 + configs/k2l_evm_defconfig | 1 + include/configs/ti_armv7_keystone2.h | 1 - 4 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/configs/k2e_evm_defconfig b/configs/k2e_evm_defconfig index f45bce0..c843508 100644 --- a/configs/k2e_evm_defconfig +++ b/configs/k2e_evm_defconfig @@ -16,3 +16,4 @@ CONFIG_SPI_FLASH_STMICRO=y CONFIG_DM_ETH=y CONFIG_SYS_NS16550=y CONFIG_TI_AEMIF=y +CONFIG_CMD_NAND=y diff --git a/configs/k2hk_evm_defconfig b/configs/k2hk_evm_defconfig index 56b3fe4..1627065 100644 --- a/configs/k2hk_evm_defconfig +++ b/configs/k2hk_evm_defconfig @@ -16,3 +16,4 @@ CONFIG_SPI_FLASH_STMICRO=y CONFIG_DM_ETH=y CONFIG_SYS_NS16550=y CONFIG_TI_AEMIF=y +CONFIG_CMD_NAND=y diff --git a/configs/k2l_evm_defconfig b/configs/k2l_evm_defconfig index 3863c56..255f6d1 100644 --- a/configs/k2l_evm_defconfig +++ b/configs/k2l_evm_defconfig @@ -16,3 +16,4 @@ CONFIG_SPI_FLASH_STMICRO=y CONFIG_DM_ETH=y CONFIG_SYS_NS16550=y CONFIG_TI_AEMIF=y +CONFIG_CMD_NAND=y diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h index 61c7174..be3c299 100644 --- a/include/configs/ti_armv7_keystone2.h +++ b/include/configs/ti_armv7_keystone2.h @@ -208,7 +208,6 @@ #define CONFIG_CMD_DHCP #define CONFIG_CMD_PING #define CONFIG_CMD_SAVES -#define CONFIG_CMD_NAND #define CONFIG_CMD_UBI #define CONFIG_CMD_UBIFS #define CONFIG_CMD_SF

On Wed, Apr 13, 2016 at 09:51:00AM +0530, Lokesh Vutla wrote:
NAND is not yet enabled on all Keystone2 platforms. So enabled CMD_NAND in the respective defconfigs only if available.
Reported-by: Nishanth Menon nm@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com
Reviewed-by: Tom Rini trini@konsulko.com

On Wed, Apr 13, 2016 at 09:51:00AM +0530, Lokesh Vutla wrote:
NAND is not yet enabled on all Keystone2 platforms. So enabled CMD_NAND in the respective defconfigs only if available.
Reported-by: Nishanth Menon nm@ti.com Signed-off-by: Lokesh Vutla lokeshvutla@ti.com Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!
participants (2)
-
Lokesh Vutla
-
Tom Rini