From: Adam Ford <aford173@gmail.com>
Date: Tue, 6 Feb 2018 14:34:45 +0000 (-0600)
Subject: Convert CONFIG_APBH_DMA et al to Kconfig
X-Git-Tag: v2025.01-rc5-pxa1908~4906
X-Git-Url: http://git.dujemihanovic.xyz/%22mailto:Murray.Jensen%40csiro.au/static/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=99bec1aead5927c54f4364bfe10823a86fe0dad2;p=u-boot.git

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

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Stefan Agner <stefan.agner@toradex.com>
[trini: Add in MMC as well]
Signed-off-by: Tom Rini <trini@konsulko.com>
---

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 1b92c7789d..4ee6afad35 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -19,4 +19,19 @@ config TI_EDMA3
 	  This driver support data transfer between memory
 	  regions.
 
+config APBH_DMA
+	bool "Support APBH DMA"
+	depends on MX23 || MX28 || MX6 || MX7
+	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"
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index a1b21fd1bd..d5e2816ef0 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -209,6 +209,10 @@ config MMC_MXC
 
 config MMC_MXS
 	bool "Freescale MXS Multimedia Card Interface support"
+	depends on MX23 || MX28 || MX6 || MX7
+	select APBH_DMA
+	select APBH_DMA_BURST if ARCH_MX6 || ARCH_MX7
+	select APBH_DMA_BURST8 if ARCH_MX6 || ARCH_MX7
 	help
 	  This selects the Freescale SSP MMC controller found on MXS based
 	  platforms like mx23/28.
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 57d27578fe..a820af61ce 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -142,6 +142,9 @@ config NAND_MXS
 	bool "MXS NAND support"
 	depends on MX23 || MX28 || 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.
diff --git a/include/configs/aristainetos-common.h b/include/configs/aristainetos-common.h
index 9b1a39d4fd..69de44a1df 100644
--- a/include/configs/aristainetos-common.h
+++ b/include/configs/aristainetos-common.h
@@ -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
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index 90cf024bdb..39d166a119 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -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 */
diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
index d4aaff61fd..5d9b212632 100644
--- a/include/configs/colibri_imx7.h
+++ b/include/configs/colibri_imx7.h
@@ -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
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index 517ad08423..6e994b5dc7 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -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 */
diff --git a/include/configs/imx6-engicam.h b/include/configs/imx6-engicam.h
index 5f43dfbb9e..246a636ef0 100644
--- a/include/configs/imx6-engicam.h
+++ b/include/configs/imx6-engicam.h
@@ -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 */
diff --git a/include/configs/imx6_logic.h b/include/configs/imx6_logic.h
index f973c327c8..95c31ed201 100644
--- a/include/configs/imx6_logic.h
+++ b/include/configs/imx6_logic.h
@@ -153,9 +153,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
diff --git a/include/configs/mx6sabreauto.h b/include/configs/mx6sabreauto.h
index 9982685f67..bba15a7943 100644
--- a/include/configs/mx6sabreauto.h
+++ b/include/configs/mx6sabreauto.h
@@ -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
diff --git a/include/configs/mx6sxsabreauto.h b/include/configs/mx6sxsabreauto.h
index 02d6acf47e..06e416bb59 100644
--- a/include/configs/mx6sxsabreauto.h
+++ b/include/configs/mx6sxsabreauto.h
@@ -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 */
 
diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h
index fd39f221ac..3a9eaf9f4c 100644
--- a/include/configs/mx7dsabresd.h
+++ b/include/configs/mx7dsabresd.h
@@ -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)
diff --git a/include/configs/mxs.h b/include/configs/mxs.h
index 21e51fca41..c3e3f59b16 100644
--- a/include/configs/mxs.h
+++ b/include/configs/mxs.h
@@ -99,7 +99,6 @@
  */
 
 /* APBH DMA */
-#define CONFIG_APBH_DMA
 
 /* GPIO */
 #define CONFIG_MXS_GPIO
diff --git a/include/configs/pcm058.h b/include/configs/pcm058.h
index 6c0902abd4..ec74ed74d7 100644
--- a/include/configs/pcm058.h
+++ b/include/configs/pcm058.h
@@ -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
diff --git a/include/configs/pfla02.h b/include/configs/pfla02.h
index 83198a1065..2001d5d787 100644
--- a/include/configs/pfla02.h
+++ b/include/configs/pfla02.h
@@ -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
diff --git a/include/configs/platinum.h b/include/configs/platinum.h
index 24c8de932f..339ff913b7 100644
--- a/include/configs/platinum.h
+++ b/include/configs/platinum.h
@@ -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)
diff --git a/include/configs/titanium.h b/include/configs/titanium.h
index ea18cb63e2..0fe40ee72f 100644
--- a/include/configs/titanium.h
+++ b/include/configs/titanium.h
@@ -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)
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index d8cc8079a3..3617afb241 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -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