Skip to contentSkip to conversation

remove kconfig dependencies from ARCH_MX*/MACH_MX*

PATCH New Sascha Hauer 2 participants 9 messages Mar 3, 2011

Subsystems (9)
lore
Share & tools
lore

Sascha Hauer

author maintainer
#0 lore raw

PATCH 1/1 remove kconfig dependencies from ARCH_MX*/MACH_MX*

The following series changes several i.MX relevant kconfig entries to depend on IMX_HAVE_PLATFORM_* macros instead of depending on indiviual i.MX variants.

Sascha

The following changes since commit cbdbb4c1d22e26f9d5314fefe6f2c7e5ed7f6a0f:

Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 (2011-03-02 20:02:32 -0800)

are available in the git repository at:

none ..BRANCH.NOT.VERIFIED..

Sascha Hauer (6):
media/video i.MX: use IMX_HAVE_PLATFORM_* macros
rtc i.MX Dryice: use IMX_HAVE_PLATFORM_IMXDI_RTC to depend on usb i.MX21: use IMX_HAVE_PLATFORM_IMX21_HCD to depend on video i.MX: remove mx1 compile time dependencies watchdog i.MX: use IMX_HAVE_PLATFORM_IMX2_WDT to depend on mmc i.MX sdhci: use IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX to depend on

 drivers/media/video/Kconfig |    4 ++--
 drivers/mmc/host/Kconfig    |    2 +-
 drivers/rtc/Kconfig         |    2 +-
 drivers/usb/host/Kconfig    |    2 +-
 drivers/video/Kconfig       |    2 +-
 drivers/video/imxfb.c       |   28 ++++++----------------------
 drivers/watchdog/Kconfig    |    2 +-
 7 files changed, 13 insertions(+), 29 deletions(-)
author maintainer
#1 lore raw

PATCH 1/6 media/video i.MX: use IMX_HAVE_PLATFORM_* macros

The i.MX architecture provides IMX_HAVE_PLATFORM_* macros to signal that a selected SoC supports a certain hardware. Use them instead of depending on ARCH_* directly.

Cc linux-media at vger.kernel.org
Cc Mauro Carvalho Chehab <[email protected]>
Cc Hans Verkuil <[email protected]>
---
 drivers/media/video/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/media/video/Kconfig +2 -2
index aa02160..6f869ed 100644
@@ -814,7 +814,7 @@ config MX1_VIDEO
 
 config VIDEO_MX1
 	tristate "i.MX1/i.MXL CMOS Sensor Interface driver"
-	depends on VIDEO_DEV && ARCH_MX1 && SOC_CAMERA
+	depends on VIDEO_DEV && SOC_CAMERA && IMX_HAVE_PLATFORM_MX1_CAMERA
 	select FIQ
 	select VIDEOBUF_DMA_CONTIG
 	select MX1_VIDEO
@@ -872,7 +872,7 @@ config VIDEO_MX2_HOSTSUPPORT
 
 config VIDEO_MX2
 	tristate "i.MX27/i.MX25 Camera Sensor Interface driver"
-	depends on VIDEO_DEV && SOC_CAMERA && (MACH_MX27 || ARCH_MX25)
+	depends on VIDEO_DEV && SOC_CAMERA && IMX_HAVE_PLATFORM_MX2_CAMERA
 	select VIDEOBUF_DMA_CONTIG
 	select VIDEO_MX2_HOSTSUPPORT
 	---help---
Signature · 1 line
1.7.2.3
author maintainer
#2 lore raw

PATCH 2/6 rtc i.MX Dryice: use IMX_HAVE_PLATFORM_IMXDI_RTC to depend on

In reply to Sascha Hauer

The i.MX architecture provides IMX_HAVE_PLATFORM_* macros to signal that a selected SoC supports a certain hardware. Use them instead of depending on ARCH_* directly.

Cc Alessandro Zummo <[email protected]>
Cc rtc-linux at googlegroups.com
---
 drivers/rtc/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/rtc/Kconfig +1 -1
index 4941cad..0d73a65 100644
@@ -581,7 +581,7 @@ config RTC_DRV_MSM6242
 
 config RTC_DRV_IMXDI
 	tristate "Freescale IMX DryIce Real Time Clock"
-	depends on ARCH_MX25
+	depends on IMX_HAVE_PLATFORM_IMXDI_RTC
 	depends on RTC_CLASS
 	help
 	   Support for Freescale IMX DryIce RTC
Signature · 1 line
1.7.2.3
author maintainer
#3 lore raw

PATCH 3/6 usb i.MX21: use IMX_HAVE_PLATFORM_IMX21_HCD to depend on

In reply to Sascha Hauer

The i.MX architecture provides IMX_HAVE_PLATFORM_* macros to signal that a selected SoC supports a certain hardware. Use them instead of depending on ARCH_* directly.

Cc Greg Kroah-Hartman <[email protected]>
Cc linux-usb at vger.kernel.org
---
 drivers/usb/host/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/host/Kconfig +1 -1
index 0e6afa2..40bb79f 100644
@@ -463,7 +463,7 @@ config USB_HWA_HCD
 
 config USB_IMX21_HCD
        tristate "iMX21 HCD support"
-       depends on USB && ARM && MACH_MX21
+       depends on USB && IMX_HAVE_PLATFORM_IMX21_HCD
        help
          This driver enables support for the on-chip USB host in the
          iMX21 processor.
Signature · 1 line
1.7.2.3
author maintainer
#4 lore raw

PATCH 4/6 video i.MX: remove mx1 compile time dependencies

In reply to Sascha Hauer

remove usage of CONFIG_ARCH_MX1. It's mostly unused anyway, replace it with cpu_is_mx1() where necessary. Also, depend on IMX_HAVE_PLATFORM_IMX_FB instead of the architectures directly.

---
 drivers/video/Kconfig |    2 +-
 drivers/video/imxfb.c |   28 ++++++----------------------
 2 files changed, 7 insertions(+), 23 deletions(-)
drivers/video/Kconfig +1 -1
index 6bafb51b..59c1e97 100644
@@ -422,7 +422,7 @@ config FB_SA1100
 
 config FB_IMX
 	tristate "Freescale i.MX LCD support"
-	depends on FB && (HAVE_FB_IMX || ARCH_MX1 || ARCH_MX2)
+	depends on FB && IMX_HAVE_PLATFORM_IMX_FB
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
drivers/video/imxfb.c +6 -22
index 69bd4a5..0085658 100644
@@ -65,12 +65,6 @@
 #define CPOS_OP		(1<<28)
 #define CPOS_CXP(x)	(((x) & 3ff) << 16)
 
-#ifdef CONFIG_ARCH_MX1
-#define CPOS_CYP(y)	((y) & 0x1ff)
-#else
-#define CPOS_CYP(y)	((y) & 0x3ff)
-#endif
-
 #define LCDC_LCWHB	0x10
 #define LCWHB_BK_EN	(1<<31)
 #define LCWHB_CW(w)	(((w) & 0x1f) << 24)
@@ -79,16 +73,6 @@
 
 #define LCDC_LCHCC	0x14
 
-#ifdef CONFIG_ARCH_MX1
-#define LCHCC_CUR_COL_R(r) (((r) & 0x1f) << 11)
-#define LCHCC_CUR_COL_G(g) (((g) & 0x3f) << 5)
-#define LCHCC_CUR_COL_B(b) ((b) & 0x1f)
-#else
-#define LCHCC_CUR_COL_R(r) (((r) & 0x3f) << 12)
-#define LCHCC_CUR_COL_G(g) (((g) & 0x3f) << 6)
-#define LCHCC_CUR_COL_B(b) ((b) & 0x3f)
-#endif
-
 #define LCDC_PCR	0x18
 
 #define LCDC_HCR	0x1C
@@ -115,11 +99,7 @@
 
 #define LCDC_RMCR	0x34
 
-#ifdef CONFIG_ARCH_MX1
-#define RMCR_LCDC_EN	(1<<1)
-#else
-#define RMCR_LCDC_EN	0
-#endif
+#define RMCR_LCDC_EN_MX1	(1<<1)
 
 #define RMCR_SELF_REF	(1<<0)
 
@@ -535,7 +515,11 @@ static void imxfb_enable_controller(struct imxfb_info *fbi)
 	writel(readl(fbi->regs + LCDC_CPOS) & ~(CPOS_CC0 | CPOS_CC1),
 		fbi->regs + LCDC_CPOS);
 
-	writel(RMCR_LCDC_EN, fbi->regs + LCDC_RMCR);
+	/*
+	 * RMCR_LCDC_EN_MX1 is present on i.MX1 only, but doesn't hurt
+	 * on other SoCs
+	 */
+	writel(RMCR_LCDC_EN_MX1, fbi->regs + LCDC_RMCR);
 
 	clk_enable(fbi->clk);
 
Signature · 1 line
1.7.2.3
#5 lore raw

PATCH 4/6 video i.MX: remove mx1 compile time dependencies

Hi Sascha,

Quoted 16 lines · Sascha Hauer

remove usage of CONFIG_ARCH_MX1. It's mostly unused anyway, replace it with cpu_is_mx1() where necessary. Also, depend on IMX_HAVE_PLATFORM_IMX_FB instead of the architectures directly.

---
 drivers/video/Kconfig |    2 +-
 drivers/video/imxfb.c |   28 ++++++----------------------
 2 files changed, 7 insertions(+), 23 deletions(-)
drivers/video/Kconfig +0 -0
index 6bafb51b..59c1e97 100644

drivers/video/Kconfig config FB_SA1100 · line 425

Quoted 5 lines
drivers/video/Kconfig +1 -1
@@ -422,7 +422,7 @@ config FB_SA1100
 
 config FB_IMX
 	tristate "Freescale i.MX LCD support"
-	depends on FB && (HAVE_FB_IMX || ARCH_MX1 || ARCH_MX2)
+	depends on FB && IMX_HAVE_PLATFORM_IMX_FB

The HAVE_FB_IMX symbol becomes redundant, then. We should remove it entirely from drivers/video/Kconfig and arch/arm/plat-mxc/devices/Kconfig.

baruch

Signature · 3 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
author maintainer
#6 lore raw

PATCH 4/6 video i.MX: remove mx1 compile time dependencies

Quoted 20 lines · Baruch Siach

Hi Sascha,

Quoted 17 lines · Sascha Hauer

remove usage of CONFIG_ARCH_MX1. It's mostly unused anyway, replace it with cpu_is_mx1() where necessary. Also, depend on IMX_HAVE_PLATFORM_IMX_FB instead of the architectures directly.

---
 drivers/video/Kconfig |    2 +-
 drivers/video/imxfb.c |   28 ++++++----------------------
 2 files changed, 7 insertions(+), 23 deletions(-)
drivers/video/Kconfig +0 -0
index 6bafb51b..59c1e97 100644
@@ -422,7 +422,7 @@ config FB_SA1100
 
Quoted 7 lines

drivers/video/Kconfig config FB_SA1100 · line 425

Quoted 4 lines
drivers/video/Kconfig +1 -1
 config FB_IMX
 	tristate "Freescale i.MX LCD support"
-	depends on FB && (HAVE_FB_IMX || ARCH_MX1 || ARCH_MX2)
+	depends on FB && IMX_HAVE_PLATFORM_IMX_FB

The HAVE_FB_IMX symbol becomes redundant, then. We should remove it entirely from drivers/video/Kconfig and arch/arm/plat-mxc/devices/Kconfig.

ok. Updated to the following:

8<-------------------------
[PATCH 4/6] video i.MX: remove mx1 compile time dependencies

remove usage of CONFIG_ARCH_MX1. It's mostly unused anyway, replace it with cpu_is_mx1() where necessary. Also, depend on IMX_HAVE_PLATFORM_IMX_FB instead of the architectures directly.

---
 arch/arm/plat-mxc/devices/Kconfig |    1 -
 drivers/video/Kconfig             |    5 +----
 drivers/video/imxfb.c             |   28 ++++++----------------------
 3 files changed, 7 insertions(+), 27 deletions(-)
arch/arm/plat-mxc/devices/Kconfig +0 -1
index b9ab1d5..e4dcf49 100644
@@ -24,7 +24,6 @@ config IMX_HAVE_PLATFORM_IMXDI_RTC
 
 config IMX_HAVE_PLATFORM_IMX_FB
 	bool
-	select HAVE_FB_IMX
 
 config IMX_HAVE_PLATFORM_IMX_I2C
 	bool
drivers/video/Kconfig +1 -4
index 6bafb51b..f372416 100644
@@ -8,9 +8,6 @@ menu "Graphics support"
 config HAVE_FB_ATMEL
 	bool
 
-config HAVE_FB_IMX
-	bool
-
 config SH_MIPI_DSI
 	tristate
 	depends on (SUPERH || ARCH_SHMOBILE) && HAVE_CLK
@@ -422,7 +419,7 @@ config FB_SA1100
 
 config FB_IMX
 	tristate "Freescale i.MX LCD support"
-	depends on FB && (HAVE_FB_IMX || ARCH_MX1 || ARCH_MX2)
+	depends on FB && IMX_HAVE_PLATFORM_IMX_FB
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
drivers/video/imxfb.c +6 -22
index 69bd4a5..0085658 100644
@@ -65,12 +65,6 @@
 #define CPOS_OP		(1<<28)
 #define CPOS_CXP(x)	(((x) & 3ff) << 16)
 
-#ifdef CONFIG_ARCH_MX1
-#define CPOS_CYP(y)	((y) & 0x1ff)
-#else
-#define CPOS_CYP(y)	((y) & 0x3ff)
-#endif
-
 #define LCDC_LCWHB	0x10
 #define LCWHB_BK_EN	(1<<31)
 #define LCWHB_CW(w)	(((w) & 0x1f) << 24)
@@ -79,16 +73,6 @@
 
 #define LCDC_LCHCC	0x14
 
-#ifdef CONFIG_ARCH_MX1
-#define LCHCC_CUR_COL_R(r) (((r) & 0x1f) << 11)
-#define LCHCC_CUR_COL_G(g) (((g) & 0x3f) << 5)
-#define LCHCC_CUR_COL_B(b) ((b) & 0x1f)
-#else
-#define LCHCC_CUR_COL_R(r) (((r) & 0x3f) << 12)
-#define LCHCC_CUR_COL_G(g) (((g) & 0x3f) << 6)
-#define LCHCC_CUR_COL_B(b) ((b) & 0x3f)
-#endif
-
 #define LCDC_PCR	0x18
 
 #define LCDC_HCR	0x1C
@@ -115,11 +99,7 @@
 
 #define LCDC_RMCR	0x34
 
-#ifdef CONFIG_ARCH_MX1
-#define RMCR_LCDC_EN	(1<<1)
-#else
-#define RMCR_LCDC_EN	0
-#endif
+#define RMCR_LCDC_EN_MX1	(1<<1)
 
 #define RMCR_SELF_REF	(1<<0)
 
@@ -535,7 +515,11 @@ static void imxfb_enable_controller(struct imxfb_info *fbi)
 	writel(readl(fbi->regs + LCDC_CPOS) & ~(CPOS_CC0 | CPOS_CC1),
 		fbi->regs + LCDC_CPOS);
 
-	writel(RMCR_LCDC_EN, fbi->regs + LCDC_RMCR);
+	/*
+	 * RMCR_LCDC_EN_MX1 is present on i.MX1 only, but doesn't hurt
+	 * on other SoCs
+	 */
+	writel(RMCR_LCDC_EN_MX1, fbi->regs + LCDC_RMCR);
 
 	clk_enable(fbi->clk);
 
Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
author maintainer
#7 lore raw

PATCH 5/6 watchdog i.MX: use IMX_HAVE_PLATFORM_IMX2_WDT to depend on

In reply to Sascha Hauer

The i.MX architecture provides IMX_HAVE_PLATFORM_* macros to signal that a selected SoC supports a certain hardware. Use them instead of depending on ARCH_* directly.

Cc Wim Van Sebroeck <[email protected]>
Cc linux-watchdog at vger.kernel.org
---
 drivers/watchdog/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/watchdog/Kconfig +1 -1
index 31649b7..2b095d3 100644
@@ -321,7 +321,7 @@ config MAX63XX_WATCHDOG
 
 config IMX2_WDT
 	tristate "IMX2+ Watchdog"
-	depends on ARCH_MX2 || ARCH_MX25 || ARCH_MX3 || ARCH_MX5
+	depends on IMX_HAVE_PLATFORM_IMX2_WDT
 	help
 	  This is the driver for the hardware watchdog
 	  on the Freescale IMX2 and later processors.
Signature · 1 line
1.7.2.3
author maintainer
#8 lore raw

PATCH 6/6 mmc i.MX sdhci: use IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX to depend on

In reply to Sascha Hauer

The i.MX architecture provides IMX_HAVE_PLATFORM_* macros to signal that a selected SoC supports a certain hardware. Use them instead of depending on ARCH_* directly.

Cc Chris Ball <[email protected]>
Cc linux-mmc at vger.kernel.org
---
 drivers/mmc/host/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/host/Kconfig +1 -1
index afe8c6f..326d78b 100644
@@ -134,7 +134,7 @@ config MMC_SDHCI_CNS3XXX
 
 config MMC_SDHCI_ESDHC_IMX
 	bool "SDHCI platform support for the Freescale eSDHC i.MX controller"
-	depends on MMC_SDHCI_PLTFM && (ARCH_MX25 || ARCH_MX35 || ARCH_MX5)
+	depends on MMC_SDHCI_PLTFM && IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
 	select MMC_SDHCI_IO_ACCESSORS
 	help
 	  This selects the Freescale eSDHC controller support on the platform
Signature · 1 line
1.7.2.3