diff options
Diffstat (limited to 'drivers/video/omap')
-rw-r--r-- | drivers/video/omap/dispc.c | 21 | ||||
-rw-r--r-- | drivers/video/omap/dispc.h | 2 | ||||
-rw-r--r-- | drivers/video/omap/lcd_h4.c | 4 | ||||
-rw-r--r-- | drivers/video/omap/lcd_inn1610.c | 22 | ||||
-rw-r--r-- | drivers/video/omap/lcd_osk.c | 10 | ||||
-rw-r--r-- | drivers/video/omap/lcd_sx1.c | 99 | ||||
-rw-r--r-- | drivers/video/omap/lcdc.c | 2 | ||||
-rw-r--r-- | drivers/video/omap/lcdc.h | 2 | ||||
-rw-r--r-- | drivers/video/omap/omapfb_main.c | 15 | ||||
-rw-r--r-- | drivers/video/omap/rfbi.c | 9 | ||||
-rw-r--r-- | drivers/video/omap/sossi.c | 8 |
11 files changed, 105 insertions, 89 deletions
diff --git a/drivers/video/omap/dispc.c b/drivers/video/omap/dispc.c index 6efcf89e7fbe..dfb72f5e4c96 100644 --- a/drivers/video/omap/dispc.c +++ b/drivers/video/omap/dispc.c | |||
@@ -156,7 +156,7 @@ struct resmap { | |||
156 | }; | 156 | }; |
157 | 157 | ||
158 | static struct { | 158 | static struct { |
159 | u32 base; | 159 | void __iomem *base; |
160 | 160 | ||
161 | struct omapfb_mem_desc mem_desc; | 161 | struct omapfb_mem_desc mem_desc; |
162 | struct resmap *res_map[DISPC_MEMTYPE_NUM]; | 162 | struct resmap *res_map[DISPC_MEMTYPE_NUM]; |
@@ -212,9 +212,9 @@ static void enable_rfbi_mode(int enable) | |||
212 | dispc_write_reg(DISPC_CONTROL, l); | 212 | dispc_write_reg(DISPC_CONTROL, l); |
213 | 213 | ||
214 | /* Set bypass mode in RFBI module */ | 214 | /* Set bypass mode in RFBI module */ |
215 | l = __raw_readl(io_p2v(RFBI_CONTROL)); | 215 | l = __raw_readl(IO_ADDRESS(RFBI_CONTROL)); |
216 | l |= enable ? 0 : (1 << 1); | 216 | l |= enable ? 0 : (1 << 1); |
217 | __raw_writel(l, io_p2v(RFBI_CONTROL)); | 217 | __raw_writel(l, IO_ADDRESS(RFBI_CONTROL)); |
218 | } | 218 | } |
219 | 219 | ||
220 | static void set_lcd_data_lines(int data_lines) | 220 | static void set_lcd_data_lines(int data_lines) |
@@ -1349,14 +1349,19 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode, | |||
1349 | 1349 | ||
1350 | memset(&dispc, 0, sizeof(dispc)); | 1350 | memset(&dispc, 0, sizeof(dispc)); |
1351 | 1351 | ||
1352 | dispc.base = io_p2v(DISPC_BASE); | 1352 | dispc.base = ioremap(DISPC_BASE, SZ_1K); |
1353 | if (!dispc.base) { | ||
1354 | dev_err(fbdev->dev, "can't ioremap DISPC\n"); | ||
1355 | return -ENOMEM; | ||
1356 | } | ||
1357 | |||
1353 | dispc.fbdev = fbdev; | 1358 | dispc.fbdev = fbdev; |
1354 | dispc.ext_mode = ext_mode; | 1359 | dispc.ext_mode = ext_mode; |
1355 | 1360 | ||
1356 | init_completion(&dispc.frame_done); | 1361 | init_completion(&dispc.frame_done); |
1357 | 1362 | ||
1358 | if ((r = get_dss_clocks()) < 0) | 1363 | if ((r = get_dss_clocks()) < 0) |
1359 | return r; | 1364 | goto fail0; |
1360 | 1365 | ||
1361 | enable_interface_clocks(1); | 1366 | enable_interface_clocks(1); |
1362 | enable_lcd_clocks(1); | 1367 | enable_lcd_clocks(1); |
@@ -1414,7 +1419,7 @@ static int omap_dispc_init(struct omapfb_device *fbdev, int ext_mode, | |||
1414 | } | 1419 | } |
1415 | 1420 | ||
1416 | /* L3 firewall setting: enable access to OCM RAM */ | 1421 | /* L3 firewall setting: enable access to OCM RAM */ |
1417 | __raw_writel(0x402000b0, io_p2v(0x680050a0)); | 1422 | __raw_writel(0x402000b0, IO_ADDRESS(0x680050a0)); |
1418 | 1423 | ||
1419 | if ((r = alloc_palette_ram()) < 0) | 1424 | if ((r = alloc_palette_ram()) < 0) |
1420 | goto fail2; | 1425 | goto fail2; |
@@ -1464,7 +1469,8 @@ fail1: | |||
1464 | enable_lcd_clocks(0); | 1469 | enable_lcd_clocks(0); |
1465 | enable_interface_clocks(0); | 1470 | enable_interface_clocks(0); |
1466 | put_dss_clocks(); | 1471 | put_dss_clocks(); |
1467 | 1472 | fail0: | |
1473 | iounmap(dispc.base); | ||
1468 | return r; | 1474 | return r; |
1469 | } | 1475 | } |
1470 | 1476 | ||
@@ -1481,6 +1487,7 @@ static void omap_dispc_cleanup(void) | |||
1481 | free_irq(INT_24XX_DSS_IRQ, dispc.fbdev); | 1487 | free_irq(INT_24XX_DSS_IRQ, dispc.fbdev); |
1482 | enable_interface_clocks(0); | 1488 | enable_interface_clocks(0); |
1483 | put_dss_clocks(); | 1489 | put_dss_clocks(); |
1490 | iounmap(dispc.base); | ||
1484 | } | 1491 | } |
1485 | 1492 | ||
1486 | const struct lcd_ctrl omap2_int_ctrl = { | 1493 | const struct lcd_ctrl omap2_int_ctrl = { |
diff --git a/drivers/video/omap/dispc.h b/drivers/video/omap/dispc.h index eb1512b56ce8..ef720a78f6d5 100644 --- a/drivers/video/omap/dispc.h +++ b/drivers/video/omap/dispc.h | |||
@@ -40,4 +40,6 @@ extern void omap_dispc_enable_digit_out(int enable); | |||
40 | extern int omap_dispc_request_irq(void (*callback)(void *data), void *data); | 40 | extern int omap_dispc_request_irq(void (*callback)(void *data), void *data); |
41 | extern void omap_dispc_free_irq(void); | 41 | extern void omap_dispc_free_irq(void); |
42 | 42 | ||
43 | extern const struct lcd_ctrl omap2_int_ctrl; | ||
44 | |||
43 | #endif | 45 | #endif |
diff --git a/drivers/video/omap/lcd_h4.c b/drivers/video/omap/lcd_h4.c index 88c19d424ef7..6ff56430341b 100644 --- a/drivers/video/omap/lcd_h4.c +++ b/drivers/video/omap/lcd_h4.c | |||
@@ -47,7 +47,7 @@ static unsigned long h4_panel_get_caps(struct lcd_panel *panel) | |||
47 | return 0; | 47 | return 0; |
48 | } | 48 | } |
49 | 49 | ||
50 | struct lcd_panel h4_panel = { | 50 | static struct lcd_panel h4_panel = { |
51 | .name = "h4", | 51 | .name = "h4", |
52 | .config = OMAP_LCDC_PANEL_TFT, | 52 | .config = OMAP_LCDC_PANEL_TFT, |
53 | 53 | ||
@@ -91,7 +91,7 @@ static int h4_panel_resume(struct platform_device *pdev) | |||
91 | return 0; | 91 | return 0; |
92 | } | 92 | } |
93 | 93 | ||
94 | struct platform_driver h4_panel_driver = { | 94 | static struct platform_driver h4_panel_driver = { |
95 | .probe = h4_panel_probe, | 95 | .probe = h4_panel_probe, |
96 | .remove = h4_panel_remove, | 96 | .remove = h4_panel_remove, |
97 | .suspend = h4_panel_suspend, | 97 | .suspend = h4_panel_suspend, |
diff --git a/drivers/video/omap/lcd_inn1610.c b/drivers/video/omap/lcd_inn1610.c index 6a42c6a0cd99..4c4f7ee6d733 100644 --- a/drivers/video/omap/lcd_inn1610.c +++ b/drivers/video/omap/lcd_inn1610.c | |||
@@ -32,43 +32,43 @@ static int innovator1610_panel_init(struct lcd_panel *panel, | |||
32 | { | 32 | { |
33 | int r = 0; | 33 | int r = 0; |
34 | 34 | ||
35 | if (omap_request_gpio(14)) { | 35 | if (gpio_request(14, "lcd_en0")) { |
36 | pr_err(MODULE_NAME ": can't request GPIO 14\n"); | 36 | pr_err(MODULE_NAME ": can't request GPIO 14\n"); |
37 | r = -1; | 37 | r = -1; |
38 | goto exit; | 38 | goto exit; |
39 | } | 39 | } |
40 | if (omap_request_gpio(15)) { | 40 | if (gpio_request(15, "lcd_en1")) { |
41 | pr_err(MODULE_NAME ": can't request GPIO 15\n"); | 41 | pr_err(MODULE_NAME ": can't request GPIO 15\n"); |
42 | omap_free_gpio(14); | 42 | gpio_free(14); |
43 | r = -1; | 43 | r = -1; |
44 | goto exit; | 44 | goto exit; |
45 | } | 45 | } |
46 | /* configure GPIO(14, 15) as outputs */ | 46 | /* configure GPIO(14, 15) as outputs */ |
47 | omap_set_gpio_direction(14, 0); | 47 | gpio_direction_output(14, 0); |
48 | omap_set_gpio_direction(15, 0); | 48 | gpio_direction_output(15, 0); |
49 | exit: | 49 | exit: |
50 | return r; | 50 | return r; |
51 | } | 51 | } |
52 | 52 | ||
53 | static void innovator1610_panel_cleanup(struct lcd_panel *panel) | 53 | static void innovator1610_panel_cleanup(struct lcd_panel *panel) |
54 | { | 54 | { |
55 | omap_free_gpio(15); | 55 | gpio_free(15); |
56 | omap_free_gpio(14); | 56 | gpio_free(14); |
57 | } | 57 | } |
58 | 58 | ||
59 | static int innovator1610_panel_enable(struct lcd_panel *panel) | 59 | static int innovator1610_panel_enable(struct lcd_panel *panel) |
60 | { | 60 | { |
61 | /* set GPIO14 and GPIO15 high */ | 61 | /* set GPIO14 and GPIO15 high */ |
62 | omap_set_gpio_dataout(14, 1); | 62 | gpio_set_value(14, 1); |
63 | omap_set_gpio_dataout(15, 1); | 63 | gpio_set_value(15, 1); |
64 | return 0; | 64 | return 0; |
65 | } | 65 | } |
66 | 66 | ||
67 | static void innovator1610_panel_disable(struct lcd_panel *panel) | 67 | static void innovator1610_panel_disable(struct lcd_panel *panel) |
68 | { | 68 | { |
69 | /* set GPIO13, GPIO14 and GPIO15 low */ | 69 | /* set GPIO13, GPIO14 and GPIO15 low */ |
70 | omap_set_gpio_dataout(14, 0); | 70 | gpio_set_value(14, 0); |
71 | omap_set_gpio_dataout(15, 0); | 71 | gpio_set_value(15, 0); |
72 | } | 72 | } |
73 | 73 | ||
74 | static unsigned long innovator1610_panel_get_caps(struct lcd_panel *panel) | 74 | static unsigned long innovator1610_panel_get_caps(struct lcd_panel *panel) |
diff --git a/drivers/video/omap/lcd_osk.c b/drivers/video/omap/lcd_osk.c index a4a725f427a4..379c96d36da5 100644 --- a/drivers/video/omap/lcd_osk.c +++ b/drivers/video/omap/lcd_osk.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | static int osk_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) | 30 | static int osk_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) |
31 | { | 31 | { |
32 | /* gpio2 was allocated in board init */ | ||
32 | return 0; | 33 | return 0; |
33 | } | 34 | } |
34 | 35 | ||
@@ -47,11 +48,8 @@ static int osk_panel_enable(struct lcd_panel *panel) | |||
47 | /* Set PWL level */ | 48 | /* Set PWL level */ |
48 | omap_writeb(0xFF, OMAP_PWL_ENABLE); | 49 | omap_writeb(0xFF, OMAP_PWL_ENABLE); |
49 | 50 | ||
50 | /* configure GPIO2 as output */ | 51 | /* set GPIO2 high (lcd power enabled) */ |
51 | omap_set_gpio_direction(2, 0); | 52 | gpio_set_value(2, 1); |
52 | |||
53 | /* set GPIO2 high */ | ||
54 | omap_set_gpio_dataout(2, 1); | ||
55 | 53 | ||
56 | return 0; | 54 | return 0; |
57 | } | 55 | } |
@@ -65,7 +63,7 @@ static void osk_panel_disable(struct lcd_panel *panel) | |||
65 | omap_writeb(0x00, OMAP_PWL_CLK_ENABLE); | 63 | omap_writeb(0x00, OMAP_PWL_CLK_ENABLE); |
66 | 64 | ||
67 | /* set GPIO2 low */ | 65 | /* set GPIO2 low */ |
68 | omap_set_gpio_dataout(2, 0); | 66 | gpio_set_value(2, 0); |
69 | } | 67 | } |
70 | 68 | ||
71 | static unsigned long osk_panel_get_caps(struct lcd_panel *panel) | 69 | static unsigned long osk_panel_get_caps(struct lcd_panel *panel) |
diff --git a/drivers/video/omap/lcd_sx1.c b/drivers/video/omap/lcd_sx1.c index caa6a896cb8b..e55de201b8ff 100644 --- a/drivers/video/omap/lcd_sx1.c +++ b/drivers/video/omap/lcd_sx1.c | |||
@@ -81,21 +81,21 @@ static void epson_sendbyte(int flag, unsigned char byte) | |||
81 | int i, shifter = 0x80; | 81 | int i, shifter = 0x80; |
82 | 82 | ||
83 | if (!flag) | 83 | if (!flag) |
84 | omap_set_gpio_dataout(_A_LCD_SSC_A0, 0); | 84 | gpio_set_value(_A_LCD_SSC_A0, 0); |
85 | mdelay(2); | 85 | mdelay(2); |
86 | omap_set_gpio_dataout(A_LCD_SSC_RD, 1); | 86 | gpio_set_value(A_LCD_SSC_RD, 1); |
87 | 87 | ||
88 | omap_set_gpio_dataout(A_LCD_SSC_SD, flag); | 88 | gpio_set_value(A_LCD_SSC_SD, flag); |
89 | 89 | ||
90 | OMAP_MCBSP_WRITE(OMAP1510_MCBSP3_BASE, PCR0, 0x2200); | 90 | OMAP_MCBSP_WRITE(OMAP1510_MCBSP3_BASE, PCR0, 0x2200); |
91 | OMAP_MCBSP_WRITE(OMAP1510_MCBSP3_BASE, PCR0, 0x2202); | 91 | OMAP_MCBSP_WRITE(OMAP1510_MCBSP3_BASE, PCR0, 0x2202); |
92 | for (i = 0; i < 8; i++) { | 92 | for (i = 0; i < 8; i++) { |
93 | OMAP_MCBSP_WRITE(OMAP1510_MCBSP3_BASE, PCR0, 0x2200); | 93 | OMAP_MCBSP_WRITE(OMAP1510_MCBSP3_BASE, PCR0, 0x2200); |
94 | omap_set_gpio_dataout(A_LCD_SSC_SD, shifter & byte); | 94 | gpio_set_value(A_LCD_SSC_SD, shifter & byte); |
95 | OMAP_MCBSP_WRITE(OMAP1510_MCBSP3_BASE, PCR0, 0x2202); | 95 | OMAP_MCBSP_WRITE(OMAP1510_MCBSP3_BASE, PCR0, 0x2202); |
96 | shifter >>= 1; | 96 | shifter >>= 1; |
97 | } | 97 | } |
98 | omap_set_gpio_dataout(_A_LCD_SSC_A0, 1); | 98 | gpio_set_value(_A_LCD_SSC_A0, 1); |
99 | } | 99 | } |
100 | 100 | ||
101 | static void init_system(void) | 101 | static void init_system(void) |
@@ -107,25 +107,18 @@ static void init_system(void) | |||
107 | static void setup_GPIO(void) | 107 | static void setup_GPIO(void) |
108 | { | 108 | { |
109 | /* new wave */ | 109 | /* new wave */ |
110 | omap_request_gpio(A_LCD_SSC_RD); | 110 | gpio_request(A_LCD_SSC_RD, "lcd_ssc_rd"); |
111 | omap_request_gpio(A_LCD_SSC_SD); | 111 | gpio_request(A_LCD_SSC_SD, "lcd_ssc_sd"); |
112 | omap_request_gpio(_A_LCD_RESET); | 112 | gpio_request(_A_LCD_RESET, "lcd_reset"); |
113 | omap_request_gpio(_A_LCD_SSC_CS); | 113 | gpio_request(_A_LCD_SSC_CS, "lcd_ssc_cs"); |
114 | omap_request_gpio(_A_LCD_SSC_A0); | 114 | gpio_request(_A_LCD_SSC_A0, "lcd_ssc_a0"); |
115 | 115 | ||
116 | /* set all GPIOs to output */ | 116 | /* set GPIOs to output, with initial data */ |
117 | omap_set_gpio_direction(A_LCD_SSC_RD, 0); | 117 | gpio_direction_output(A_LCD_SSC_RD, 1); |
118 | omap_set_gpio_direction(A_LCD_SSC_SD, 0); | 118 | gpio_direction_output(A_LCD_SSC_SD, 0); |
119 | omap_set_gpio_direction(_A_LCD_RESET, 0); | 119 | gpio_direction_output(_A_LCD_RESET, 0); |
120 | omap_set_gpio_direction(_A_LCD_SSC_CS, 0); | 120 | gpio_direction_output(_A_LCD_SSC_CS, 1); |
121 | omap_set_gpio_direction(_A_LCD_SSC_A0, 0); | 121 | gpio_direction_output(_A_LCD_SSC_A0, 1); |
122 | |||
123 | /* set GPIO data */ | ||
124 | omap_set_gpio_dataout(A_LCD_SSC_RD, 1); | ||
125 | omap_set_gpio_dataout(A_LCD_SSC_SD, 0); | ||
126 | omap_set_gpio_dataout(_A_LCD_RESET, 0); | ||
127 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 1); | ||
128 | omap_set_gpio_dataout(_A_LCD_SSC_A0, 1); | ||
129 | } | 122 | } |
130 | 123 | ||
131 | static void display_init(void) | 124 | static void display_init(void) |
@@ -139,61 +132,61 @@ static void display_init(void) | |||
139 | mdelay(2); | 132 | mdelay(2); |
140 | 133 | ||
141 | /* reset LCD */ | 134 | /* reset LCD */ |
142 | omap_set_gpio_dataout(A_LCD_SSC_SD, 1); | 135 | gpio_set_value(A_LCD_SSC_SD, 1); |
143 | epson_sendbyte(0, 0x25); | 136 | epson_sendbyte(0, 0x25); |
144 | 137 | ||
145 | omap_set_gpio_dataout(_A_LCD_RESET, 0); | 138 | gpio_set_value(_A_LCD_RESET, 0); |
146 | mdelay(10); | 139 | mdelay(10); |
147 | omap_set_gpio_dataout(_A_LCD_RESET, 1); | 140 | gpio_set_value(_A_LCD_RESET, 1); |
148 | 141 | ||
149 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 1); | 142 | gpio_set_value(_A_LCD_SSC_CS, 1); |
150 | mdelay(2); | 143 | mdelay(2); |
151 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 0); | 144 | gpio_set_value(_A_LCD_SSC_CS, 0); |
152 | 145 | ||
153 | /* init LCD, phase 1 */ | 146 | /* init LCD, phase 1 */ |
154 | epson_sendbyte(0, 0xCA); | 147 | epson_sendbyte(0, 0xCA); |
155 | for (i = 0; i < 10; i++) | 148 | for (i = 0; i < 10; i++) |
156 | epson_sendbyte(1, INIT_1[i]); | 149 | epson_sendbyte(1, INIT_1[i]); |
157 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 1); | 150 | gpio_set_value(_A_LCD_SSC_CS, 1); |
158 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 0); | 151 | gpio_set_value(_A_LCD_SSC_CS, 0); |
159 | 152 | ||
160 | /* init LCD phase 2 */ | 153 | /* init LCD phase 2 */ |
161 | epson_sendbyte(0, 0xCB); | 154 | epson_sendbyte(0, 0xCB); |
162 | for (i = 0; i < 125; i++) | 155 | for (i = 0; i < 125; i++) |
163 | epson_sendbyte(1, INIT_2[i]); | 156 | epson_sendbyte(1, INIT_2[i]); |
164 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 1); | 157 | gpio_set_value(_A_LCD_SSC_CS, 1); |
165 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 0); | 158 | gpio_set_value(_A_LCD_SSC_CS, 0); |
166 | 159 | ||
167 | /* init LCD phase 2a */ | 160 | /* init LCD phase 2a */ |
168 | epson_sendbyte(0, 0xCC); | 161 | epson_sendbyte(0, 0xCC); |
169 | for (i = 0; i < 14; i++) | 162 | for (i = 0; i < 14; i++) |
170 | epson_sendbyte(1, INIT_3[i]); | 163 | epson_sendbyte(1, INIT_3[i]); |
171 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 1); | 164 | gpio_set_value(_A_LCD_SSC_CS, 1); |
172 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 0); | 165 | gpio_set_value(_A_LCD_SSC_CS, 0); |
173 | 166 | ||
174 | /* init LCD phase 3 */ | 167 | /* init LCD phase 3 */ |
175 | epson_sendbyte(0, 0xBC); | 168 | epson_sendbyte(0, 0xBC); |
176 | epson_sendbyte(1, 0x08); | 169 | epson_sendbyte(1, 0x08); |
177 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 1); | 170 | gpio_set_value(_A_LCD_SSC_CS, 1); |
178 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 0); | 171 | gpio_set_value(_A_LCD_SSC_CS, 0); |
179 | 172 | ||
180 | /* init LCD phase 4 */ | 173 | /* init LCD phase 4 */ |
181 | epson_sendbyte(0, 0x07); | 174 | epson_sendbyte(0, 0x07); |
182 | epson_sendbyte(1, 0x05); | 175 | epson_sendbyte(1, 0x05); |
183 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 1); | 176 | gpio_set_value(_A_LCD_SSC_CS, 1); |
184 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 0); | 177 | gpio_set_value(_A_LCD_SSC_CS, 0); |
185 | 178 | ||
186 | /* init LCD phase 5 */ | 179 | /* init LCD phase 5 */ |
187 | epson_sendbyte(0, 0x94); | 180 | epson_sendbyte(0, 0x94); |
188 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 1); | 181 | gpio_set_value(_A_LCD_SSC_CS, 1); |
189 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 0); | 182 | gpio_set_value(_A_LCD_SSC_CS, 0); |
190 | 183 | ||
191 | /* init LCD phase 6 */ | 184 | /* init LCD phase 6 */ |
192 | epson_sendbyte(0, 0xC6); | 185 | epson_sendbyte(0, 0xC6); |
193 | epson_sendbyte(1, 0x80); | 186 | epson_sendbyte(1, 0x80); |
194 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 1); | 187 | gpio_set_value(_A_LCD_SSC_CS, 1); |
195 | mdelay(100); /* used to be 1000 */ | 188 | mdelay(100); /* used to be 1000 */ |
196 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 0); | 189 | gpio_set_value(_A_LCD_SSC_CS, 0); |
197 | 190 | ||
198 | /* init LCD phase 7 */ | 191 | /* init LCD phase 7 */ |
199 | epson_sendbyte(0, 0x16); | 192 | epson_sendbyte(0, 0x16); |
@@ -201,8 +194,8 @@ static void display_init(void) | |||
201 | epson_sendbyte(1, 0x00); | 194 | epson_sendbyte(1, 0x00); |
202 | epson_sendbyte(1, 0xB1); | 195 | epson_sendbyte(1, 0xB1); |
203 | epson_sendbyte(1, 0x00); | 196 | epson_sendbyte(1, 0x00); |
204 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 1); | 197 | gpio_set_value(_A_LCD_SSC_CS, 1); |
205 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 0); | 198 | gpio_set_value(_A_LCD_SSC_CS, 0); |
206 | 199 | ||
207 | /* init LCD phase 8 */ | 200 | /* init LCD phase 8 */ |
208 | epson_sendbyte(0, 0x76); | 201 | epson_sendbyte(0, 0x76); |
@@ -210,12 +203,12 @@ static void display_init(void) | |||
210 | epson_sendbyte(1, 0x00); | 203 | epson_sendbyte(1, 0x00); |
211 | epson_sendbyte(1, 0xDB); | 204 | epson_sendbyte(1, 0xDB); |
212 | epson_sendbyte(1, 0x00); | 205 | epson_sendbyte(1, 0x00); |
213 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 1); | 206 | gpio_set_value(_A_LCD_SSC_CS, 1); |
214 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 0); | 207 | gpio_set_value(_A_LCD_SSC_CS, 0); |
215 | 208 | ||
216 | /* init LCD phase 9 */ | 209 | /* init LCD phase 9 */ |
217 | epson_sendbyte(0, 0xAF); | 210 | epson_sendbyte(0, 0xAF); |
218 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 1); | 211 | gpio_set_value(_A_LCD_SSC_CS, 1); |
219 | } | 212 | } |
220 | 213 | ||
221 | static int sx1_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) | 214 | static int sx1_panel_init(struct lcd_panel *panel, struct omapfb_device *fbdev) |
@@ -231,18 +224,18 @@ static void sx1_panel_disable(struct lcd_panel *panel) | |||
231 | { | 224 | { |
232 | printk(KERN_INFO "SX1: LCD panel disable\n"); | 225 | printk(KERN_INFO "SX1: LCD panel disable\n"); |
233 | sx1_setmmipower(0); | 226 | sx1_setmmipower(0); |
234 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 1); | 227 | gpio_set_value(_A_LCD_SSC_CS, 1); |
235 | 228 | ||
236 | epson_sendbyte(0, 0x25); | 229 | epson_sendbyte(0, 0x25); |
237 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 0); | 230 | gpio_set_value(_A_LCD_SSC_CS, 0); |
238 | 231 | ||
239 | epson_sendbyte(0, 0xAE); | 232 | epson_sendbyte(0, 0xAE); |
240 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 1); | 233 | gpio_set_value(_A_LCD_SSC_CS, 1); |
241 | mdelay(100); | 234 | mdelay(100); |
242 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 0); | 235 | gpio_set_value(_A_LCD_SSC_CS, 0); |
243 | 236 | ||
244 | epson_sendbyte(0, 0x95); | 237 | epson_sendbyte(0, 0x95); |
245 | omap_set_gpio_dataout(_A_LCD_SSC_CS, 1); | 238 | gpio_set_value(_A_LCD_SSC_CS, 1); |
246 | } | 239 | } |
247 | 240 | ||
248 | static int sx1_panel_enable(struct lcd_panel *panel) | 241 | static int sx1_panel_enable(struct lcd_panel *panel) |
diff --git a/drivers/video/omap/lcdc.c b/drivers/video/omap/lcdc.c index 83514f066712..6e2ea7518761 100644 --- a/drivers/video/omap/lcdc.c +++ b/drivers/video/omap/lcdc.c | |||
@@ -34,6 +34,8 @@ | |||
34 | 34 | ||
35 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
36 | 36 | ||
37 | #include "lcdc.h" | ||
38 | |||
37 | #define MODULE_NAME "lcdc" | 39 | #define MODULE_NAME "lcdc" |
38 | 40 | ||
39 | #define OMAP_LCDC_BASE 0xfffec000 | 41 | #define OMAP_LCDC_BASE 0xfffec000 |
diff --git a/drivers/video/omap/lcdc.h b/drivers/video/omap/lcdc.h index adb731e5314a..845222270db3 100644 --- a/drivers/video/omap/lcdc.h +++ b/drivers/video/omap/lcdc.h | |||
@@ -4,4 +4,6 @@ | |||
4 | int omap_lcdc_set_dma_callback(void (*callback)(void *data), void *data); | 4 | int omap_lcdc_set_dma_callback(void (*callback)(void *data), void *data); |
5 | void omap_lcdc_free_dma_callback(void); | 5 | void omap_lcdc_free_dma_callback(void); |
6 | 6 | ||
7 | extern const struct lcd_ctrl omap1_int_ctrl; | ||
8 | |||
7 | #endif | 9 | #endif |
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c index 51a138bd113c..5a5e407dc45f 100644 --- a/drivers/video/omap/omapfb_main.c +++ b/drivers/video/omap/omapfb_main.c | |||
@@ -31,11 +31,14 @@ | |||
31 | #include <mach/dma.h> | 31 | #include <mach/dma.h> |
32 | #include <mach/omapfb.h> | 32 | #include <mach/omapfb.h> |
33 | 33 | ||
34 | #include "lcdc.h" | ||
35 | #include "dispc.h" | ||
36 | |||
34 | #define MODULE_NAME "omapfb" | 37 | #define MODULE_NAME "omapfb" |
35 | 38 | ||
36 | static unsigned int def_accel; | 39 | static unsigned int def_accel; |
37 | static unsigned long def_vram[OMAPFB_PLANE_NUM]; | 40 | static unsigned long def_vram[OMAPFB_PLANE_NUM]; |
38 | static int def_vram_cnt; | 41 | static unsigned int def_vram_cnt; |
39 | static unsigned long def_vxres; | 42 | static unsigned long def_vxres; |
40 | static unsigned long def_vyres; | 43 | static unsigned long def_vyres; |
41 | static unsigned int def_rotate; | 44 | static unsigned int def_rotate; |
@@ -84,12 +87,10 @@ static struct caps_table_struct color_caps[] = { | |||
84 | * LCD panel | 87 | * LCD panel |
85 | * --------------------------------------------------------------------------- | 88 | * --------------------------------------------------------------------------- |
86 | */ | 89 | */ |
87 | extern struct lcd_ctrl omap1_int_ctrl; | ||
88 | extern struct lcd_ctrl omap2_int_ctrl; | ||
89 | extern struct lcd_ctrl hwa742_ctrl; | 90 | extern struct lcd_ctrl hwa742_ctrl; |
90 | extern struct lcd_ctrl blizzard_ctrl; | 91 | extern struct lcd_ctrl blizzard_ctrl; |
91 | 92 | ||
92 | static struct lcd_ctrl *ctrls[] = { | 93 | static const struct lcd_ctrl *ctrls[] = { |
93 | #ifdef CONFIG_ARCH_OMAP1 | 94 | #ifdef CONFIG_ARCH_OMAP1 |
94 | &omap1_int_ctrl, | 95 | &omap1_int_ctrl, |
95 | #else | 96 | #else |
@@ -740,7 +741,7 @@ static int omapfb_update_win(struct fb_info *fbi, | |||
740 | int ret; | 741 | int ret; |
741 | 742 | ||
742 | omapfb_rqueue_lock(plane->fbdev); | 743 | omapfb_rqueue_lock(plane->fbdev); |
743 | ret = omapfb_update_window_async(fbi, win, NULL, 0); | 744 | ret = omapfb_update_window_async(fbi, win, NULL, NULL); |
744 | omapfb_rqueue_unlock(plane->fbdev); | 745 | omapfb_rqueue_unlock(plane->fbdev); |
745 | 746 | ||
746 | return ret; | 747 | return ret; |
@@ -768,7 +769,7 @@ static int omapfb_update_full_screen(struct fb_info *fbi) | |||
768 | win.format = 0; | 769 | win.format = 0; |
769 | 770 | ||
770 | omapfb_rqueue_lock(fbdev); | 771 | omapfb_rqueue_lock(fbdev); |
771 | r = fbdev->ctrl->update_window(fbi, &win, NULL, 0); | 772 | r = fbdev->ctrl->update_window(fbi, &win, NULL, NULL); |
772 | omapfb_rqueue_unlock(fbdev); | 773 | omapfb_rqueue_unlock(fbdev); |
773 | 774 | ||
774 | return r; | 775 | return r; |
@@ -1047,7 +1048,7 @@ void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval) | |||
1047 | win.height = 2; | 1048 | win.height = 2; |
1048 | win.out_width = 2; | 1049 | win.out_width = 2; |
1049 | win.out_height = 2; | 1050 | win.out_height = 2; |
1050 | fbdev->ctrl->update_window(fbdev->fb_info[0], &win, NULL, 0); | 1051 | fbdev->ctrl->update_window(fbdev->fb_info[0], &win, NULL, NULL); |
1051 | } | 1052 | } |
1052 | omapfb_rqueue_unlock(fbdev); | 1053 | omapfb_rqueue_unlock(fbdev); |
1053 | } | 1054 | } |
diff --git a/drivers/video/omap/rfbi.c b/drivers/video/omap/rfbi.c index 4a6f13d3facf..a13c8dcad2a8 100644 --- a/drivers/video/omap/rfbi.c +++ b/drivers/video/omap/rfbi.c | |||
@@ -59,7 +59,7 @@ | |||
59 | #define DISPC_CONTROL 0x0040 | 59 | #define DISPC_CONTROL 0x0040 |
60 | 60 | ||
61 | static struct { | 61 | static struct { |
62 | u32 base; | 62 | void __iomem *base; |
63 | void (*lcdc_callback)(void *data); | 63 | void (*lcdc_callback)(void *data); |
64 | void *lcdc_callback_data; | 64 | void *lcdc_callback_data; |
65 | unsigned long l4_khz; | 65 | unsigned long l4_khz; |
@@ -518,7 +518,11 @@ static int rfbi_init(struct omapfb_device *fbdev) | |||
518 | int r; | 518 | int r; |
519 | 519 | ||
520 | rfbi.fbdev = fbdev; | 520 | rfbi.fbdev = fbdev; |
521 | rfbi.base = io_p2v(RFBI_BASE); | 521 | rfbi.base = ioremap(RFBI_BASE, SZ_1K); |
522 | if (!rfbi.base) { | ||
523 | dev_err(fbdev->dev, "can't ioremap RFBI\n"); | ||
524 | return -ENOMEM; | ||
525 | } | ||
522 | 526 | ||
523 | if ((r = rfbi_get_clocks()) < 0) | 527 | if ((r = rfbi_get_clocks()) < 0) |
524 | return r; | 528 | return r; |
@@ -566,6 +570,7 @@ static void rfbi_cleanup(void) | |||
566 | { | 570 | { |
567 | omap_dispc_free_irq(); | 571 | omap_dispc_free_irq(); |
568 | rfbi_put_clocks(); | 572 | rfbi_put_clocks(); |
573 | iounmap(rfbi.base); | ||
569 | } | 574 | } |
570 | 575 | ||
571 | const struct lcd_ctrl_extif omap2_ext_if = { | 576 | const struct lcd_ctrl_extif omap2_ext_if = { |
diff --git a/drivers/video/omap/sossi.c b/drivers/video/omap/sossi.c index 6359353c2c67..a76946220249 100644 --- a/drivers/video/omap/sossi.c +++ b/drivers/video/omap/sossi.c | |||
@@ -574,7 +574,12 @@ static int sossi_init(struct omapfb_device *fbdev) | |||
574 | struct clk *dpll1out_ck; | 574 | struct clk *dpll1out_ck; |
575 | int r; | 575 | int r; |
576 | 576 | ||
577 | sossi.base = (void __iomem *)IO_ADDRESS(OMAP_SOSSI_BASE); | 577 | sossi.base = ioremap(OMAP_SOSSI_BASE, SZ_1K); |
578 | if (!sossi.base) { | ||
579 | dev_err(fbdev->dev, "can't ioremap SoSSI\n"); | ||
580 | return -ENOMEM; | ||
581 | } | ||
582 | |||
578 | sossi.fbdev = fbdev; | 583 | sossi.fbdev = fbdev; |
579 | spin_lock_init(&sossi.lock); | 584 | spin_lock_init(&sossi.lock); |
580 | 585 | ||
@@ -665,6 +670,7 @@ static void sossi_cleanup(void) | |||
665 | { | 670 | { |
666 | omap_lcdc_free_dma_callback(); | 671 | omap_lcdc_free_dma_callback(); |
667 | clk_put(sossi.fck); | 672 | clk_put(sossi.fck); |
673 | iounmap(sossi.base); | ||
668 | } | 674 | } |
669 | 675 | ||
670 | struct lcd_ctrl_extif omap1_ext_if = { | 676 | struct lcd_ctrl_extif omap1_ext_if = { |