diff options
author | Andrew Ryabinin <ryabinin.a.a@gmail.com> | 2012-02-28 20:53:52 +0400 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2012-03-06 09:37:11 +0100 |
commit | b069562ef4146c2b377d14bbe6cb35f0ff4fd043 (patch) | |
tree | 819f168e69ee7cf2c0058b10d79400b309ac5f94 /firmware/target/arm/rk27xx/lcdif-rk27xx.c | |
parent | 4601a8b44a2aad323b7c805228fcade2333c95dd (diff) |
rk27xx: lcdif refactoring: make lcdif-rk27xx.c more generic
iomux_lcd now has parameter for display bit mode settings, so we doesn't need ifdef here.
lcd_init_device moved to target specific code
lcdif_init configure pins and lcd cotroller
Change-Id: I3a2d7fd38b08fe3bc5ebefa8c9f7288c21f58212
Reviewed-on: http://gerrit.rockbox.org/153
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
Tested-by: Marcin Bukat <marcin.bukat@gmail.com>
Diffstat (limited to 'firmware/target/arm/rk27xx/lcdif-rk27xx.c')
-rw-r--r-- | firmware/target/arm/rk27xx/lcdif-rk27xx.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/firmware/target/arm/rk27xx/lcdif-rk27xx.c b/firmware/target/arm/rk27xx/lcdif-rk27xx.c index ff60279315..affc49b213 100644 --- a/firmware/target/arm/rk27xx/lcdif-rk27xx.c +++ b/firmware/target/arm/rk27xx/lcdif-rk27xx.c @@ -123,27 +123,26 @@ static void lcdctrl_init(void) } /* configure pins to drive lcd in 18bit mode (16bit mode for HiFiMAN's) */ -static void iomux_lcd(void) +static void iomux_lcd(enum lcdif_mode_t mode) { unsigned long muxa; muxa = SCU_IOMUXA_CON & ~(IOMUX_LCD_VSYNC|IOMUX_LCD_DEN|0xff); -#if !defined(HM801) && !defined(HM60x) - muxa |= IOMUX_LCD_D18|IOMUX_LCD_D20|IOMUX_LCD_D22|IOMUX_LCD_D17|IOMUX_LCD_D16; -#endif + if (mode == LCDIF_18BIT) + { + muxa |= IOMUX_LCD_D18|IOMUX_LCD_D20|IOMUX_LCD_D22|IOMUX_LCD_D17|IOMUX_LCD_D16; + } SCU_IOMUXA_CON = muxa; SCU_IOMUXB_CON |= IOMUX_LCD_D815; } -void lcd_init_device() +void lcdif_init(enum lcdif_mode_t mode) { - iomux_lcd(); /* setup pins for 16bit lcd interface */ + iomux_lcd(mode); /* setup pins for lcd interface */ lcdctrl_init(); /* basic lcdc module configuration */ - lcdctrl_bypass(1); /* run in bypass mode - all writes goes directly to lcd controller */ - lcd_display_init(); } /* This is ugly hack. We drive lcd in bypass mode |