All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remove kconfig dependencies from ARCH_MX*/MACH_MX*
@ 2011-03-03 13:30 Sascha Hauer
  2011-03-03 13:30   ` Sascha Hauer
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Sascha Hauer @ 2011-03-03 13:30 UTC (permalink / raw)
  To: linux-arm-kernel

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(-)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/6] media/video i.MX: use IMX_HAVE_PLATFORM_* macros
  2011-03-03 13:30 [PATCH] remove kconfig dependencies from ARCH_MX*/MACH_MX* Sascha Hauer
@ 2011-03-03 13:30   ` Sascha Hauer
  2011-03-03 13:30 ` [PATCH 2/6] rtc i.MX Dryice: use IMX_HAVE_PLATFORM_IMXDI_RTC to depend on Sascha Hauer
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Sascha Hauer @ 2011-03-03 13:30 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Sascha Hauer, linux-media, Mauro Carvalho Chehab, Hans Verkuil

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.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: linux-media@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
---
 drivers/media/video/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index aa02160..6f869ed 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -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---
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 1/6] media/video i.MX: use IMX_HAVE_PLATFORM_* macros
@ 2011-03-03 13:30   ` Sascha Hauer
  0 siblings, 0 replies; 12+ messages in thread
From: Sascha Hauer @ 2011-03-03 13:30 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Cc: linux-media at vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
---
 drivers/media/video/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index aa02160..6f869ed 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -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---
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/6] rtc i.MX Dryice: use IMX_HAVE_PLATFORM_IMXDI_RTC to depend on
  2011-03-03 13:30 [PATCH] remove kconfig dependencies from ARCH_MX*/MACH_MX* Sascha Hauer
  2011-03-03 13:30   ` Sascha Hauer
@ 2011-03-03 13:30 ` Sascha Hauer
  2011-03-03 13:30 ` [PATCH 3/6] usb i.MX21: use IMX_HAVE_PLATFORM_IMX21_HCD " Sascha Hauer
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Sascha Hauer @ 2011-03-03 13:30 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: rtc-linux at googlegroups.com
---
 drivers/rtc/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 4941cad..0d73a65 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -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
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/6] usb i.MX21: use IMX_HAVE_PLATFORM_IMX21_HCD to depend on
  2011-03-03 13:30 [PATCH] remove kconfig dependencies from ARCH_MX*/MACH_MX* Sascha Hauer
  2011-03-03 13:30   ` Sascha Hauer
  2011-03-03 13:30 ` [PATCH 2/6] rtc i.MX Dryice: use IMX_HAVE_PLATFORM_IMXDI_RTC to depend on Sascha Hauer
@ 2011-03-03 13:30 ` Sascha Hauer
  2011-03-03 13:30 ` [PATCH 4/6] video i.MX: remove mx1 compile time dependencies Sascha Hauer
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Sascha Hauer @ 2011-03-03 13:30 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: linux-usb at vger.kernel.org
---
 drivers/usb/host/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 0e6afa2..40bb79f 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -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.
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/6] video i.MX: remove mx1 compile time dependencies
  2011-03-03 13:30 [PATCH] remove kconfig dependencies from ARCH_MX*/MACH_MX* Sascha Hauer
                   ` (2 preceding siblings ...)
  2011-03-03 13:30 ` [PATCH 3/6] usb i.MX21: use IMX_HAVE_PLATFORM_IMX21_HCD " Sascha Hauer
@ 2011-03-03 13:30 ` Sascha Hauer
  2011-03-03 13:48   ` Baruch Siach
  2011-03-03 13:30   ` Sascha Hauer
  2011-03-03 13:31   ` Sascha Hauer
  5 siblings, 1 reply; 12+ messages in thread
From: Sascha Hauer @ 2011-03-03 13:30 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
 drivers/video/Kconfig |    2 +-
 drivers/video/imxfb.c |   28 ++++++----------------------
 2 files changed, 7 insertions(+), 23 deletions(-)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 6bafb51b..59c1e97 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -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
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
index 69bd4a5..0085658 100644
--- a/drivers/video/imxfb.c
+++ b/drivers/video/imxfb.c
@@ -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);
 
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 5/6] watchdog i.MX: use IMX_HAVE_PLATFORM_IMX2_WDT to depend on
  2011-03-03 13:30 [PATCH] remove kconfig dependencies from ARCH_MX*/MACH_MX* Sascha Hauer
@ 2011-03-03 13:30   ` Sascha Hauer
  2011-03-03 13:30 ` [PATCH 2/6] rtc i.MX Dryice: use IMX_HAVE_PLATFORM_IMXDI_RTC to depend on Sascha Hauer
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Sascha Hauer @ 2011-03-03 13:30 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Sascha Hauer, Wim Van Sebroeck, linux-watchdog

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.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: linux-watchdog@vger.kernel.org
---
 drivers/watchdog/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 31649b7..2b095d3 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -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.
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 5/6] watchdog i.MX: use IMX_HAVE_PLATFORM_IMX2_WDT to depend on
@ 2011-03-03 13:30   ` Sascha Hauer
  0 siblings, 0 replies; 12+ messages in thread
From: Sascha Hauer @ 2011-03-03 13:30 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: linux-watchdog at vger.kernel.org
---
 drivers/watchdog/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 31649b7..2b095d3 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -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.
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 6/6] mmc i.MX sdhci: use IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX to depend on
  2011-03-03 13:30 [PATCH] remove kconfig dependencies from ARCH_MX*/MACH_MX* Sascha Hauer
@ 2011-03-03 13:31   ` Sascha Hauer
  2011-03-03 13:30 ` [PATCH 2/6] rtc i.MX Dryice: use IMX_HAVE_PLATFORM_IMXDI_RTC to depend on Sascha Hauer
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Sascha Hauer @ 2011-03-03 13:31 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Sascha Hauer, Chris Ball, linux-mmc

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.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Chris Ball <cjb@laptop.org>
Cc: linux-mmc@vger.kernel.org
---
 drivers/mmc/host/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index afe8c6f..326d78b 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -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
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 6/6] mmc i.MX sdhci: use IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX to depend on
@ 2011-03-03 13:31   ` Sascha Hauer
  0 siblings, 0 replies; 12+ messages in thread
From: Sascha Hauer @ 2011-03-03 13:31 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Cc: Chris Ball <cjb@laptop.org>
Cc: linux-mmc at vger.kernel.org
---
 drivers/mmc/host/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index afe8c6f..326d78b 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -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
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/6] video i.MX: remove mx1 compile time dependencies
  2011-03-03 13:30 ` [PATCH 4/6] video i.MX: remove mx1 compile time dependencies Sascha Hauer
@ 2011-03-03 13:48   ` Baruch Siach
  2011-03-03 14:12     ` Sascha Hauer
  0 siblings, 1 reply; 12+ messages in thread
From: Baruch Siach @ 2011-03-03 13:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Sascha,

On Thu, Mar 03, 2011 at 02:30:58PM +0100, Sascha Hauer wrote:
> 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.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/video/Kconfig |    2 +-
>  drivers/video/imxfb.c |   28 ++++++----------------------
>  2 files changed, 7 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> index 6bafb51b..59c1e97 100644
> --- a/drivers/video/Kconfig
> +++ b/drivers/video/Kconfig
> @@ -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

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 4/6] video i.MX: remove mx1 compile time dependencies
  2011-03-03 13:48   ` Baruch Siach
@ 2011-03-03 14:12     ` Sascha Hauer
  0 siblings, 0 replies; 12+ messages in thread
From: Sascha Hauer @ 2011-03-03 14:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 03, 2011 at 03:48:58PM +0200, Baruch Siach wrote:
> Hi Sascha,
> 
> On Thu, Mar 03, 2011 at 02:30:58PM +0100, Sascha Hauer wrote:
> > 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.
> > 
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> > ---
> >  drivers/video/Kconfig |    2 +-
> >  drivers/video/imxfb.c |   28 ++++++----------------------
> >  2 files changed, 7 insertions(+), 23 deletions(-)
> > 
> > diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> > index 6bafb51b..59c1e97 100644
> > --- a/drivers/video/Kconfig
> > +++ b/drivers/video/Kconfig
> > @@ -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.

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.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/plat-mxc/devices/Kconfig |    1 -
 drivers/video/Kconfig             |    5 +----
 drivers/video/imxfb.c             |   28 ++++++----------------------
 3 files changed, 7 insertions(+), 27 deletions(-)

diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig
index b9ab1d5..e4dcf49 100644
--- a/arch/arm/plat-mxc/devices/Kconfig
+++ b/arch/arm/plat-mxc/devices/Kconfig
@@ -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
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 6bafb51b..f372416 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -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
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
index 69bd4a5..0085658 100644
--- a/drivers/video/imxfb.c
+++ b/drivers/video/imxfb.c
@@ -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);
 

-- 
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 |

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-03-03 14:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-03 13:30 [PATCH] remove kconfig dependencies from ARCH_MX*/MACH_MX* Sascha Hauer
2011-03-03 13:30 ` [PATCH 1/6] media/video i.MX: use IMX_HAVE_PLATFORM_* macros Sascha Hauer
2011-03-03 13:30   ` Sascha Hauer
2011-03-03 13:30 ` [PATCH 2/6] rtc i.MX Dryice: use IMX_HAVE_PLATFORM_IMXDI_RTC to depend on Sascha Hauer
2011-03-03 13:30 ` [PATCH 3/6] usb i.MX21: use IMX_HAVE_PLATFORM_IMX21_HCD " Sascha Hauer
2011-03-03 13:30 ` [PATCH 4/6] video i.MX: remove mx1 compile time dependencies Sascha Hauer
2011-03-03 13:48   ` Baruch Siach
2011-03-03 14:12     ` Sascha Hauer
2011-03-03 13:30 ` [PATCH 5/6] watchdog i.MX: use IMX_HAVE_PLATFORM_IMX2_WDT to depend on Sascha Hauer
2011-03-03 13:30   ` Sascha Hauer
2011-03-03 13:31 ` [PATCH 6/6] mmc i.MX sdhci: use IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX " Sascha Hauer
2011-03-03 13:31   ` Sascha Hauer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.