diff options
-rw-r--r-- | arch/arm/mach-shmobile/board-ap4evb.c | 56 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-mackerel.c | 58 |
2 files changed, 114 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 08acb6ec8139..f6b687f61c28 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -249,6 +249,29 @@ static int slot_cn7_get_cd(struct platform_device *pdev) | |||
249 | { | 249 | { |
250 | return !gpio_get_value(GPIO_PORT41); | 250 | return !gpio_get_value(GPIO_PORT41); |
251 | } | 251 | } |
252 | /* MERAM */ | ||
253 | static struct sh_mobile_meram_info meram_info = { | ||
254 | .addr_mode = SH_MOBILE_MERAM_MODE1, | ||
255 | }; | ||
256 | |||
257 | static struct resource meram_resources[] = { | ||
258 | [0] = { | ||
259 | .name = "MERAM", | ||
260 | .start = 0xe8000000, | ||
261 | .end = 0xe81fffff, | ||
262 | .flags = IORESOURCE_MEM, | ||
263 | }, | ||
264 | }; | ||
265 | |||
266 | static struct platform_device meram_device = { | ||
267 | .name = "sh_mobile_meram", | ||
268 | .id = 0, | ||
269 | .num_resources = ARRAY_SIZE(meram_resources), | ||
270 | .resource = meram_resources, | ||
271 | .dev = { | ||
272 | .platform_data = &meram_info, | ||
273 | }, | ||
274 | }; | ||
252 | 275 | ||
253 | /* SH_MMCIF */ | 276 | /* SH_MMCIF */ |
254 | static struct resource sh_mmcif_resources[] = { | 277 | static struct resource sh_mmcif_resources[] = { |
@@ -447,13 +470,29 @@ const static struct fb_videomode ap4evb_lcdc_modes[] = { | |||
447 | #endif | 470 | #endif |
448 | }, | 471 | }, |
449 | }; | 472 | }; |
473 | static struct sh_mobile_meram_cfg lcd_meram_cfg = { | ||
474 | .icb[0] = { | ||
475 | .marker_icb = 28, | ||
476 | .cache_icb = 24, | ||
477 | .meram_offset = 0x0, | ||
478 | .meram_size = 0x40, | ||
479 | }, | ||
480 | .icb[1] = { | ||
481 | .marker_icb = 29, | ||
482 | .cache_icb = 25, | ||
483 | .meram_offset = 0x40, | ||
484 | .meram_size = 0x40, | ||
485 | }, | ||
486 | }; | ||
450 | 487 | ||
451 | static struct sh_mobile_lcdc_info lcdc_info = { | 488 | static struct sh_mobile_lcdc_info lcdc_info = { |
489 | .meram_dev = &meram_info, | ||
452 | .ch[0] = { | 490 | .ch[0] = { |
453 | .chan = LCDC_CHAN_MAINLCD, | 491 | .chan = LCDC_CHAN_MAINLCD, |
454 | .bpp = 16, | 492 | .bpp = 16, |
455 | .lcd_cfg = ap4evb_lcdc_modes, | 493 | .lcd_cfg = ap4evb_lcdc_modes, |
456 | .num_cfg = ARRAY_SIZE(ap4evb_lcdc_modes), | 494 | .num_cfg = ARRAY_SIZE(ap4evb_lcdc_modes), |
495 | .meram_cfg = &lcd_meram_cfg, | ||
457 | } | 496 | } |
458 | }; | 497 | }; |
459 | 498 | ||
@@ -724,15 +763,31 @@ static struct platform_device fsi_device = { | |||
724 | static struct platform_device fsi_ak4643_device = { | 763 | static struct platform_device fsi_ak4643_device = { |
725 | .name = "sh_fsi2_a_ak4643", | 764 | .name = "sh_fsi2_a_ak4643", |
726 | }; | 765 | }; |
766 | static struct sh_mobile_meram_cfg hdmi_meram_cfg = { | ||
767 | .icb[0] = { | ||
768 | .marker_icb = 30, | ||
769 | .cache_icb = 26, | ||
770 | .meram_offset = 0x80, | ||
771 | .meram_size = 0x100, | ||
772 | }, | ||
773 | .icb[1] = { | ||
774 | .marker_icb = 31, | ||
775 | .cache_icb = 27, | ||
776 | .meram_offset = 0x180, | ||
777 | .meram_size = 0x100, | ||
778 | }, | ||
779 | }; | ||
727 | 780 | ||
728 | static struct sh_mobile_lcdc_info sh_mobile_lcdc1_info = { | 781 | static struct sh_mobile_lcdc_info sh_mobile_lcdc1_info = { |
729 | .clock_source = LCDC_CLK_EXTERNAL, | 782 | .clock_source = LCDC_CLK_EXTERNAL, |
783 | .meram_dev = &meram_info, | ||
730 | .ch[0] = { | 784 | .ch[0] = { |
731 | .chan = LCDC_CHAN_MAINLCD, | 785 | .chan = LCDC_CHAN_MAINLCD, |
732 | .bpp = 16, | 786 | .bpp = 16, |
733 | .interface_type = RGB24, | 787 | .interface_type = RGB24, |
734 | .clock_divider = 1, | 788 | .clock_divider = 1, |
735 | .flags = LCDC_FLAGS_DWPOL, | 789 | .flags = LCDC_FLAGS_DWPOL, |
790 | .meram_cfg = &hdmi_meram_cfg, | ||
736 | } | 791 | } |
737 | }; | 792 | }; |
738 | 793 | ||
@@ -961,6 +1016,7 @@ static struct platform_device *ap4evb_devices[] __initdata = { | |||
961 | &csi2_device, | 1016 | &csi2_device, |
962 | &ceu_device, | 1017 | &ceu_device, |
963 | &ap4evb_camera, | 1018 | &ap4evb_camera, |
1019 | &meram_device, | ||
964 | }; | 1020 | }; |
965 | 1021 | ||
966 | static void __init hdmi_init_pm_clock(void) | 1022 | static void __init hdmi_init_pm_clock(void) |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index 448ddbe43335..d4fe74067d6c 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -314,6 +314,30 @@ static struct platform_device smc911x_device = { | |||
314 | }, | 314 | }, |
315 | }; | 315 | }; |
316 | 316 | ||
317 | /* MERAM */ | ||
318 | static struct sh_mobile_meram_info mackerel_meram_info = { | ||
319 | .addr_mode = SH_MOBILE_MERAM_MODE1, | ||
320 | }; | ||
321 | |||
322 | static struct resource meram_resources[] = { | ||
323 | [0] = { | ||
324 | .name = "MERAM", | ||
325 | .start = 0xe8000000, | ||
326 | .end = 0xe81fffff, | ||
327 | .flags = IORESOURCE_MEM, | ||
328 | }, | ||
329 | }; | ||
330 | |||
331 | static struct platform_device meram_device = { | ||
332 | .name = "sh_mobile_meram", | ||
333 | .id = 0, | ||
334 | .num_resources = ARRAY_SIZE(meram_resources), | ||
335 | .resource = meram_resources, | ||
336 | .dev = { | ||
337 | .platform_data = &mackerel_meram_info, | ||
338 | }, | ||
339 | }; | ||
340 | |||
317 | /* LCDC */ | 341 | /* LCDC */ |
318 | static struct fb_videomode mackerel_lcdc_modes[] = { | 342 | static struct fb_videomode mackerel_lcdc_modes[] = { |
319 | { | 343 | { |
@@ -342,7 +366,23 @@ static int mackerel_get_brightness(void *board_data) | |||
342 | return gpio_get_value(GPIO_PORT31); | 366 | return gpio_get_value(GPIO_PORT31); |
343 | } | 367 | } |
344 | 368 | ||
369 | static struct sh_mobile_meram_cfg lcd_meram_cfg = { | ||
370 | .icb[0] = { | ||
371 | .marker_icb = 28, | ||
372 | .cache_icb = 24, | ||
373 | .meram_offset = 0x0, | ||
374 | .meram_size = 0x40, | ||
375 | }, | ||
376 | .icb[1] = { | ||
377 | .marker_icb = 29, | ||
378 | .cache_icb = 25, | ||
379 | .meram_offset = 0x40, | ||
380 | .meram_size = 0x40, | ||
381 | }, | ||
382 | }; | ||
383 | |||
345 | static struct sh_mobile_lcdc_info lcdc_info = { | 384 | static struct sh_mobile_lcdc_info lcdc_info = { |
385 | .meram_dev = &mackerel_meram_info, | ||
346 | .clock_source = LCDC_CLK_BUS, | 386 | .clock_source = LCDC_CLK_BUS, |
347 | .ch[0] = { | 387 | .ch[0] = { |
348 | .chan = LCDC_CHAN_MAINLCD, | 388 | .chan = LCDC_CHAN_MAINLCD, |
@@ -362,6 +402,7 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
362 | .name = "sh_mobile_lcdc_bl", | 402 | .name = "sh_mobile_lcdc_bl", |
363 | .max_brightness = 1, | 403 | .max_brightness = 1, |
364 | }, | 404 | }, |
405 | .meram_cfg = &lcd_meram_cfg, | ||
365 | } | 406 | } |
366 | }; | 407 | }; |
367 | 408 | ||
@@ -388,8 +429,23 @@ static struct platform_device lcdc_device = { | |||
388 | }, | 429 | }, |
389 | }; | 430 | }; |
390 | 431 | ||
432 | static struct sh_mobile_meram_cfg hdmi_meram_cfg = { | ||
433 | .icb[0] = { | ||
434 | .marker_icb = 30, | ||
435 | .cache_icb = 26, | ||
436 | .meram_offset = 0x80, | ||
437 | .meram_size = 0x100, | ||
438 | }, | ||
439 | .icb[1] = { | ||
440 | .marker_icb = 31, | ||
441 | .cache_icb = 27, | ||
442 | .meram_offset = 0x180, | ||
443 | .meram_size = 0x100, | ||
444 | }, | ||
445 | }; | ||
391 | /* HDMI */ | 446 | /* HDMI */ |
392 | static struct sh_mobile_lcdc_info hdmi_lcdc_info = { | 447 | static struct sh_mobile_lcdc_info hdmi_lcdc_info = { |
448 | .meram_dev = &mackerel_meram_info, | ||
393 | .clock_source = LCDC_CLK_EXTERNAL, | 449 | .clock_source = LCDC_CLK_EXTERNAL, |
394 | .ch[0] = { | 450 | .ch[0] = { |
395 | .chan = LCDC_CHAN_MAINLCD, | 451 | .chan = LCDC_CHAN_MAINLCD, |
@@ -397,6 +453,7 @@ static struct sh_mobile_lcdc_info hdmi_lcdc_info = { | |||
397 | .interface_type = RGB24, | 453 | .interface_type = RGB24, |
398 | .clock_divider = 1, | 454 | .clock_divider = 1, |
399 | .flags = LCDC_FLAGS_DWPOL, | 455 | .flags = LCDC_FLAGS_DWPOL, |
456 | .meram_cfg = &hdmi_meram_cfg, | ||
400 | } | 457 | } |
401 | }; | 458 | }; |
402 | 459 | ||
@@ -1150,6 +1207,7 @@ static struct platform_device *mackerel_devices[] __initdata = { | |||
1150 | &mackerel_camera, | 1207 | &mackerel_camera, |
1151 | &hdmi_lcdc_device, | 1208 | &hdmi_lcdc_device, |
1152 | &hdmi_device, | 1209 | &hdmi_device, |
1210 | &meram_device, | ||
1153 | }; | 1211 | }; |
1154 | 1212 | ||
1155 | /* Keypad Initialization */ | 1213 | /* Keypad Initialization */ |