aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c56
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c58
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 1e35fa976d64..c9aad5eefccc 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 */
253static struct sh_mobile_meram_info meram_info = {
254 .addr_mode = SH_MOBILE_MERAM_MODE1,
255};
256
257static struct resource meram_resources[] = {
258 [0] = {
259 .name = "MERAM",
260 .start = 0xe8000000,
261 .end = 0xe81fffff,
262 .flags = IORESOURCE_MEM,
263 },
264};
265
266static 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 */
254static struct resource sh_mmcif_resources[] = { 277static struct resource sh_mmcif_resources[] = {
@@ -431,13 +454,29 @@ const static struct fb_videomode ap4evb_lcdc_modes[] = {
431#endif 454#endif
432 }, 455 },
433}; 456};
457static struct sh_mobile_meram_cfg lcd_meram_cfg = {
458 .icb[0] = {
459 .marker_icb = 28,
460 .cache_icb = 24,
461 .meram_offset = 0x0,
462 .meram_size = 0x40,
463 },
464 .icb[1] = {
465 .marker_icb = 29,
466 .cache_icb = 25,
467 .meram_offset = 0x40,
468 .meram_size = 0x40,
469 },
470};
434 471
435static struct sh_mobile_lcdc_info lcdc_info = { 472static struct sh_mobile_lcdc_info lcdc_info = {
473 .meram_dev = &meram_info,
436 .ch[0] = { 474 .ch[0] = {
437 .chan = LCDC_CHAN_MAINLCD, 475 .chan = LCDC_CHAN_MAINLCD,
438 .bpp = 16, 476 .bpp = 16,
439 .lcd_cfg = ap4evb_lcdc_modes, 477 .lcd_cfg = ap4evb_lcdc_modes,
440 .num_cfg = ARRAY_SIZE(ap4evb_lcdc_modes), 478 .num_cfg = ARRAY_SIZE(ap4evb_lcdc_modes),
479 .meram_cfg = &lcd_meram_cfg,
441 } 480 }
442}; 481};
443 482
@@ -708,15 +747,31 @@ static struct platform_device fsi_device = {
708static struct platform_device fsi_ak4643_device = { 747static struct platform_device fsi_ak4643_device = {
709 .name = "sh_fsi2_a_ak4643", 748 .name = "sh_fsi2_a_ak4643",
710}; 749};
750static struct sh_mobile_meram_cfg hdmi_meram_cfg = {
751 .icb[0] = {
752 .marker_icb = 30,
753 .cache_icb = 26,
754 .meram_offset = 0x80,
755 .meram_size = 0x100,
756 },
757 .icb[1] = {
758 .marker_icb = 31,
759 .cache_icb = 27,
760 .meram_offset = 0x180,
761 .meram_size = 0x100,
762 },
763};
711 764
712static struct sh_mobile_lcdc_info sh_mobile_lcdc1_info = { 765static struct sh_mobile_lcdc_info sh_mobile_lcdc1_info = {
713 .clock_source = LCDC_CLK_EXTERNAL, 766 .clock_source = LCDC_CLK_EXTERNAL,
767 .meram_dev = &meram_info,
714 .ch[0] = { 768 .ch[0] = {
715 .chan = LCDC_CHAN_MAINLCD, 769 .chan = LCDC_CHAN_MAINLCD,
716 .bpp = 16, 770 .bpp = 16,
717 .interface_type = RGB24, 771 .interface_type = RGB24,
718 .clock_divider = 1, 772 .clock_divider = 1,
719 .flags = LCDC_FLAGS_DWPOL, 773 .flags = LCDC_FLAGS_DWPOL,
774 .meram_cfg = &hdmi_meram_cfg,
720 } 775 }
721}; 776};
722 777
@@ -945,6 +1000,7 @@ static struct platform_device *ap4evb_devices[] __initdata = {
945 &csi2_device, 1000 &csi2_device,
946 &ceu_device, 1001 &ceu_device,
947 &ap4evb_camera, 1002 &ap4evb_camera,
1003 &meram_device,
948}; 1004};
949 1005
950static void __init hdmi_init_pm_clock(void) 1006static 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 7da2ca24229d..a165a9e70eea 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -279,6 +279,30 @@ static struct platform_device smc911x_device = {
279 }, 279 },
280}; 280};
281 281
282/* MERAM */
283static struct sh_mobile_meram_info mackerel_meram_info = {
284 .addr_mode = SH_MOBILE_MERAM_MODE1,
285};
286
287static struct resource meram_resources[] = {
288 [0] = {
289 .name = "MERAM",
290 .start = 0xe8000000,
291 .end = 0xe81fffff,
292 .flags = IORESOURCE_MEM,
293 },
294};
295
296static struct platform_device meram_device = {
297 .name = "sh_mobile_meram",
298 .id = 0,
299 .num_resources = ARRAY_SIZE(meram_resources),
300 .resource = meram_resources,
301 .dev = {
302 .platform_data = &mackerel_meram_info,
303 },
304};
305
282/* LCDC */ 306/* LCDC */
283static struct fb_videomode mackerel_lcdc_modes[] = { 307static struct fb_videomode mackerel_lcdc_modes[] = {
284 { 308 {
@@ -307,7 +331,23 @@ static int mackerel_get_brightness(void *board_data)
307 return gpio_get_value(GPIO_PORT31); 331 return gpio_get_value(GPIO_PORT31);
308} 332}
309 333
334static struct sh_mobile_meram_cfg lcd_meram_cfg = {
335 .icb[0] = {
336 .marker_icb = 28,
337 .cache_icb = 24,
338 .meram_offset = 0x0,
339 .meram_size = 0x40,
340 },
341 .icb[1] = {
342 .marker_icb = 29,
343 .cache_icb = 25,
344 .meram_offset = 0x40,
345 .meram_size = 0x40,
346 },
347};
348
310static struct sh_mobile_lcdc_info lcdc_info = { 349static struct sh_mobile_lcdc_info lcdc_info = {
350 .meram_dev = &mackerel_meram_info,
311 .clock_source = LCDC_CLK_BUS, 351 .clock_source = LCDC_CLK_BUS,
312 .ch[0] = { 352 .ch[0] = {
313 .chan = LCDC_CHAN_MAINLCD, 353 .chan = LCDC_CHAN_MAINLCD,
@@ -327,6 +367,7 @@ static struct sh_mobile_lcdc_info lcdc_info = {
327 .name = "sh_mobile_lcdc_bl", 367 .name = "sh_mobile_lcdc_bl",
328 .max_brightness = 1, 368 .max_brightness = 1,
329 }, 369 },
370 .meram_cfg = &lcd_meram_cfg,
330 } 371 }
331}; 372};
332 373
@@ -353,8 +394,23 @@ static struct platform_device lcdc_device = {
353 }, 394 },
354}; 395};
355 396
397static struct sh_mobile_meram_cfg hdmi_meram_cfg = {
398 .icb[0] = {
399 .marker_icb = 30,
400 .cache_icb = 26,
401 .meram_offset = 0x80,
402 .meram_size = 0x100,
403 },
404 .icb[1] = {
405 .marker_icb = 31,
406 .cache_icb = 27,
407 .meram_offset = 0x180,
408 .meram_size = 0x100,
409 },
410};
356/* HDMI */ 411/* HDMI */
357static struct sh_mobile_lcdc_info hdmi_lcdc_info = { 412static struct sh_mobile_lcdc_info hdmi_lcdc_info = {
413 .meram_dev = &mackerel_meram_info,
358 .clock_source = LCDC_CLK_EXTERNAL, 414 .clock_source = LCDC_CLK_EXTERNAL,
359 .ch[0] = { 415 .ch[0] = {
360 .chan = LCDC_CHAN_MAINLCD, 416 .chan = LCDC_CHAN_MAINLCD,
@@ -362,6 +418,7 @@ static struct sh_mobile_lcdc_info hdmi_lcdc_info = {
362 .interface_type = RGB24, 418 .interface_type = RGB24,
363 .clock_divider = 1, 419 .clock_divider = 1,
364 .flags = LCDC_FLAGS_DWPOL, 420 .flags = LCDC_FLAGS_DWPOL,
421 .meram_cfg = &hdmi_meram_cfg,
365 } 422 }
366}; 423};
367 424
@@ -949,6 +1006,7 @@ static struct platform_device *mackerel_devices[] __initdata = {
949 &mackerel_camera, 1006 &mackerel_camera,
950 &hdmi_lcdc_device, 1007 &hdmi_lcdc_device,
951 &hdmi_device, 1008 &hdmi_device,
1009 &meram_device,
952}; 1010};
953 1011
954/* Keypad Initialization */ 1012/* Keypad Initialization */