diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-davinci/da830.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/da850.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/devices-da8xx.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-davinci/pm_domain.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-video.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rx51.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/display.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-ag5evm.c | 198 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-ap4evb.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-mackerel.c | 6 | ||||
-rw-r--r-- | arch/arm/plat-omap/fb.c | 5 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/vram.h | 43 | ||||
-rw-r--r-- | arch/sh/boards/mach-ap325rxa/setup.c | 6 | ||||
-rw-r--r-- | arch/sh/boards/mach-ecovec24/setup.c | 6 | ||||
-rw-r--r-- | arch/sh/boards/mach-kfr2r09/lcd_wqvga.c | 16 | ||||
-rw-r--r-- | arch/sh/boards/mach-kfr2r09/setup.c | 7 | ||||
-rw-r--r-- | arch/sh/include/mach-kfr2r09/mach/kfr2r09.h | 6 |
17 files changed, 134 insertions, 222 deletions
diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c index 510648e0394b..678a54a64dae 100644 --- a/arch/arm/mach-davinci/da830.c +++ b/arch/arm/mach-davinci/da830.c | |||
@@ -408,7 +408,7 @@ static struct clk_lookup da830_clks[] = { | |||
408 | CLK(NULL, "pwm2", &pwm2_clk), | 408 | CLK(NULL, "pwm2", &pwm2_clk), |
409 | CLK("eqep.0", NULL, &eqep0_clk), | 409 | CLK("eqep.0", NULL, &eqep0_clk), |
410 | CLK("eqep.1", NULL, &eqep1_clk), | 410 | CLK("eqep.1", NULL, &eqep1_clk), |
411 | CLK("da8xx_lcdc.0", NULL, &lcdc_clk), | 411 | CLK("da8xx_lcdc.0", "fck", &lcdc_clk), |
412 | CLK("davinci-mcasp.0", NULL, &mcasp0_clk), | 412 | CLK("davinci-mcasp.0", NULL, &mcasp0_clk), |
413 | CLK("davinci-mcasp.1", NULL, &mcasp1_clk), | 413 | CLK("davinci-mcasp.1", NULL, &mcasp1_clk), |
414 | CLK("davinci-mcasp.2", NULL, &mcasp2_clk), | 414 | CLK("davinci-mcasp.2", NULL, &mcasp2_clk), |
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 68c5fe01857c..6b9154e9f908 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c | |||
@@ -403,7 +403,7 @@ static struct clk_lookup da850_clks[] = { | |||
403 | CLK(NULL, "rmii", &rmii_clk), | 403 | CLK(NULL, "rmii", &rmii_clk), |
404 | CLK("davinci_emac.1", NULL, &emac_clk), | 404 | CLK("davinci_emac.1", NULL, &emac_clk), |
405 | CLK("davinci-mcasp.0", NULL, &mcasp_clk), | 405 | CLK("davinci-mcasp.0", NULL, &mcasp_clk), |
406 | CLK("da8xx_lcdc.0", NULL, &lcdc_clk), | 406 | CLK("da8xx_lcdc.0", "fck", &lcdc_clk), |
407 | CLK("davinci_mmc.0", NULL, &mmcsd0_clk), | 407 | CLK("davinci_mmc.0", NULL, &mmcsd0_clk), |
408 | CLK("davinci_mmc.1", NULL, &mmcsd1_clk), | 408 | CLK("davinci_mmc.1", NULL, &mmcsd1_clk), |
409 | CLK(NULL, "aemif", &aemif_clk), | 409 | CLK(NULL, "aemif", &aemif_clk), |
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index 46c9a0c09ae5..fcdbe437409e 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c | |||
@@ -589,29 +589,9 @@ int __init da8xx_register_uio_pruss(void) | |||
589 | return platform_device_register(&da8xx_uio_pruss_dev); | 589 | return platform_device_register(&da8xx_uio_pruss_dev); |
590 | } | 590 | } |
591 | 591 | ||
592 | static const struct display_panel disp_panel = { | ||
593 | QVGA, | ||
594 | 16, | ||
595 | 16, | ||
596 | COLOR_ACTIVE, | ||
597 | }; | ||
598 | |||
599 | static struct lcd_ctrl_config lcd_cfg = { | 592 | static struct lcd_ctrl_config lcd_cfg = { |
600 | &disp_panel, | 593 | .panel_shade = COLOR_ACTIVE, |
601 | .ac_bias = 255, | ||
602 | .ac_bias_intrpt = 0, | ||
603 | .dma_burst_sz = 16, | ||
604 | .bpp = 16, | 594 | .bpp = 16, |
605 | .fdd = 255, | ||
606 | .tft_alt_mode = 0, | ||
607 | .stn_565_mode = 0, | ||
608 | .mono_8bit_mode = 0, | ||
609 | .invert_line_clock = 1, | ||
610 | .invert_frm_clock = 1, | ||
611 | .sync_edge = 0, | ||
612 | .sync_ctrl = 1, | ||
613 | .raster_order = 0, | ||
614 | .fifo_th = 6, | ||
615 | }; | 595 | }; |
616 | 596 | ||
617 | struct da8xx_lcdc_platform_data sharp_lcd035q3dg01_pdata = { | 597 | struct da8xx_lcdc_platform_data sharp_lcd035q3dg01_pdata = { |
diff --git a/arch/arm/mach-davinci/pm_domain.c b/arch/arm/mach-davinci/pm_domain.c index 00946e23c1ee..c90250e3bef8 100644 --- a/arch/arm/mach-davinci/pm_domain.c +++ b/arch/arm/mach-davinci/pm_domain.c | |||
@@ -53,6 +53,7 @@ static struct dev_pm_domain davinci_pm_domain = { | |||
53 | 53 | ||
54 | static struct pm_clk_notifier_block platform_bus_notifier = { | 54 | static struct pm_clk_notifier_block platform_bus_notifier = { |
55 | .pm_domain = &davinci_pm_domain, | 55 | .pm_domain = &davinci_pm_domain, |
56 | .con_ids = { "fck", NULL, }, | ||
56 | }; | 57 | }; |
57 | 58 | ||
58 | static int __init davinci_pm_runtime_init(void) | 59 | static int __init davinci_pm_runtime_init(void) |
diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c index c22e111bcd00..46f4fc982766 100644 --- a/arch/arm/mach-omap2/board-rx51-video.c +++ b/arch/arm/mach-omap2/board-rx51-video.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
17 | #include <asm/mach-types.h> | 17 | #include <asm/mach-types.h> |
18 | #include <video/omapdss.h> | 18 | #include <video/omapdss.h> |
19 | #include <plat/vram.h> | ||
20 | #include <linux/platform_data/spi-omap2-mcspi.h> | 19 | #include <linux/platform_data/spi-omap2-mcspi.h> |
21 | 20 | ||
22 | #include "board-rx51.h" | 21 | #include "board-rx51.h" |
@@ -87,17 +86,4 @@ static int __init rx51_video_init(void) | |||
87 | } | 86 | } |
88 | 87 | ||
89 | subsys_initcall(rx51_video_init); | 88 | subsys_initcall(rx51_video_init); |
90 | |||
91 | void __init rx51_video_mem_init(void) | ||
92 | { | ||
93 | /* | ||
94 | * GFX 864x480x32bpp | ||
95 | * VID1/2 1280x720x32bpp double buffered | ||
96 | */ | ||
97 | omap_vram_set_sdram_vram(PAGE_ALIGN(864 * 480 * 4) + | ||
98 | 2 * PAGE_ALIGN(1280 * 720 * 4 * 2), 0); | ||
99 | } | ||
100 | |||
101 | #else | ||
102 | void __init rx51_video_mem_init(void) { } | ||
103 | #endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */ | 89 | #endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */ |
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index f1d6efe079ca..d0374ea2dfb0 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c | |||
@@ -34,8 +34,6 @@ | |||
34 | 34 | ||
35 | #define RX51_GPIO_SLEEP_IND 162 | 35 | #define RX51_GPIO_SLEEP_IND 162 |
36 | 36 | ||
37 | extern void rx51_video_mem_init(void); | ||
38 | |||
39 | static struct gpio_led gpio_leds[] = { | 37 | static struct gpio_led gpio_leds[] = { |
40 | { | 38 | { |
41 | .name = "sleep_ind", | 39 | .name = "sleep_ind", |
@@ -112,7 +110,6 @@ static void __init rx51_init(void) | |||
112 | 110 | ||
113 | static void __init rx51_reserve(void) | 111 | static void __init rx51_reserve(void) |
114 | { | 112 | { |
115 | rx51_video_mem_init(); | ||
116 | omap_reserve(); | 113 | omap_reserve(); |
117 | } | 114 | } |
118 | 115 | ||
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index 38ba58c97628..cc75aaf6e764 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c | |||
@@ -102,17 +102,20 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initconst = { | |||
102 | { "dss_hdmi", "omapdss_hdmi", -1 }, | 102 | { "dss_hdmi", "omapdss_hdmi", -1 }, |
103 | }; | 103 | }; |
104 | 104 | ||
105 | static void __init omap4_hdmi_mux_pads(enum omap_hdmi_flags flags) | 105 | static void __init omap4_tpd12s015_mux_pads(void) |
106 | { | 106 | { |
107 | u32 reg; | ||
108 | u16 control_i2c_1; | ||
109 | |||
110 | omap_mux_init_signal("hdmi_cec", | 107 | omap_mux_init_signal("hdmi_cec", |
111 | OMAP_PIN_INPUT_PULLUP); | 108 | OMAP_PIN_INPUT_PULLUP); |
112 | omap_mux_init_signal("hdmi_ddc_scl", | 109 | omap_mux_init_signal("hdmi_ddc_scl", |
113 | OMAP_PIN_INPUT_PULLUP); | 110 | OMAP_PIN_INPUT_PULLUP); |
114 | omap_mux_init_signal("hdmi_ddc_sda", | 111 | omap_mux_init_signal("hdmi_ddc_sda", |
115 | OMAP_PIN_INPUT_PULLUP); | 112 | OMAP_PIN_INPUT_PULLUP); |
113 | } | ||
114 | |||
115 | static void __init omap4_hdmi_mux_pads(enum omap_hdmi_flags flags) | ||
116 | { | ||
117 | u32 reg; | ||
118 | u16 control_i2c_1; | ||
116 | 119 | ||
117 | /* | 120 | /* |
118 | * CONTROL_I2C_1: HDMI_DDC_SDA_PULLUPRESX (bit 28) and | 121 | * CONTROL_I2C_1: HDMI_DDC_SDA_PULLUPRESX (bit 28) and |
@@ -163,8 +166,10 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes) | |||
163 | 166 | ||
164 | int __init omap_hdmi_init(enum omap_hdmi_flags flags) | 167 | int __init omap_hdmi_init(enum omap_hdmi_flags flags) |
165 | { | 168 | { |
166 | if (cpu_is_omap44xx()) | 169 | if (cpu_is_omap44xx()) { |
167 | omap4_hdmi_mux_pads(flags); | 170 | omap4_hdmi_mux_pads(flags); |
171 | omap4_tpd12s015_mux_pads(); | ||
172 | } | ||
168 | 173 | ||
169 | return 0; | 174 | return 0; |
170 | } | 175 | } |
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index 25eb88a923e6..032d10817e79 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c | |||
@@ -213,95 +213,6 @@ static struct platform_device irda_device = { | |||
213 | .num_resources = ARRAY_SIZE(irda_resources), | 213 | .num_resources = ARRAY_SIZE(irda_resources), |
214 | }; | 214 | }; |
215 | 215 | ||
216 | static unsigned char lcd_backlight_seq[3][2] = { | ||
217 | { 0x04, 0x07 }, | ||
218 | { 0x23, 0x80 }, | ||
219 | { 0x03, 0x01 }, | ||
220 | }; | ||
221 | |||
222 | static void lcd_backlight_on(void) | ||
223 | { | ||
224 | struct i2c_adapter *a; | ||
225 | struct i2c_msg msg; | ||
226 | int k; | ||
227 | |||
228 | a = i2c_get_adapter(1); | ||
229 | for (k = 0; a && k < 3; k++) { | ||
230 | msg.addr = 0x6d; | ||
231 | msg.buf = &lcd_backlight_seq[k][0]; | ||
232 | msg.len = 2; | ||
233 | msg.flags = 0; | ||
234 | if (i2c_transfer(a, &msg, 1) != 1) | ||
235 | break; | ||
236 | } | ||
237 | } | ||
238 | |||
239 | static void lcd_backlight_reset(void) | ||
240 | { | ||
241 | gpio_set_value(GPIO_PORT235, 0); | ||
242 | mdelay(24); | ||
243 | gpio_set_value(GPIO_PORT235, 1); | ||
244 | } | ||
245 | |||
246 | /* LCDC0 */ | ||
247 | static const struct fb_videomode lcdc0_modes[] = { | ||
248 | { | ||
249 | .name = "R63302(QHD)", | ||
250 | .xres = 544, | ||
251 | .yres = 961, | ||
252 | .left_margin = 72, | ||
253 | .right_margin = 600, | ||
254 | .hsync_len = 16, | ||
255 | .upper_margin = 8, | ||
256 | .lower_margin = 8, | ||
257 | .vsync_len = 2, | ||
258 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT, | ||
259 | }, | ||
260 | }; | ||
261 | |||
262 | static struct sh_mobile_lcdc_info lcdc0_info = { | ||
263 | .clock_source = LCDC_CLK_PERIPHERAL, | ||
264 | .ch[0] = { | ||
265 | .chan = LCDC_CHAN_MAINLCD, | ||
266 | .interface_type = RGB24, | ||
267 | .clock_divider = 1, | ||
268 | .flags = LCDC_FLAGS_DWPOL, | ||
269 | .fourcc = V4L2_PIX_FMT_RGB565, | ||
270 | .lcd_modes = lcdc0_modes, | ||
271 | .num_modes = ARRAY_SIZE(lcdc0_modes), | ||
272 | .panel_cfg = { | ||
273 | .width = 44, | ||
274 | .height = 79, | ||
275 | .display_on = lcd_backlight_on, | ||
276 | .display_off = lcd_backlight_reset, | ||
277 | }, | ||
278 | } | ||
279 | }; | ||
280 | |||
281 | static struct resource lcdc0_resources[] = { | ||
282 | [0] = { | ||
283 | .name = "LCDC0", | ||
284 | .start = 0xfe940000, /* P4-only space */ | ||
285 | .end = 0xfe943fff, | ||
286 | .flags = IORESOURCE_MEM, | ||
287 | }, | ||
288 | [1] = { | ||
289 | .start = intcs_evt2irq(0x580), | ||
290 | .flags = IORESOURCE_IRQ, | ||
291 | }, | ||
292 | }; | ||
293 | |||
294 | static struct platform_device lcdc0_device = { | ||
295 | .name = "sh_mobile_lcdc_fb", | ||
296 | .num_resources = ARRAY_SIZE(lcdc0_resources), | ||
297 | .resource = lcdc0_resources, | ||
298 | .id = 0, | ||
299 | .dev = { | ||
300 | .platform_data = &lcdc0_info, | ||
301 | .coherent_dma_mask = ~0, | ||
302 | }, | ||
303 | }; | ||
304 | |||
305 | /* MIPI-DSI */ | 216 | /* MIPI-DSI */ |
306 | static struct resource mipidsi0_resources[] = { | 217 | static struct resource mipidsi0_resources[] = { |
307 | [0] = { | 218 | [0] = { |
@@ -358,7 +269,7 @@ sh_mipi_set_dot_clock_pck_err: | |||
358 | 269 | ||
359 | static struct sh_mipi_dsi_info mipidsi0_info = { | 270 | static struct sh_mipi_dsi_info mipidsi0_info = { |
360 | .data_format = MIPI_RGB888, | 271 | .data_format = MIPI_RGB888, |
361 | .lcd_chan = &lcdc0_info.ch[0], | 272 | .channel = LCDC_CHAN_MAINLCD, |
362 | .lane = 2, | 273 | .lane = 2, |
363 | .vsynw_offset = 20, | 274 | .vsynw_offset = 20, |
364 | .clksrc = 1, | 275 | .clksrc = 1, |
@@ -378,6 +289,109 @@ static struct platform_device mipidsi0_device = { | |||
378 | }, | 289 | }, |
379 | }; | 290 | }; |
380 | 291 | ||
292 | static unsigned char lcd_backlight_seq[3][2] = { | ||
293 | { 0x04, 0x07 }, | ||
294 | { 0x23, 0x80 }, | ||
295 | { 0x03, 0x01 }, | ||
296 | }; | ||
297 | |||
298 | static int lcd_backlight_set_brightness(int brightness) | ||
299 | { | ||
300 | struct i2c_adapter *adap; | ||
301 | struct i2c_msg msg; | ||
302 | unsigned int i; | ||
303 | int ret; | ||
304 | |||
305 | if (brightness == 0) { | ||
306 | /* Reset the chip */ | ||
307 | gpio_set_value(GPIO_PORT235, 0); | ||
308 | mdelay(24); | ||
309 | gpio_set_value(GPIO_PORT235, 1); | ||
310 | return 0; | ||
311 | } | ||
312 | |||
313 | adap = i2c_get_adapter(1); | ||
314 | if (adap == NULL) | ||
315 | return -ENODEV; | ||
316 | |||
317 | for (i = 0; i < ARRAY_SIZE(lcd_backlight_seq); i++) { | ||
318 | msg.addr = 0x6d; | ||
319 | msg.buf = &lcd_backlight_seq[i][0]; | ||
320 | msg.len = 2; | ||
321 | msg.flags = 0; | ||
322 | |||
323 | ret = i2c_transfer(adap, &msg, 1); | ||
324 | if (ret < 0) | ||
325 | break; | ||
326 | } | ||
327 | |||
328 | i2c_put_adapter(adap); | ||
329 | return ret < 0 ? ret : 0; | ||
330 | } | ||
331 | |||
332 | /* LCDC0 */ | ||
333 | static const struct fb_videomode lcdc0_modes[] = { | ||
334 | { | ||
335 | .name = "R63302(QHD)", | ||
336 | .xres = 544, | ||
337 | .yres = 961, | ||
338 | .left_margin = 72, | ||
339 | .right_margin = 600, | ||
340 | .hsync_len = 16, | ||
341 | .upper_margin = 8, | ||
342 | .lower_margin = 8, | ||
343 | .vsync_len = 2, | ||
344 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT, | ||
345 | }, | ||
346 | }; | ||
347 | |||
348 | static struct sh_mobile_lcdc_info lcdc0_info = { | ||
349 | .clock_source = LCDC_CLK_PERIPHERAL, | ||
350 | .ch[0] = { | ||
351 | .chan = LCDC_CHAN_MAINLCD, | ||
352 | .interface_type = RGB24, | ||
353 | .clock_divider = 1, | ||
354 | .flags = LCDC_FLAGS_DWPOL, | ||
355 | .fourcc = V4L2_PIX_FMT_RGB565, | ||
356 | .lcd_modes = lcdc0_modes, | ||
357 | .num_modes = ARRAY_SIZE(lcdc0_modes), | ||
358 | .panel_cfg = { | ||
359 | .width = 44, | ||
360 | .height = 79, | ||
361 | }, | ||
362 | .bl_info = { | ||
363 | .name = "sh_mobile_lcdc_bl", | ||
364 | .max_brightness = 1, | ||
365 | .set_brightness = lcd_backlight_set_brightness, | ||
366 | }, | ||
367 | .tx_dev = &mipidsi0_device, | ||
368 | } | ||
369 | }; | ||
370 | |||
371 | static struct resource lcdc0_resources[] = { | ||
372 | [0] = { | ||
373 | .name = "LCDC0", | ||
374 | .start = 0xfe940000, /* P4-only space */ | ||
375 | .end = 0xfe943fff, | ||
376 | .flags = IORESOURCE_MEM, | ||
377 | }, | ||
378 | [1] = { | ||
379 | .start = intcs_evt2irq(0x580), | ||
380 | .flags = IORESOURCE_IRQ, | ||
381 | }, | ||
382 | }; | ||
383 | |||
384 | static struct platform_device lcdc0_device = { | ||
385 | .name = "sh_mobile_lcdc_fb", | ||
386 | .num_resources = ARRAY_SIZE(lcdc0_resources), | ||
387 | .resource = lcdc0_resources, | ||
388 | .id = 0, | ||
389 | .dev = { | ||
390 | .platform_data = &lcdc0_info, | ||
391 | .coherent_dma_mask = ~0, | ||
392 | }, | ||
393 | }; | ||
394 | |||
381 | /* Fixed 2.8V regulators to be used by SDHI0 */ | 395 | /* Fixed 2.8V regulators to be used by SDHI0 */ |
382 | static struct regulator_consumer_supply fixed2v8_power_consumers[] = | 396 | static struct regulator_consumer_supply fixed2v8_power_consumers[] = |
383 | { | 397 | { |
@@ -531,8 +545,8 @@ static struct platform_device *ag5evm_devices[] __initdata = { | |||
531 | &fsi_device, | 545 | &fsi_device, |
532 | &mmc_device, | 546 | &mmc_device, |
533 | &irda_device, | 547 | &irda_device, |
534 | &lcdc0_device, | ||
535 | &mipidsi0_device, | 548 | &mipidsi0_device, |
549 | &lcdc0_device, | ||
536 | &sdhi0_device, | 550 | &sdhi0_device, |
537 | &sdhi1_device, | 551 | &sdhi1_device, |
538 | }; | 552 | }; |
@@ -621,7 +635,7 @@ static void __init ag5evm_init(void) | |||
621 | /* LCD backlight controller */ | 635 | /* LCD backlight controller */ |
622 | gpio_request(GPIO_PORT235, NULL); /* RESET */ | 636 | gpio_request(GPIO_PORT235, NULL); /* RESET */ |
623 | gpio_direction_output(GPIO_PORT235, 0); | 637 | gpio_direction_output(GPIO_PORT235, 0); |
624 | lcd_backlight_reset(); | 638 | lcd_backlight_set_brightness(0); |
625 | 639 | ||
626 | /* enable SDHI0 on CN15 [SD I/F] */ | 640 | /* enable SDHI0 on CN15 [SD I/F] */ |
627 | gpio_request(GPIO_FN_SDHIWP0, NULL); | 641 | gpio_request(GPIO_FN_SDHIWP0, NULL); |
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 40657854e3ad..99ef190d0909 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -552,11 +552,9 @@ static struct resource mipidsi0_resources[] = { | |||
552 | }, | 552 | }, |
553 | }; | 553 | }; |
554 | 554 | ||
555 | static struct sh_mobile_lcdc_info lcdc_info; | ||
556 | |||
557 | static struct sh_mipi_dsi_info mipidsi0_info = { | 555 | static struct sh_mipi_dsi_info mipidsi0_info = { |
558 | .data_format = MIPI_RGB888, | 556 | .data_format = MIPI_RGB888, |
559 | .lcd_chan = &lcdc_info.ch[0], | 557 | .channel = LCDC_CHAN_MAINLCD, |
560 | .lane = 2, | 558 | .lane = 2, |
561 | .vsynw_offset = 17, | 559 | .vsynw_offset = 17, |
562 | .phyctrl = 0x6 << 8, | 560 | .phyctrl = 0x6 << 8, |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 3f56e70795b7..2fed62f66045 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -370,11 +370,6 @@ static int mackerel_set_brightness(int brightness) | |||
370 | return 0; | 370 | return 0; |
371 | } | 371 | } |
372 | 372 | ||
373 | static int mackerel_get_brightness(void) | ||
374 | { | ||
375 | return gpio_get_value(GPIO_PORT31); | ||
376 | } | ||
377 | |||
378 | static const struct sh_mobile_meram_cfg lcd_meram_cfg = { | 373 | static const struct sh_mobile_meram_cfg lcd_meram_cfg = { |
379 | .icb[0] = { | 374 | .icb[0] = { |
380 | .meram_size = 0x40, | 375 | .meram_size = 0x40, |
@@ -403,7 +398,6 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
403 | .name = "sh_mobile_lcdc_bl", | 398 | .name = "sh_mobile_lcdc_bl", |
404 | .max_brightness = 1, | 399 | .max_brightness = 1, |
405 | .set_brightness = mackerel_set_brightness, | 400 | .set_brightness = mackerel_set_brightness, |
406 | .get_brightness = mackerel_get_brightness, | ||
407 | }, | 401 | }, |
408 | .meram_cfg = &lcd_meram_cfg, | 402 | .meram_cfg = &lcd_meram_cfg, |
409 | } | 403 | } |
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c index 3a77b30f53d4..a3367b783fc7 100644 --- a/arch/arm/plat-omap/fb.c +++ b/arch/arm/plat-omap/fb.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/memblock.h> | 29 | #include <linux/memblock.h> |
30 | #include <linux/io.h> | 30 | #include <linux/io.h> |
31 | #include <linux/omapfb.h> | 31 | #include <linux/omapfb.h> |
32 | #include <linux/dma-mapping.h> | ||
32 | 33 | ||
33 | #include <asm/mach/map.h> | 34 | #include <asm/mach/map.h> |
34 | 35 | ||
@@ -105,7 +106,7 @@ static struct platform_device omap_fb_device = { | |||
105 | .id = -1, | 106 | .id = -1, |
106 | .dev = { | 107 | .dev = { |
107 | .dma_mask = &omap_fb_dma_mask, | 108 | .dma_mask = &omap_fb_dma_mask, |
108 | .coherent_dma_mask = ~(u32)0, | 109 | .coherent_dma_mask = DMA_BIT_MASK(32), |
109 | .platform_data = &omapfb_config, | 110 | .platform_data = &omapfb_config, |
110 | }, | 111 | }, |
111 | .num_resources = 0, | 112 | .num_resources = 0, |
@@ -141,7 +142,7 @@ static struct platform_device omap_fb_device = { | |||
141 | .id = -1, | 142 | .id = -1, |
142 | .dev = { | 143 | .dev = { |
143 | .dma_mask = &omap_fb_dma_mask, | 144 | .dma_mask = &omap_fb_dma_mask, |
144 | .coherent_dma_mask = ~(u32)0, | 145 | .coherent_dma_mask = DMA_BIT_MASK(32), |
145 | .platform_data = &omapfb_config, | 146 | .platform_data = &omapfb_config, |
146 | }, | 147 | }, |
147 | .num_resources = 0, | 148 | .num_resources = 0, |
diff --git a/arch/arm/plat-omap/include/plat/vram.h b/arch/arm/plat-omap/include/plat/vram.h deleted file mode 100644 index 4d65b7d06e6c..000000000000 --- a/arch/arm/plat-omap/include/plat/vram.h +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /* | ||
2 | * VRAM manager for OMAP | ||
3 | * | ||
4 | * Copyright (C) 2009 Nokia Corporation | ||
5 | * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef __OMAP_VRAM_H__ | ||
22 | #define __OMAP_VRAM_H__ | ||
23 | |||
24 | #include <linux/types.h> | ||
25 | |||
26 | extern int omap_vram_add_region(unsigned long paddr, size_t size); | ||
27 | extern int omap_vram_free(unsigned long paddr, size_t size); | ||
28 | extern int omap_vram_alloc(size_t size, unsigned long *paddr); | ||
29 | extern int omap_vram_reserve(unsigned long paddr, size_t size); | ||
30 | extern void omap_vram_get_info(unsigned long *vram, unsigned long *free_vram, | ||
31 | unsigned long *largest_free_block); | ||
32 | |||
33 | #ifdef CONFIG_OMAP2_VRAM | ||
34 | extern void omap_vram_set_sdram_vram(u32 size, u32 start); | ||
35 | |||
36 | extern void omap_vram_reserve_sdram_memblock(void); | ||
37 | #else | ||
38 | static inline void omap_vram_set_sdram_vram(u32 size, u32 start) { } | ||
39 | |||
40 | static inline void omap_vram_reserve_sdram_memblock(void) { } | ||
41 | #endif | ||
42 | |||
43 | #endif | ||
diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c index 9e963c1d1447..5620e33c18a0 100644 --- a/arch/sh/boards/mach-ap325rxa/setup.c +++ b/arch/sh/boards/mach-ap325rxa/setup.c | |||
@@ -179,11 +179,6 @@ static int ap320_wvga_set_brightness(int brightness) | |||
179 | return 0; | 179 | return 0; |
180 | } | 180 | } |
181 | 181 | ||
182 | static int ap320_wvga_get_brightness(void) | ||
183 | { | ||
184 | return gpio_get_value(GPIO_PTS3); | ||
185 | } | ||
186 | |||
187 | static void ap320_wvga_power_on(void) | 182 | static void ap320_wvga_power_on(void) |
188 | { | 183 | { |
189 | msleep(100); | 184 | msleep(100); |
@@ -232,7 +227,6 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
232 | .name = "sh_mobile_lcdc_bl", | 227 | .name = "sh_mobile_lcdc_bl", |
233 | .max_brightness = 1, | 228 | .max_brightness = 1, |
234 | .set_brightness = ap320_wvga_set_brightness, | 229 | .set_brightness = ap320_wvga_set_brightness, |
235 | .get_brightness = ap320_wvga_get_brightness, | ||
236 | }, | 230 | }, |
237 | } | 231 | } |
238 | }; | 232 | }; |
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 64559e8af14b..3fede4556c91 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -329,11 +329,6 @@ static int ecovec24_set_brightness(int brightness) | |||
329 | return 0; | 329 | return 0; |
330 | } | 330 | } |
331 | 331 | ||
332 | static int ecovec24_get_brightness(void) | ||
333 | { | ||
334 | return gpio_get_value(GPIO_PTR1); | ||
335 | } | ||
336 | |||
337 | static struct sh_mobile_lcdc_info lcdc_info = { | 332 | static struct sh_mobile_lcdc_info lcdc_info = { |
338 | .ch[0] = { | 333 | .ch[0] = { |
339 | .interface_type = RGB18, | 334 | .interface_type = RGB18, |
@@ -347,7 +342,6 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
347 | .name = "sh_mobile_lcdc_bl", | 342 | .name = "sh_mobile_lcdc_bl", |
348 | .max_brightness = 1, | 343 | .max_brightness = 1, |
349 | .set_brightness = ecovec24_set_brightness, | 344 | .set_brightness = ecovec24_set_brightness, |
350 | .get_brightness = ecovec24_get_brightness, | ||
351 | }, | 345 | }, |
352 | } | 346 | } |
353 | }; | 347 | }; |
diff --git a/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c b/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c index c148b36ecb65..c62050332629 100644 --- a/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c +++ b/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c | |||
@@ -283,7 +283,7 @@ void kfr2r09_lcd_start(void *sohandle, struct sh_mobile_lcdc_sys_bus_ops *so) | |||
283 | #define MAIN_MLED4 0x40 | 283 | #define MAIN_MLED4 0x40 |
284 | #define MAIN_MSW 0x80 | 284 | #define MAIN_MSW 0x80 |
285 | 285 | ||
286 | static int kfr2r09_lcd_backlight(int on) | 286 | int kfr2r09_lcd_set_brightness(int brightness) |
287 | { | 287 | { |
288 | struct i2c_adapter *a; | 288 | struct i2c_adapter *a; |
289 | struct i2c_msg msg; | 289 | struct i2c_msg msg; |
@@ -295,7 +295,7 @@ static int kfr2r09_lcd_backlight(int on) | |||
295 | return -ENODEV; | 295 | return -ENODEV; |
296 | 296 | ||
297 | buf[0] = 0x00; | 297 | buf[0] = 0x00; |
298 | if (on) | 298 | if (brightness) |
299 | buf[1] = CTRL_CPSW | CTRL_C10 | CTRL_CKSW; | 299 | buf[1] = CTRL_CPSW | CTRL_C10 | CTRL_CKSW; |
300 | else | 300 | else |
301 | buf[1] = 0; | 301 | buf[1] = 0; |
@@ -309,7 +309,7 @@ static int kfr2r09_lcd_backlight(int on) | |||
309 | return -ENODEV; | 309 | return -ENODEV; |
310 | 310 | ||
311 | buf[0] = 0x01; | 311 | buf[0] = 0x01; |
312 | if (on) | 312 | if (brightness) |
313 | buf[1] = MAIN_MSW | MAIN_MLED4 | 0x0c; | 313 | buf[1] = MAIN_MSW | MAIN_MLED4 | 0x0c; |
314 | else | 314 | else |
315 | buf[1] = 0; | 315 | buf[1] = 0; |
@@ -324,13 +324,3 @@ static int kfr2r09_lcd_backlight(int on) | |||
324 | 324 | ||
325 | return 0; | 325 | return 0; |
326 | } | 326 | } |
327 | |||
328 | void kfr2r09_lcd_on(void) | ||
329 | { | ||
330 | kfr2r09_lcd_backlight(1); | ||
331 | } | ||
332 | |||
333 | void kfr2r09_lcd_off(void) | ||
334 | { | ||
335 | kfr2r09_lcd_backlight(0); | ||
336 | } | ||
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c index f2a4304fbe23..ab502f12ef57 100644 --- a/arch/sh/boards/mach-kfr2r09/setup.c +++ b/arch/sh/boards/mach-kfr2r09/setup.c | |||
@@ -158,8 +158,11 @@ static struct sh_mobile_lcdc_info kfr2r09_sh_lcdc_info = { | |||
158 | .height = 58, | 158 | .height = 58, |
159 | .setup_sys = kfr2r09_lcd_setup, | 159 | .setup_sys = kfr2r09_lcd_setup, |
160 | .start_transfer = kfr2r09_lcd_start, | 160 | .start_transfer = kfr2r09_lcd_start, |
161 | .display_on = kfr2r09_lcd_on, | 161 | }, |
162 | .display_off = kfr2r09_lcd_off, | 162 | .bl_info = { |
163 | .name = "sh_mobile_lcdc_bl", | ||
164 | .max_brightness = 1, | ||
165 | .set_brightness = kfr2r09_lcd_set_brightness, | ||
163 | }, | 166 | }, |
164 | .sys_bus_cfg = { | 167 | .sys_bus_cfg = { |
165 | .ldmt2r = 0x07010904, | 168 | .ldmt2r = 0x07010904, |
diff --git a/arch/sh/include/mach-kfr2r09/mach/kfr2r09.h b/arch/sh/include/mach-kfr2r09/mach/kfr2r09.h index ba3d93d333f8..c20c9e5f5eab 100644 --- a/arch/sh/include/mach-kfr2r09/mach/kfr2r09.h +++ b/arch/sh/include/mach-kfr2r09/mach/kfr2r09.h | |||
@@ -4,15 +4,13 @@ | |||
4 | #include <video/sh_mobile_lcdc.h> | 4 | #include <video/sh_mobile_lcdc.h> |
5 | 5 | ||
6 | #if defined(CONFIG_FB_SH_MOBILE_LCDC) || defined(CONFIG_FB_SH_MOBILE_LCDC_MODULE) | 6 | #if defined(CONFIG_FB_SH_MOBILE_LCDC) || defined(CONFIG_FB_SH_MOBILE_LCDC_MODULE) |
7 | void kfr2r09_lcd_on(void); | 7 | int kfr2r09_lcd_set_brightness(int brightness); |
8 | void kfr2r09_lcd_off(void); | ||
9 | int kfr2r09_lcd_setup(void *sys_ops_handle, | 8 | int kfr2r09_lcd_setup(void *sys_ops_handle, |
10 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops); | 9 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops); |
11 | void kfr2r09_lcd_start(void *sys_ops_handle, | 10 | void kfr2r09_lcd_start(void *sys_ops_handle, |
12 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops); | 11 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops); |
13 | #else | 12 | #else |
14 | static void kfr2r09_lcd_on(void) {} | 13 | static int kfr2r09_lcd_set_brightness(int brightness) {} |
15 | static void kfr2r09_lcd_off(void) {} | ||
16 | static int kfr2r09_lcd_setup(void *sys_ops_handle, | 14 | static int kfr2r09_lcd_setup(void *sys_ops_handle, |
17 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops) | 15 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops) |
18 | { | 16 | { |