summaryrefslogtreecommitdiff
path: root/firmware/target/arm/rk27xx/lcdif-rk27xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/rk27xx/lcdif-rk27xx.c')
-rw-r--r--firmware/target/arm/rk27xx/lcdif-rk27xx.c15
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)
123} 123}
124 124
125/* configure pins to drive lcd in 18bit mode (16bit mode for HiFiMAN's) */ 125/* configure pins to drive lcd in 18bit mode (16bit mode for HiFiMAN's) */
126static void iomux_lcd(void) 126static void iomux_lcd(enum lcdif_mode_t mode)
127{ 127{
128 unsigned long muxa; 128 unsigned long muxa;
129 129
130 muxa = SCU_IOMUXA_CON & ~(IOMUX_LCD_VSYNC|IOMUX_LCD_DEN|0xff); 130 muxa = SCU_IOMUXA_CON & ~(IOMUX_LCD_VSYNC|IOMUX_LCD_DEN|0xff);
131 131
132#if !defined(HM801) && !defined(HM60x) 132 if (mode == LCDIF_18BIT)
133 muxa |= IOMUX_LCD_D18|IOMUX_LCD_D20|IOMUX_LCD_D22|IOMUX_LCD_D17|IOMUX_LCD_D16; 133 {
134#endif 134 muxa |= IOMUX_LCD_D18|IOMUX_LCD_D20|IOMUX_LCD_D22|IOMUX_LCD_D17|IOMUX_LCD_D16;
135 }
135 136
136 SCU_IOMUXA_CON = muxa; 137 SCU_IOMUXA_CON = muxa;
137 SCU_IOMUXB_CON |= IOMUX_LCD_D815; 138 SCU_IOMUXB_CON |= IOMUX_LCD_D815;
138} 139}
139 140
140void lcd_init_device() 141void lcdif_init(enum lcdif_mode_t mode)
141{ 142{
142 iomux_lcd(); /* setup pins for 16bit lcd interface */ 143 iomux_lcd(mode); /* setup pins for lcd interface */
143 lcdctrl_init(); /* basic lcdc module configuration */ 144 lcdctrl_init(); /* basic lcdc module configuration */
144
145 lcdctrl_bypass(1); /* run in bypass mode - all writes goes directly to lcd controller */ 145 lcdctrl_bypass(1); /* run in bypass mode - all writes goes directly to lcd controller */
146 lcd_display_init();
147} 146}
148 147
149/* This is ugly hack. We drive lcd in bypass mode 148/* This is ugly hack. We drive lcd in bypass mode