Skip to contentSkip to conversation

configs: ks2: Move NAND configs to defconfigs

PATCH New Lokesh Vutla 2 participants 7 messages Apr 13, 2016 – Apr 21, 2016 Memory controller drivers

lore
Share & tools
lore
#0 lore raw

v2 cover 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
Signature · 1 line
2.1.4
#1 lore raw

PATCH v2 1/2 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.

---
 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
board/ti/ks2_evm/board.c +5 -0
index e16669d..9e8ad93 100644
@@ -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;
configs/k2e_evm_defconfig +1 -0
index a3fa758..f45bce0 100644
@@ -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
configs/k2hk_evm_defconfig +1 -0
index 83efcbb..56b3fe4 100644
@@ -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
configs/k2l_evm_defconfig +1 -0
index d2ebb1d..3863c56 100644
@@ -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
drivers/Kconfig +2 -0
index c82a94b..118b66e 100644
@@ -30,6 +30,8 @@ source "drivers/input/Kconfig"
 
 source "drivers/led/Kconfig"
 
+source "drivers/memory/Kconfig"
+
 source "drivers/misc/Kconfig"
 
 source "drivers/mmc/Kconfig"
drivers/memory/Kconfig new file +18 -0
new file mode 100644
index 0000000..4fbb5aa
@@ -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
include/configs/ti_armv7_keystone2.h +0 -2
index 41185a1..61c7174 100644
@@ -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 */
Signature · 1 line
2.1.4
#2 lore raw

PATCH v2 1/2 memory: Move TI_AEMIF config to KCONFIG

Quoted 6 lines · Lokesh Vutla

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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160415/3e57dd87/attachment.sig>
#3 lore raw

PATCH v2 1/2 memory: Move TI_AEMIF config to KCONFIG

In reply to Lokesh Vutla
Quoted 7 lines · Lokesh Vutla

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/d6144517/attachment.sig>
#4 lore raw

PATCH v2 2/2 configs: ks2: move CMD_NAND to defconfigs

In reply to Lokesh Vutla

NAND is not yet enabled on all Keystone2 platforms. So enabled CMD_NAND in the respective defconfigs only if available.

---
 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(-)
configs/k2e_evm_defconfig +1 -0
index f45bce0..c843508 100644
@@ -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
configs/k2hk_evm_defconfig +1 -0
index 56b3fe4..1627065 100644
@@ -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
configs/k2l_evm_defconfig +1 -0
index 3863c56..255f6d1 100644
@@ -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
include/configs/ti_armv7_keystone2.h +0 -1
index 61c7174..be3c299 100644
@@ -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
Signature · 1 line
2.1.4
#5 lore raw

PATCH v2 2/2 configs: ks2: move CMD_NAND to defconfigs

Quoted 5 lines · Lokesh Vutla

NAND is not yet enabled on all Keystone2 platforms. So enabled CMD_NAND in the respective defconfigs only if available.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160415/afae056d/attachment.sig>
#6 lore raw

PATCH v2 2/2 configs: ks2: move CMD_NAND to defconfigs

In reply to Lokesh Vutla
Quoted 6 lines · Lokesh Vutla

NAND is not yet enabled on all Keystone2 platforms. So enabled CMD_NAND in the respective defconfigs only if available.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/123b22fc/attachment.sig>