aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-ap4evb.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-shmobile/board-ap4evb.c')
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c56
1 files changed, 56 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)