Skip to contentSkip to conversation

Convert CONFIG_APBH_DMA et al to Kconfig

PATCH Superseded Adam Ford 2 participants 4 messages Feb 5, 2018 – Feb 6, 2018

Subsystems (4)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH v2 1/1 Convert CONFIG_APBH_DMA et al to Kconfig

This converts the following to Kconfig:
CONFIG_APBH_DMA
CONFIG_APBH_DMA_BURST
CONFIG_APBH_DMA_BURST8

---
Changes in V2:
Rebase on [U-Boot,v2,1/6] Convert CONFIG_NAND_MXS to Kconfig Make the NAND controller in MX6 MX7 autoselect the DMA options

 configs/bg0900_defconfig                |  1 +
 configs/mx23_olinuxino_defconfig        |  1 +
 configs/mx23evk_defconfig               |  1 +
 configs/mx28evk_auart_console_defconfig |  3 +--
 configs/mx28evk_defconfig               |  3 +--
 configs/mx28evk_spi_defconfig           |  3 +--
 configs/sansa_fuze_plus_defconfig       |  1 +
 configs/sc_sps_1_defconfig              |  1 +
 configs/ts4600_defconfig                |  1 +
 configs/xfi3_defconfig                  |  1 +
 drivers/dma/Kconfig                     | 14 ++++++++++++++
 drivers/mtd/nand/Kconfig                |  3 +++
 include/configs/aristainetos-common.h   |  3 ---
 include/configs/cm_fx6.h                |  3 ---
 include/configs/colibri_imx7.h          |  3 ---
 include/configs/gw_ventana.h            |  3 ---
 include/configs/imx6-engicam.h          |  4 ----
 include/configs/imx6_logic.h            |  3 ---
 include/configs/mx6sabreauto.h          |  3 ---
 include/configs/mx6sxsabreauto.h        |  3 ---
 include/configs/mx7dsabresd.h           |  3 ---
 include/configs/mxs.h                   |  1 -
 include/configs/pcm058.h                |  3 ---
 include/configs/pfla02.h                |  3 ---
 include/configs/platinum.h              |  3 ---
 include/configs/titanium.h              |  3 ---
 scripts/config_whitelist.txt            |  3 ---
 27 files changed, 27 insertions(+), 50 deletions(-)
configs/bg0900_defconfig +1 -0
index 72616ae..7314eff 100644
@@ -25,6 +25,7 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_DOS_PARTITION=y
+CONFIG_APBH_DMA=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
configs/mx23_olinuxino_defconfig +1 -0
index 628c11d..2c80c3b 100644
@@ -20,6 +20,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_APBH_DMA=y
 CONFIG_LED_STATUS=y
 CONFIG_LED_STATUS_GPIO=y
 CONFIG_LED_STATUS0=y
configs/mx23evk_defconfig +1 -0
index 6ad7f2c..09f3611 100644
@@ -24,6 +24,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
configs/mx28evk_auart_console_defconfig +1 -2
index 0927333..7bdb905 100644
@@ -16,7 +16,6 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
@@ -34,9 +33,9 @@ CONFIG_MTDIDS_DEFAULT="nand0=gpmi-nand"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=gpmi-nand:3m(bootloader)ro,512k(environment),512k(redundant-environment),4m(kernel),512k(fdt),8m(ramdisk),-(filesystem)"
 CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_NAND=y
-CONFIG_NAND_MXS=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
configs/mx28evk_defconfig +1 -2
index 21d01bc..d36ad0e 100644
@@ -16,7 +16,6 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
@@ -34,9 +33,9 @@ CONFIG_MTDIDS_DEFAULT="nand0=gpmi-nand"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=gpmi-nand:3m(bootloader)ro,512k(environment),512k(redundant-environment),4m(kernel),512k(fdt),8m(ramdisk),-(filesystem)"
 CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_NAND=y
-CONFIG_NAND_MXS=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
configs/mx28evk_spi_defconfig +1 -2
index dab5394..7bf1d6e 100644
@@ -15,7 +15,6 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
@@ -33,9 +32,9 @@ CONFIG_MTDIDS_DEFAULT="nand0=gpmi-nand"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=gpmi-nand:3m(bootloader)ro,512k(environment),512k(redundant-environment),4m(kernel),512k(fdt),8m(ramdisk),-(filesystem)"
 CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_NAND=y
-CONFIG_NAND_MXS=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
configs/sansa_fuze_plus_defconfig +1 -0
index f2e61c7..d7ec119 100644
@@ -25,6 +25,7 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
configs/sc_sps_1_defconfig +1 -0
index faebc04..792d39d 100644
@@ -24,6 +24,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_PHYLIB=y
 CONFIG_USB=y
configs/ts4600_defconfig +1 -0
index aab0737..45b872b 100644
@@ -17,5 +17,6 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_OF_LIBFDT=y
configs/xfi3_defconfig +1 -0
index 6cdea5e..e335407 100644
@@ -24,6 +24,7 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
drivers/dma/Kconfig +14 -0
index 1b92c77..a95d4ce 100644
@@ -19,4 +19,18 @@ config TI_EDMA3
 	  This driver support data transfer between memory
 	  regions.
 
+config APBH_DMA
+	bool "Support APBH DMA"
+	help
+	  Enable APBH DMA driver.
+
+if APBH_DMA
+config APBH_DMA_BURST
+	bool "Enable DMA BURST"
+
+config APBH_DMA_BURST8
+	bool "Enable DMA BURST8"
+
+endif
+
 endmenu # menu "DMA Support"
drivers/mtd/nand/Kconfig +3 -0
index 97ec6cf..4453688 100644
@@ -142,6 +142,9 @@ config NAND_MXS
 	bool "MXS NAND support"
 	depends on MX6 || MX7
 	imply CMD_NAND
+	select APBH_DMA
+	select APBH_DMA_BURST if ARCH_MX6 || ARCH_MX7
+	select APBH_DMA_BURST8 if ARCH_MX6 || ARCH_MX7
 	help
 	  This enables NAND driver for the NAND flash controller on the
 	  MXS processors.
include/configs/aristainetos-common.h +0 -3
index 9b1a39d..69de44a 100644
@@ -182,9 +182,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* RTC */
 #define CONFIG_SYS_I2C_RTC_ADDR	0x68
include/configs/cm_fx6.h +0 -3
index 90cf024..39d166a 100644
@@ -184,9 +184,6 @@
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 /* APBH DMA is required for NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 #endif
 
 /* Ethernet */
include/configs/colibri_imx7.h +0 -3
index d4aaff6..5d9b212 100644
@@ -170,9 +170,6 @@
 #define CONFIG_MTD_DEVICE	/* needed for mtdparts commands */
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* USB Configs */
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
include/configs/gw_ventana.h +0 -3
index 517ad08..6e994b5 100644
@@ -73,9 +73,6 @@
   #define CONFIG_SYS_NAND_ONFI_DETECTION
 
   /* DMA stuff, needed for GPMI/MXS NAND support */
-  #define CONFIG_APBH_DMA
-  #define CONFIG_APBH_DMA_BURST
-  #define CONFIG_APBH_DMA_BURST8
 #endif
 
 #endif /* CONFIG_SPI_FLASH */
include/configs/imx6-engicam.h +0 -4
index 5f43dfb..246a636 100644
@@ -161,10 +161,6 @@
 /* MTD device */
 # define CONFIG_MTD_DEVICE
 # define CONFIG_MTD_PARTITIONS
-
-# define CONFIG_APBH_DMA
-# define CONFIG_APBH_DMA_BURST
-# define CONFIG_APBH_DMA_BURST8
 #endif
 
 /* Ethernet */
include/configs/imx6_logic.h +0 -3
index f0ff5b2..8b91a53 100644
@@ -156,9 +156,6 @@
 # define CONFIG_MTD_PARTITIONS
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* EEPROM  contains serial no, MAC addr and other Logic PD info */
 #define CONFIG_I2C_EEPROM
include/configs/mx6sabreauto.h +0 -3
index 9982685..bba15a7 100644
@@ -72,9 +72,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* PMIC */
 #define CONFIG_POWER
include/configs/mx6sxsabreauto.h +0 -3
index 02d6acf..06e416b 100644
@@ -125,9 +125,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Network */
 
include/configs/mx7dsabresd.h +0 -3
index fd39f22..3a9eaf9 100644
@@ -197,9 +197,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 #endif
 
 #define CONFIG_ENV_OFFSET		(12 * SZ_64K)
include/configs/mxs.h +0 -1
index 21e51fc..c3e3f59 100644
@@ -99,7 +99,6 @@
  */
 
 /* APBH DMA */
-#define CONFIG_APBH_DMA
 
 /* GPIO */
 #define CONFIG_MXS_GPIO
include/configs/pcm058.h +0 -3
index 6c0902a..ec74ed7 100644
@@ -65,9 +65,6 @@
 #endif
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Filesystem support */
 #define CONFIG_MTD_PARTITIONS
include/configs/pfla02.h +0 -3
index 83198a1..2001d5d 100644
@@ -64,9 +64,6 @@
 #endif
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Filesystem support */
 #define CONFIG_MTD_PARTITIONS
include/configs/platinum.h +0 -3
index 24c8de9..339ff91 100644
@@ -75,9 +75,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA config, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Environment in NAND */
 #define CONFIG_ENV_OFFSET		(16 << 20)
include/configs/titanium.h +0 -3
index ea18cb6..0fe40ee 100644
@@ -148,9 +148,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Environment in NAND */
 #define CONFIG_ENV_OFFSET		(16 << 20)
scripts/config_whitelist.txt +0 -3
index ef83c00..bc097db 100644
@@ -31,9 +31,6 @@ CONFIG_AM335X_USB1_MODE
 CONFIG_AM437X_USB2PHY2_HOST
 CONFIG_ANDES_PCU
 CONFIG_ANDES_PCU_BASE
-CONFIG_APBH_DMA
-CONFIG_APBH_DMA_BURST
-CONFIG_APBH_DMA_BURST8
 CONFIG_APER_0_BASE
 CONFIG_APER_1_BASE
 CONFIG_APER_SIZE
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/1 Convert CONFIG_APBH_DMA et al to Kconfig

Quoted 11 lines · Adam Ford

This converts the following to Kconfig:
CONFIG_APBH_DMA
CONFIG_APBH_DMA_BURST
CONFIG_APBH_DMA_BURST8

---
Changes in V2:
Rebase on [U-Boot,v2,1/6] Convert CONFIG_NAND_MXS to Kconfig Make the NAND controller in MX6 MX7 autoselect the DMA options

Quoted 10 lines
 configs/bg0900_defconfig                |  1 +
 configs/mx23_olinuxino_defconfig        |  1 +
 configs/mx23evk_defconfig               |  1 +
 configs/mx28evk_auart_console_defconfig |  3 +--
 configs/mx28evk_defconfig               |  3 +--
 configs/mx28evk_spi_defconfig           |  3 +--
 configs/sansa_fuze_plus_defconfig       |  1 +
 configs/sc_sps_1_defconfig              |  1 +
 configs/ts4600_defconfig                |  1 +
 configs/xfi3_defconfig                  |  1 +

There should be really no defconfig change since CONFIG_NAND_MXS should select CONFIG_APBH_DMA automatically.

It seems that my patchset did not handle i.MX 23/28 correctly. Will fix this first.

Quoted 423 lines
 drivers/dma/Kconfig                     | 14 ++++++++++++++
 drivers/mtd/nand/Kconfig                |  3 +++
 include/configs/aristainetos-common.h   |  3 ---
 include/configs/cm_fx6.h                |  3 ---
 include/configs/colibri_imx7.h          |  3 ---
 include/configs/gw_ventana.h            |  3 ---
 include/configs/imx6-engicam.h          |  4 ----
 include/configs/imx6_logic.h            |  3 ---
 include/configs/mx6sabreauto.h          |  3 ---
 include/configs/mx6sxsabreauto.h        |  3 ---
 include/configs/mx7dsabresd.h           |  3 ---
 include/configs/mxs.h                   |  1 -
 include/configs/pcm058.h                |  3 ---
 include/configs/pfla02.h                |  3 ---
 include/configs/platinum.h              |  3 ---
 include/configs/titanium.h              |  3 ---
 scripts/config_whitelist.txt            |  3 ---
 27 files changed, 27 insertions(+), 50 deletions(-)
configs/bg0900_defconfig +1 -0
index 72616ae..7314eff 100644
@@ -25,6 +25,7 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_DOS_PARTITION=y
+CONFIG_APBH_DMA=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
configs/mx23_olinuxino_defconfig +1 -0
index 628c11d..2c80c3b 100644
@@ -20,6 +20,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_APBH_DMA=y
 CONFIG_LED_STATUS=y
 CONFIG_LED_STATUS_GPIO=y
 CONFIG_LED_STATUS0=y
configs/mx23evk_defconfig +1 -0
index 6ad7f2c..09f3611 100644
@@ -24,6 +24,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
configs/mx28evk_auart_console_defconfig +0 -1
index 0927333..7bdb905 100644
@@ -16,7 +16,6 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
@@ -34,9 +33,9 @@ CONFIG_MTDIDS_DEFAULT="nand0=gpmi-nand"
 

CONFIG_MTDPARTS_DEFAULT="mtdparts=gpmi-nand:3m(bootloader)ro,512k(environment),512k(redundant-environment),4m(kernel),512k(fdt),8m(ramdisk),-(filesystem)"
CONFIG_CMD_UBI=y
CONFIG_ENV_IS_IN_MMC=y

configs/mx28evk_auart_console_defconfig +1 -1
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_NAND=y
-CONFIG_NAND_MXS=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
configs/mx28evk_defconfig +0 -1
index 21d01bc..d36ad0e 100644
@@ -16,7 +16,6 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
@@ -34,9 +33,9 @@ CONFIG_MTDIDS_DEFAULT="nand0=gpmi-nand"
 

CONFIG_MTDPARTS_DEFAULT="mtdparts=gpmi-nand:3m(bootloader)ro,512k(environment),512k(redundant-environment),4m(kernel),512k(fdt),8m(ramdisk),-(filesystem)"
CONFIG_CMD_UBI=y
CONFIG_ENV_IS_IN_MMC=y

configs/mx28evk_defconfig +1 -1
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_NAND=y
-CONFIG_NAND_MXS=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
configs/mx28evk_spi_defconfig +0 -1
index dab5394..7bf1d6e 100644
@@ -15,7 +15,6 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
@@ -33,9 +32,9 @@ CONFIG_MTDIDS_DEFAULT="nand0=gpmi-nand"
 

CONFIG_MTDPARTS_DEFAULT="mtdparts=gpmi-nand:3m(bootloader)ro,512k(environment),512k(redundant-environment),4m(kernel),512k(fdt),8m(ramdisk),-(filesystem)"
CONFIG_CMD_UBI=y
CONFIG_ENV_IS_IN_SPI_FLASH=y

configs/mx28evk_spi_defconfig +1 -1
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_NAND=y
-CONFIG_NAND_MXS=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
configs/sansa_fuze_plus_defconfig +1 -0
index f2e61c7..d7ec119 100644
@@ -25,6 +25,7 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
configs/sc_sps_1_defconfig +1 -0
index faebc04..792d39d 100644
@@ -24,6 +24,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_PHYLIB=y
 CONFIG_USB=y
configs/ts4600_defconfig +1 -0
index aab0737..45b872b 100644
@@ -17,5 +17,6 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_OF_LIBFDT=y
configs/xfi3_defconfig +1 -0
index 6cdea5e..e335407 100644
@@ -24,6 +24,7 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
drivers/dma/Kconfig +14 -0
index 1b92c77..a95d4ce 100644
@@ -19,4 +19,18 @@ config TI_EDMA3
 	  This driver support data transfer between memory
 	  regions.
 
+config APBH_DMA
+	bool "Support APBH DMA"
+	help
+	  Enable APBH DMA driver.
+
+if APBH_DMA
+config APBH_DMA_BURST
+	bool "Enable DMA BURST"
+
+config APBH_DMA_BURST8
+	bool "Enable DMA BURST8"
+
+endif
+
 endmenu # menu "DMA Support"
drivers/mtd/nand/Kconfig +3 -0
index 97ec6cf..4453688 100644
@@ -142,6 +142,9 @@ config NAND_MXS
 	bool "MXS NAND support"
 	depends on MX6 || MX7
 	imply CMD_NAND
+	select APBH_DMA
+	select APBH_DMA_BURST if ARCH_MX6 || ARCH_MX7
+	select APBH_DMA_BURST8 if ARCH_MX6 || ARCH_MX7
 	help
 	  This enables NAND driver for the NAND flash controller on the
 	  MXS processors.
include/configs/aristainetos-common.h +0 -3
index 9b1a39d..69de44a 100644
@@ -182,9 +182,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* RTC */
 #define CONFIG_SYS_I2C_RTC_ADDR	0x68
include/configs/cm_fx6.h +0 -3
index 90cf024..39d166a 100644
@@ -184,9 +184,6 @@
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 /* APBH DMA is required for NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 #endif
 
 /* Ethernet */
include/configs/colibri_imx7.h +0 -3
index d4aaff6..5d9b212 100644
@@ -170,9 +170,6 @@
 #define CONFIG_MTD_DEVICE	/* needed for mtdparts commands */
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* USB Configs */
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
include/configs/gw_ventana.h +0 -3
index 517ad08..6e994b5 100644
@@ -73,9 +73,6 @@
   #define CONFIG_SYS_NAND_ONFI_DETECTION
 
   /* DMA stuff, needed for GPMI/MXS NAND support */
-  #define CONFIG_APBH_DMA
-  #define CONFIG_APBH_DMA_BURST
-  #define CONFIG_APBH_DMA_BURST8
 #endif
 
 #endif /* CONFIG_SPI_FLASH */
include/configs/imx6-engicam.h +0 -4
index 5f43dfb..246a636 100644
@@ -161,10 +161,6 @@
 /* MTD device */
 # define CONFIG_MTD_DEVICE
 # define CONFIG_MTD_PARTITIONS
-
-# define CONFIG_APBH_DMA
-# define CONFIG_APBH_DMA_BURST
-# define CONFIG_APBH_DMA_BURST8
 #endif
 
 /* Ethernet */
include/configs/imx6_logic.h +0 -3
index f0ff5b2..8b91a53 100644
@@ -156,9 +156,6 @@
 # define CONFIG_MTD_PARTITIONS
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* EEPROM  contains serial no, MAC addr and other Logic PD info */
 #define CONFIG_I2C_EEPROM
include/configs/mx6sabreauto.h +0 -3
index 9982685..bba15a7 100644
@@ -72,9 +72,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* PMIC */
 #define CONFIG_POWER
include/configs/mx6sxsabreauto.h +0 -3
index 02d6acf..06e416b 100644
@@ -125,9 +125,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Network */
 
include/configs/mx7dsabresd.h +0 -3
index fd39f22..3a9eaf9 100644
@@ -197,9 +197,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 #endif
 
 #define CONFIG_ENV_OFFSET		(12 * SZ_64K)
include/configs/mxs.h +0 -1
index 21e51fc..c3e3f59 100644
@@ -99,7 +99,6 @@
  */
 
 /* APBH DMA */
-#define CONFIG_APBH_DMA
 
 /* GPIO */
 #define CONFIG_MXS_GPIO
include/configs/pcm058.h +0 -3
index 6c0902a..ec74ed7 100644
@@ -65,9 +65,6 @@
 #endif
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Filesystem support */
 #define CONFIG_MTD_PARTITIONS
include/configs/pfla02.h +0 -3
index 83198a1..2001d5d 100644
@@ -64,9 +64,6 @@
 #endif
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Filesystem support */
 #define CONFIG_MTD_PARTITIONS
include/configs/platinum.h +0 -3
index 24c8de9..339ff91 100644
@@ -75,9 +75,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA config, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Environment in NAND */
 #define CONFIG_ENV_OFFSET		(16 << 20)
include/configs/titanium.h +0 -3
index ea18cb6..0fe40ee 100644
@@ -148,9 +148,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Environment in NAND */
 #define CONFIG_ENV_OFFSET		(16 << 20)
scripts/config_whitelist.txt +0 -3
index ef83c00..bc097db 100644
@@ -31,9 +31,6 @@ CONFIG_AM335X_USB1_MODE
 CONFIG_AM437X_USB2PHY2_HOST
 CONFIG_ANDES_PCU
 CONFIG_ANDES_PCU_BASE
-CONFIG_APBH_DMA
-CONFIG_APBH_DMA_BURST
-CONFIG_APBH_DMA_BURST8
 CONFIG_APER_0_BASE
 CONFIG_APER_1_BASE
 CONFIG_APER_SIZE
#2 lore raw

PATCH v2 1/1 Convert CONFIG_APBH_DMA et al to Kconfig

In reply to Adam Ford
Quoted 11 lines · Adam Ford

This converts the following to Kconfig:
CONFIG_APBH_DMA
CONFIG_APBH_DMA_BURST
CONFIG_APBH_DMA_BURST8

---
Changes in V2:
Rebase on [U-Boot,v2,1/6] Convert CONFIG_NAND_MXS to Kconfig Make the NAND controller in MX6 MX7 autoselect the DMA options

Quoted 10 lines
 configs/bg0900_defconfig                |  1 +
 configs/mx23_olinuxino_defconfig        |  1 +
 configs/mx23evk_defconfig               |  1 +
 configs/mx28evk_auart_console_defconfig |  3 +--
 configs/mx28evk_defconfig               |  3 +--
 configs/mx28evk_spi_defconfig           |  3 +--
 configs/sansa_fuze_plus_defconfig       |  1 +
 configs/sc_sps_1_defconfig              |  1 +
 configs/ts4600_defconfig                |  1 +
 configs/xfi3_defconfig                  |  1 +

Just sent out a patchset ("arm: imx: convert MX23/28 and MXS NAND to Kconfig") which should properly convert NAND MXS to Kconfig. Can you rebase again? It really lead to no defconfig changes.

Can you add me to cc in v3? Sorry for the hassle.

--
Stefan

Quoted 423 lines
 drivers/dma/Kconfig                     | 14 ++++++++++++++
 drivers/mtd/nand/Kconfig                |  3 +++
 include/configs/aristainetos-common.h   |  3 ---
 include/configs/cm_fx6.h                |  3 ---
 include/configs/colibri_imx7.h          |  3 ---
 include/configs/gw_ventana.h            |  3 ---
 include/configs/imx6-engicam.h          |  4 ----
 include/configs/imx6_logic.h            |  3 ---
 include/configs/mx6sabreauto.h          |  3 ---
 include/configs/mx6sxsabreauto.h        |  3 ---
 include/configs/mx7dsabresd.h           |  3 ---
 include/configs/mxs.h                   |  1 -
 include/configs/pcm058.h                |  3 ---
 include/configs/pfla02.h                |  3 ---
 include/configs/platinum.h              |  3 ---
 include/configs/titanium.h              |  3 ---
 scripts/config_whitelist.txt            |  3 ---
 27 files changed, 27 insertions(+), 50 deletions(-)
configs/bg0900_defconfig +1 -0
index 72616ae..7314eff 100644
@@ -25,6 +25,7 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_DOS_PARTITION=y
+CONFIG_APBH_DMA=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
configs/mx23_olinuxino_defconfig +1 -0
index 628c11d..2c80c3b 100644
@@ -20,6 +20,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_APBH_DMA=y
 CONFIG_LED_STATUS=y
 CONFIG_LED_STATUS_GPIO=y
 CONFIG_LED_STATUS0=y
configs/mx23evk_defconfig +1 -0
index 6ad7f2c..09f3611 100644
@@ -24,6 +24,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
configs/mx28evk_auart_console_defconfig +0 -1
index 0927333..7bdb905 100644
@@ -16,7 +16,6 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
@@ -34,9 +33,9 @@ CONFIG_MTDIDS_DEFAULT="nand0=gpmi-nand"
 

CONFIG_MTDPARTS_DEFAULT="mtdparts=gpmi-nand:3m(bootloader)ro,512k(environment),512k(redundant-environment),4m(kernel),512k(fdt),8m(ramdisk),-(filesystem)"
CONFIG_CMD_UBI=y
CONFIG_ENV_IS_IN_MMC=y

configs/mx28evk_auart_console_defconfig +1 -1
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_NAND=y
-CONFIG_NAND_MXS=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
configs/mx28evk_defconfig +0 -1
index 21d01bc..d36ad0e 100644
@@ -16,7 +16,6 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
@@ -34,9 +33,9 @@ CONFIG_MTDIDS_DEFAULT="nand0=gpmi-nand"
 

CONFIG_MTDPARTS_DEFAULT="mtdparts=gpmi-nand:3m(bootloader)ro,512k(environment),512k(redundant-environment),4m(kernel),512k(fdt),8m(ramdisk),-(filesystem)"
CONFIG_CMD_UBI=y
CONFIG_ENV_IS_IN_MMC=y

configs/mx28evk_defconfig +1 -1
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_NAND=y
-CONFIG_NAND_MXS=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
configs/mx28evk_spi_defconfig +0 -1
index dab5394..7bf1d6e 100644
@@ -15,7 +15,6 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
@@ -33,9 +32,9 @@ CONFIG_MTDIDS_DEFAULT="nand0=gpmi-nand"
 

CONFIG_MTDPARTS_DEFAULT="mtdparts=gpmi-nand:3m(bootloader)ro,512k(environment),512k(redundant-environment),4m(kernel),512k(fdt),8m(ramdisk),-(filesystem)"
CONFIG_CMD_UBI=y
CONFIG_ENV_IS_IN_SPI_FLASH=y

configs/mx28evk_spi_defconfig +1 -1
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_NAND=y
-CONFIG_NAND_MXS=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
configs/sansa_fuze_plus_defconfig +1 -0
index f2e61c7..d7ec119 100644
@@ -25,6 +25,7 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
configs/sc_sps_1_defconfig +1 -0
index faebc04..792d39d 100644
@@ -24,6 +24,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_PHYLIB=y
 CONFIG_USB=y
configs/ts4600_defconfig +1 -0
index aab0737..45b872b 100644
@@ -17,5 +17,6 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_OF_LIBFDT=y
configs/xfi3_defconfig +1 -0
index 6cdea5e..e335407 100644
@@ -24,6 +24,7 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
drivers/dma/Kconfig +14 -0
index 1b92c77..a95d4ce 100644
@@ -19,4 +19,18 @@ config TI_EDMA3
 	  This driver support data transfer between memory
 	  regions.
 
+config APBH_DMA
+	bool "Support APBH DMA"
+	help
+	  Enable APBH DMA driver.
+
+if APBH_DMA
+config APBH_DMA_BURST
+	bool "Enable DMA BURST"
+
+config APBH_DMA_BURST8
+	bool "Enable DMA BURST8"
+
+endif
+
 endmenu # menu "DMA Support"
drivers/mtd/nand/Kconfig +3 -0
index 97ec6cf..4453688 100644
@@ -142,6 +142,9 @@ config NAND_MXS
 	bool "MXS NAND support"
 	depends on MX6 || MX7
 	imply CMD_NAND
+	select APBH_DMA
+	select APBH_DMA_BURST if ARCH_MX6 || ARCH_MX7
+	select APBH_DMA_BURST8 if ARCH_MX6 || ARCH_MX7
 	help
 	  This enables NAND driver for the NAND flash controller on the
 	  MXS processors.
include/configs/aristainetos-common.h +0 -3
index 9b1a39d..69de44a 100644
@@ -182,9 +182,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* RTC */
 #define CONFIG_SYS_I2C_RTC_ADDR	0x68
include/configs/cm_fx6.h +0 -3
index 90cf024..39d166a 100644
@@ -184,9 +184,6 @@
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 /* APBH DMA is required for NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 #endif
 
 /* Ethernet */
include/configs/colibri_imx7.h +0 -3
index d4aaff6..5d9b212 100644
@@ -170,9 +170,6 @@
 #define CONFIG_MTD_DEVICE	/* needed for mtdparts commands */
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* USB Configs */
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
include/configs/gw_ventana.h +0 -3
index 517ad08..6e994b5 100644
@@ -73,9 +73,6 @@
   #define CONFIG_SYS_NAND_ONFI_DETECTION
 
   /* DMA stuff, needed for GPMI/MXS NAND support */
-  #define CONFIG_APBH_DMA
-  #define CONFIG_APBH_DMA_BURST
-  #define CONFIG_APBH_DMA_BURST8
 #endif
 
 #endif /* CONFIG_SPI_FLASH */
include/configs/imx6-engicam.h +0 -4
index 5f43dfb..246a636 100644
@@ -161,10 +161,6 @@
 /* MTD device */
 # define CONFIG_MTD_DEVICE
 # define CONFIG_MTD_PARTITIONS
-
-# define CONFIG_APBH_DMA
-# define CONFIG_APBH_DMA_BURST
-# define CONFIG_APBH_DMA_BURST8
 #endif
 
 /* Ethernet */
include/configs/imx6_logic.h +0 -3
index f0ff5b2..8b91a53 100644
@@ -156,9 +156,6 @@
 # define CONFIG_MTD_PARTITIONS
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* EEPROM  contains serial no, MAC addr and other Logic PD info */
 #define CONFIG_I2C_EEPROM
include/configs/mx6sabreauto.h +0 -3
index 9982685..bba15a7 100644
@@ -72,9 +72,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* PMIC */
 #define CONFIG_POWER
include/configs/mx6sxsabreauto.h +0 -3
index 02d6acf..06e416b 100644
@@ -125,9 +125,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Network */
 
include/configs/mx7dsabresd.h +0 -3
index fd39f22..3a9eaf9 100644
@@ -197,9 +197,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 #endif
 
 #define CONFIG_ENV_OFFSET		(12 * SZ_64K)
include/configs/mxs.h +0 -1
index 21e51fc..c3e3f59 100644
@@ -99,7 +99,6 @@
  */
 
 /* APBH DMA */
-#define CONFIG_APBH_DMA
 
 /* GPIO */
 #define CONFIG_MXS_GPIO
include/configs/pcm058.h +0 -3
index 6c0902a..ec74ed7 100644
@@ -65,9 +65,6 @@
 #endif
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Filesystem support */
 #define CONFIG_MTD_PARTITIONS
include/configs/pfla02.h +0 -3
index 83198a1..2001d5d 100644
@@ -64,9 +64,6 @@
 #endif
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Filesystem support */
 #define CONFIG_MTD_PARTITIONS
include/configs/platinum.h +0 -3
index 24c8de9..339ff91 100644
@@ -75,9 +75,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA config, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Environment in NAND */
 #define CONFIG_ENV_OFFSET		(16 << 20)
include/configs/titanium.h +0 -3
index ea18cb6..0fe40ee 100644
@@ -148,9 +148,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Environment in NAND */
 #define CONFIG_ENV_OFFSET		(16 << 20)
scripts/config_whitelist.txt +0 -3
index ef83c00..bc097db 100644
@@ -31,9 +31,6 @@ CONFIG_AM335X_USB1_MODE
 CONFIG_AM437X_USB2PHY2_HOST
 CONFIG_ANDES_PCU
 CONFIG_ANDES_PCU_BASE
-CONFIG_APBH_DMA
-CONFIG_APBH_DMA_BURST
-CONFIG_APBH_DMA_BURST8
 CONFIG_APER_0_BASE
 CONFIG_APER_1_BASE
 CONFIG_APER_SIZE
author
#3 lore raw

PATCH v2 1/1 Convert CONFIG_APBH_DMA et al to Kconfig

Quoted 23 lines · On Mon, Feb 5, 2018 at 3:38 PM, <[email protected]> wrote:
Quoted 11 lines · Adam Ford

This converts the following to Kconfig:
CONFIG_APBH_DMA
CONFIG_APBH_DMA_BURST
CONFIG_APBH_DMA_BURST8

---
Changes in V2:
Rebase on [U-Boot,v2,1/6] Convert CONFIG_NAND_MXS to Kconfig Make the NAND controller in MX6 MX7 autoselect the DMA options

Quoted 10 lines
 configs/bg0900_defconfig                |  1 +
 configs/mx23_olinuxino_defconfig        |  1 +
 configs/mx23evk_defconfig               |  1 +
 configs/mx28evk_auart_console_defconfig |  3 +--
 configs/mx28evk_defconfig               |  3 +--
 configs/mx28evk_spi_defconfig           |  3 +--
 configs/sansa_fuze_plus_defconfig       |  1 +
 configs/sc_sps_1_defconfig              |  1 +
 configs/ts4600_defconfig                |  1 +
 configs/xfi3_defconfig                  |  1 +
Quoted 5 lines

Just sent out a patchset ("arm: imx: convert MX23/28 and MXS NAND to Kconfig") which should properly convert NAND MXS to Kconfig. Can you rebase again? It really lead to no defconfig changes.

Can you add me to cc in v3? Sorry for the hassle.

No problem. I'm still getting some defconfig changes, but I'll investigate that and see if I can fix it as part of my patch to eliminate the defconfig changes.
I'll CC you when I have something ready for review.

adam

Quoted 428 lines

--
Stefan

Quoted 423 lines
 drivers/dma/Kconfig                     | 14 ++++++++++++++
 drivers/mtd/nand/Kconfig                |  3 +++
 include/configs/aristainetos-common.h   |  3 ---
 include/configs/cm_fx6.h                |  3 ---
 include/configs/colibri_imx7.h          |  3 ---
 include/configs/gw_ventana.h            |  3 ---
 include/configs/imx6-engicam.h          |  4 ----
 include/configs/imx6_logic.h            |  3 ---
 include/configs/mx6sabreauto.h          |  3 ---
 include/configs/mx6sxsabreauto.h        |  3 ---
 include/configs/mx7dsabresd.h           |  3 ---
 include/configs/mxs.h                   |  1 -
 include/configs/pcm058.h                |  3 ---
 include/configs/pfla02.h                |  3 ---
 include/configs/platinum.h              |  3 ---
 include/configs/titanium.h              |  3 ---
 scripts/config_whitelist.txt            |  3 ---
 27 files changed, 27 insertions(+), 50 deletions(-)
configs/bg0900_defconfig +1 -0
index 72616ae..7314eff 100644
@@ -25,6 +25,7 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_DOS_PARTITION=y
+CONFIG_APBH_DMA=y
 # CONFIG_MMC is not set
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
configs/mx23_olinuxino_defconfig +1 -0
index 628c11d..2c80c3b 100644
@@ -20,6 +20,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_APBH_DMA=y
 CONFIG_LED_STATUS=y
 CONFIG_LED_STATUS_GPIO=y
 CONFIG_LED_STATUS0=y
configs/mx23evk_defconfig +1 -0
index 6ad7f2c..09f3611 100644
@@ -24,6 +24,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
configs/mx28evk_auart_console_defconfig +0 -1
index 0927333..7bdb905 100644
@@ -16,7 +16,6 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
@@ -34,9 +33,9 @@ CONFIG_MTDIDS_DEFAULT="nand0=gpmi-nand"
 

CONFIG_MTDPARTS_DEFAULT="mtdparts=gpmi-nand:3m(bootloader)ro,512k(environment),512k(redundant-environment),4m(kernel),512k(fdt),8m(ramdisk),-(filesystem)"
CONFIG_CMD_UBI=y
CONFIG_ENV_IS_IN_MMC=y

configs/mx28evk_auart_console_defconfig +1 -1
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_NAND=y
-CONFIG_NAND_MXS=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
configs/mx28evk_defconfig +0 -1
index 21d01bc..d36ad0e 100644
@@ -16,7 +16,6 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
@@ -34,9 +33,9 @@ CONFIG_MTDIDS_DEFAULT="nand0=gpmi-nand"
 

CONFIG_MTDPARTS_DEFAULT="mtdparts=gpmi-nand:3m(bootloader)ro,512k(environment),512k(redundant-environment),4m(kernel),512k(fdt),8m(ramdisk),-(filesystem)"
CONFIG_CMD_UBI=y
CONFIG_ENV_IS_IN_MMC=y

configs/mx28evk_defconfig +1 -1
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_NAND=y
-CONFIG_NAND_MXS=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
configs/mx28evk_spi_defconfig +0 -1
index dab5394..7bf1d6e 100644
@@ -15,7 +15,6 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
-CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
@@ -33,9 +32,9 @@ CONFIG_MTDIDS_DEFAULT="nand0=gpmi-nand"
 

CONFIG_MTDPARTS_DEFAULT="mtdparts=gpmi-nand:3m(bootloader)ro,512k(environment),512k(redundant-environment),4m(kernel),512k(fdt),8m(ramdisk),-(filesystem)"
CONFIG_CMD_UBI=y
CONFIG_ENV_IS_IN_SPI_FLASH=y

configs/mx28evk_spi_defconfig +1 -1
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_NAND=y
-CONFIG_NAND_MXS=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_USB=y
configs/sansa_fuze_plus_defconfig +1 -0
index f2e61c7..d7ec119 100644
@@ -25,6 +25,7 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
configs/sc_sps_1_defconfig +1 -0
index faebc04..792d39d 100644
@@ -24,6 +24,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_PHYLIB=y
 CONFIG_USB=y
configs/ts4600_defconfig +1 -0
index aab0737..45b872b 100644
@@ -17,5 +17,6 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_OF_LIBFDT=y
configs/xfi3_defconfig +1 -0
index 6cdea5e..e335407 100644
@@ -24,6 +24,7 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
+CONFIG_APBH_DMA=y
 CONFIG_MMC_MXS=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
drivers/dma/Kconfig +14 -0
index 1b92c77..a95d4ce 100644
@@ -19,4 +19,18 @@ config TI_EDMA3
        This driver support data transfer between memory
        regions.
 
+config APBH_DMA
+     bool "Support APBH DMA"
+     help
+       Enable APBH DMA driver.
+
+if APBH_DMA
+config APBH_DMA_BURST
+     bool "Enable DMA BURST"
+
+config APBH_DMA_BURST8
+     bool "Enable DMA BURST8"
+
+endif
+
 endmenu # menu "DMA Support"
drivers/mtd/nand/Kconfig +3 -0
index 97ec6cf..4453688 100644
@@ -142,6 +142,9 @@ config NAND_MXS
      bool "MXS NAND support"
      depends on MX6 || MX7
      imply CMD_NAND
+     select APBH_DMA
+     select APBH_DMA_BURST if ARCH_MX6 || ARCH_MX7
+     select APBH_DMA_BURST8 if ARCH_MX6 || ARCH_MX7
      help
        This enables NAND driver for the NAND flash controller on the
        MXS processors.
include/configs/aristainetos-common.h +0 -3
index 9b1a39d..69de44a 100644
@@ -182,9 +182,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* RTC */
 #define CONFIG_SYS_I2C_RTC_ADDR      0x68
include/configs/cm_fx6.h +0 -3
index 90cf024..39d166a 100644
@@ -184,9 +184,6 @@
 #define CONFIG_SYS_MAX_NAND_DEVICE   1
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 /* APBH DMA is required for NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 #endif
 
 /* Ethernet */
include/configs/colibri_imx7.h +0 -3
index d4aaff6..5d9b212 100644
@@ -170,9 +170,6 @@
 #define CONFIG_MTD_DEVICE    /* needed for mtdparts commands */
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* USB Configs */
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
include/configs/gw_ventana.h +0 -3
index 517ad08..6e994b5 100644
@@ -73,9 +73,6 @@
   #define CONFIG_SYS_NAND_ONFI_DETECTION
 
   /* DMA stuff, needed for GPMI/MXS NAND support */
-  #define CONFIG_APBH_DMA
-  #define CONFIG_APBH_DMA_BURST
-  #define CONFIG_APBH_DMA_BURST8
 #endif
 
 #endif /* CONFIG_SPI_FLASH */
include/configs/imx6-engicam.h +0 -4
index 5f43dfb..246a636 100644
@@ -161,10 +161,6 @@
 /* MTD device */
 # define CONFIG_MTD_DEVICE
 # define CONFIG_MTD_PARTITIONS
-
-# define CONFIG_APBH_DMA
-# define CONFIG_APBH_DMA_BURST
-# define CONFIG_APBH_DMA_BURST8
 #endif
 
 /* Ethernet */
include/configs/imx6_logic.h +0 -3
index f0ff5b2..8b91a53 100644
@@ -156,9 +156,6 @@
 # define CONFIG_MTD_PARTITIONS
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* EEPROM  contains serial no, MAC addr and other Logic PD info */
 #define CONFIG_I2C_EEPROM
include/configs/mx6sabreauto.h +0 -3
index 9982685..bba15a7 100644
@@ -72,9 +72,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* PMIC */
 #define CONFIG_POWER
include/configs/mx6sxsabreauto.h +0 -3
index 02d6acf..06e416b 100644
@@ -125,9 +125,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Network */
 
include/configs/mx7dsabresd.h +0 -3
index fd39f22..3a9eaf9 100644
@@ -197,9 +197,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 #endif
 
 #define CONFIG_ENV_OFFSET            (12 * SZ_64K)
include/configs/mxs.h +0 -1
index 21e51fc..c3e3f59 100644
@@ -99,7 +99,6 @@
  */
 
 /* APBH DMA */
-#define CONFIG_APBH_DMA
 
 /* GPIO */
 #define CONFIG_MXS_GPIO
include/configs/pcm058.h +0 -3
index 6c0902a..ec74ed7 100644
@@ -65,9 +65,6 @@
 #endif
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Filesystem support */
 #define CONFIG_MTD_PARTITIONS
include/configs/pfla02.h +0 -3
index 83198a1..2001d5d 100644
@@ -64,9 +64,6 @@
 #endif
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Filesystem support */
 #define CONFIG_MTD_PARTITIONS
include/configs/platinum.h +0 -3
index 24c8de9..339ff91 100644
@@ -75,9 +75,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA config, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Environment in NAND */
 #define CONFIG_ENV_OFFSET            (16 << 20)
include/configs/titanium.h +0 -3
index ea18cb6..0fe40ee 100644
@@ -148,9 +148,6 @@
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
 /* DMA stuff, needed for GPMI/MXS NAND support */
-#define CONFIG_APBH_DMA
-#define CONFIG_APBH_DMA_BURST
-#define CONFIG_APBH_DMA_BURST8
 
 /* Environment in NAND */
 #define CONFIG_ENV_OFFSET            (16 << 20)
scripts/config_whitelist.txt +0 -3
index ef83c00..bc097db 100644
@@ -31,9 +31,6 @@ CONFIG_AM335X_USB1_MODE
 CONFIG_AM437X_USB2PHY2_HOST
 CONFIG_ANDES_PCU
 CONFIG_ANDES_PCU_BASE
-CONFIG_APBH_DMA
-CONFIG_APBH_DMA_BURST
-CONFIG_APBH_DMA_BURST8
 CONFIG_APER_0_BASE
 CONFIG_APER_1_BASE
 CONFIG_APER_SIZE