Skip to content

Commit

Permalink
video i.MX: remove mx1 compile time dependencies
Browse files Browse the repository at this point in the history
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.

LAKML-Reference: 20110303141244.GQ29521@pengutronix.de
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
  • Loading branch information
Sascha Hauer committed May 19, 2011
1 parent ba8a6c0 commit f142b61
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 27 deletions.
1 change: 0 additions & 1 deletion arch/arm/plat-mxc/devices/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions drivers/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -359,7 +356,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
Expand Down
28 changes: 6 additions & 22 deletions drivers/video/imxfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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)

Expand Down Expand Up @@ -536,7 +516,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);

Expand Down

0 comments on commit f142b61

Please sign in to comment.