[U-Boot] [PATCH 21/23] tegra: Convert CONFIG_PWM_TEGRA to Kconfig

Simon Glass sjg at chromium.org
Thu Jan 14 19:28:33 CET 2016


Move this option to Kconfig and clean up the header files. Adjust the only
user (the LCD driver) to work with the new driver.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 configs/colibri_t20_defconfig | 8 +++++---
 configs/harmony_defconfig     | 1 +
 configs/medcom-wide_defconfig | 1 +
 configs/nyan-big_defconfig    | 1 +
 configs/paz00_defconfig       | 1 +
 configs/seaboard_defconfig    | 1 +
 configs/tec_defconfig         | 1 +
 configs/ventana_defconfig     | 1 +
 drivers/pwm/Kconfig           | 8 ++++++++
 include/configs/colibri_t20.h | 1 -
 include/configs/harmony.h     | 1 -
 include/configs/medcom-wide.h | 1 -
 include/configs/nyan-big.h    | 1 -
 include/configs/paz00.h       | 1 -
 include/configs/seaboard.h    | 1 -
 include/configs/tec.h         | 1 -
 include/configs/ventana.h     | 1 -
 17 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/configs/colibri_t20_defconfig b/configs/colibri_t20_defconfig
index 84e5bc5..49687cf 100644
--- a/configs/colibri_t20_defconfig
+++ b/configs/colibri_t20_defconfig
@@ -2,18 +2,20 @@ CONFIG_ARM=y
 CONFIG_TEGRA=y
 CONFIG_SPL_DM=y
 CONFIG_TEGRA20=y
-CONFIG_TARGET_COLIBRI_T20=y
-CONFIG_DEFAULT_DEVICE_TREE="tegra20-colibri"
-CONFIG_SYS_PROMPT="Colibri T20 # "
+CONFIG_TARGET_MEDCOM_WIDE=y
+CONFIG_DEFAULT_DEVICE_TREE="tegra20-medcom-wide"
+CONFIG_SYS_PROMPT="Tegra20 (Medcom-Wide) # "
 # CONFIG_CMD_IMI is not set
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
 CONFIG_CMD_GPIO=y
+# CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
 CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_PWM=y
+CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
diff --git a/configs/harmony_defconfig b/configs/harmony_defconfig
index 8a41118..14125b4 100644
--- a/configs/harmony_defconfig
+++ b/configs/harmony_defconfig
@@ -15,6 +15,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_PWM=y
+CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
diff --git a/configs/medcom-wide_defconfig b/configs/medcom-wide_defconfig
index 7aff258..49687cf 100644
--- a/configs/medcom-wide_defconfig
+++ b/configs/medcom-wide_defconfig
@@ -15,6 +15,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_PWM=y
+CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
diff --git a/configs/nyan-big_defconfig b/configs/nyan-big_defconfig
index fccf652..55f187d 100644
--- a/configs/nyan-big_defconfig
+++ b/configs/nyan-big_defconfig
@@ -26,6 +26,7 @@ CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DM_PWM=y
+CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_TPM_TIS_INFINEON=y
diff --git a/configs/paz00_defconfig b/configs/paz00_defconfig
index ea9fe44..5469331 100644
--- a/configs/paz00_defconfig
+++ b/configs/paz00_defconfig
@@ -15,6 +15,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_PWM=y
+CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
diff --git a/configs/seaboard_defconfig b/configs/seaboard_defconfig
index 528707f..7956670 100644
--- a/configs/seaboard_defconfig
+++ b/configs/seaboard_defconfig
@@ -15,6 +15,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_PWM=y
+CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
diff --git a/configs/tec_defconfig b/configs/tec_defconfig
index 9ba3062..274fc9d 100644
--- a/configs/tec_defconfig
+++ b/configs/tec_defconfig
@@ -15,6 +15,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_PWM=y
+CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
diff --git a/configs/ventana_defconfig b/configs/ventana_defconfig
index 08abea2..66c9e26 100644
--- a/configs/ventana_defconfig
+++ b/configs/ventana_defconfig
@@ -15,6 +15,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_PWM=y
+CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index cd8f357..e5880ac 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -17,3 +17,11 @@ config PWM_ROCKCHIP
 	  programmable period and duty cycle. A 32-bit counter is used.
 	  Various options provided in the hardware (such as capture mode and
 	  continuous/single-shot) are not supported by the driver.
+
+config PWM_TEGRA
+	bool "Enable support for the Tegra PWM"
+	help
+	  This PWM is found on Tegra 20 and other Nvidia SoCs. It supports
+	  four channels with a programmable period and duty cycle. Only a
+	  32KHz clock is supported by the driver but the duty cycle is
+	  configurable.
diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h
index 61d04b7..f3a1c96 100644
--- a/include/configs/colibri_t20.h
+++ b/include/configs/colibri_t20.h
@@ -53,7 +53,6 @@
 #define CONFIG_TFTP_TSIZE
 
 /* LCD support */
-#define CONFIG_PWM_TEGRA
 #define CONFIG_SYS_WHITE_ON_BLACK
 #define CONFIG_CONSOLE_SCROLL_LINES	10
 #define CONFIG_CMD_BMP
diff --git a/include/configs/harmony.h b/include/configs/harmony.h
index a78f7c4..353caec 100644
--- a/include/configs/harmony.h
+++ b/include/configs/harmony.h
@@ -60,7 +60,6 @@
 #define CONFIG_CMD_DHCP
 
 /* LCD support */
-#define CONFIG_PWM_TEGRA
 #define CONFIG_SYS_WHITE_ON_BLACK
 #define CONFIG_CONSOLE_SCROLL_LINES	10
 
diff --git a/include/configs/medcom-wide.h b/include/configs/medcom-wide.h
index c3e9128..cd89fa5 100644
--- a/include/configs/medcom-wide.h
+++ b/include/configs/medcom-wide.h
@@ -48,7 +48,6 @@
 #define CONFIG_CMD_DHCP
 
 /* LCD support */
-#define CONFIG_PWM_TEGRA
 #define CONFIG_SYS_WHITE_ON_BLACK
 
 /* support the new (FDT-based) image format */
diff --git a/include/configs/nyan-big.h b/include/configs/nyan-big.h
index 435de52..d4e4601 100644
--- a/include/configs/nyan-big.h
+++ b/include/configs/nyan-big.h
@@ -40,7 +40,6 @@
 #define CONFIG_I2C_EDID
 
 /* LCD support */
-#define CONFIG_PWM_TEGRA
 #define CONFIG_AS3722_POWER
 #define CONFIG_SYS_WHITE_ON_BLACK
 #define CONFIG_CMD_BMP
diff --git a/include/configs/paz00.h b/include/configs/paz00.h
index ae058e0..012c939 100644
--- a/include/configs/paz00.h
+++ b/include/configs/paz00.h
@@ -55,7 +55,6 @@
 #define CONFIG_CMD_DHCP
 
 /* LCD support */
-#define CONFIG_PWM_TEGRA
 #define CONFIG_SYS_WHITE_ON_BLACK
 #define CONFIG_CONSOLE_SCROLL_LINES	10
 
diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h
index 01650e4..fb9a106 100644
--- a/include/configs/seaboard.h
+++ b/include/configs/seaboard.h
@@ -66,7 +66,6 @@
 #define CONFIG_USB_KEYBOARD
 
 /* LCD support */
-#define CONFIG_PWM_TEGRA
 #define CONFIG_SYS_WHITE_ON_BLACK
 #define CONFIG_CONSOLE_SCROLL_LINES	10
 
diff --git a/include/configs/tec.h b/include/configs/tec.h
index 9c2311b..50b9e97 100644
--- a/include/configs/tec.h
+++ b/include/configs/tec.h
@@ -48,7 +48,6 @@
 #define CONFIG_CMD_DHCP
 
 /* LCD support */
-#define CONFIG_PWM_TEGRA
 #define CONFIG_SYS_WHITE_ON_BLACK
 
 /* support the new (FDT-based) image format */
diff --git a/include/configs/ventana.h b/include/configs/ventana.h
index 8d10dde..7f970d0 100644
--- a/include/configs/ventana.h
+++ b/include/configs/ventana.h
@@ -49,7 +49,6 @@
 #define CONFIG_USB_KEYBOARD
 
 /* LCD support */
-#define CONFIG_PWM_TEGRA
 #define CONFIG_SYS_WHITE_ON_BLACK
 #define CONFIG_CONSOLE_SCROLL_LINES	10
 
-- 
2.6.0.rc2.230.g3dd15c0



More information about the U-Boot mailing list