/* * Detect which LCD panel is connected, and return the appropriate * clcd_panel structure. Note: we do not have any information on * the required timings for the 8.4in panel, so we presently assume * VGA timings. */ static int versatile_clcd_setup(struct clcd_fb *fb) { void *sys_clcd = (void *)versatile_sys_base + VERSATILE_SYS_CLCD_OFFSET; const char *panel_name; u32 val; val = vmm_readl(sys_clcd) & SYS_CLCD_ID_MASK; if (val == SYS_CLCD_ID_SANYO_3_8) panel_name = "Sanyo TM38QV67A02A"; else if (val == SYS_CLCD_ID_SANYO_2_5) { panel_name = "Sanyo QVGA Portrait"; } else if (val == SYS_CLCD_ID_EPSON_2_2) panel_name = "Epson L2F50113T00"; else if (val == SYS_CLCD_ID_VGA) panel_name = "VGA"; else { vmm_printf("CLCD: unknown LCD panel ID 0x%08x, " "using VGA\n", val); panel_name = "VGA"; } fb->panel = versatile_clcd_get_panel(panel_name); if (!fb->panel) return VMM_EINVALID; return versatile_clcd_setup_dma(fb, 1024 * 1024); }
/* * Detect which LCD panel is connected, and return the appropriate * clcd_panel structure. Note: we do not have any information on * the required timings for the 8.4in panel, so we presently assume * VGA timings. */ static int versatile_clcd_setup(struct clcd_fb *fb) { void __iomem *sys_clcd = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_CLCD_OFFSET; const char *panel_name; u32 val; is_sanyo_2_5_lcd = false; val = readl(sys_clcd) & SYS_CLCD_ID_MASK; if (val == SYS_CLCD_ID_SANYO_3_8) panel_name = "Sanyo TM38QV67A02A"; else if (val == SYS_CLCD_ID_SANYO_2_5) { panel_name = "Sanyo QVGA Portrait"; is_sanyo_2_5_lcd = true; } else if (val == SYS_CLCD_ID_EPSON_2_2) panel_name = "Epson L2F50113T00"; else if (val == SYS_CLCD_ID_VGA) panel_name = "VGA"; else { printk(KERN_ERR "CLCD: unknown LCD panel ID 0x%08x, using VGA\n", val); panel_name = "VGA"; } fb->panel = versatile_clcd_get_panel(panel_name); if (!fb->panel) return -EINVAL; return versatile_clcd_setup_dma(fb, SZ_1M); }
static int cp_clcd_setup(struct clcd_fb *fb) { fb->panel = versatile_clcd_get_panel("VGA"); if (!fb->panel) return -EINVAL; return versatile_clcd_setup_dma(fb, SZ_1M); }
static int ct_ca9x4_clcd_setup(struct clcd_fb *fb) { unsigned long framesize = 1024 * 768 * 2; fb->panel = versatile_clcd_get_panel("XVGA"); if (!fb->panel) return -EINVAL; return versatile_clcd_setup_dma(fb, framesize); }
/* * Detect which LCD panel is connected, and return the appropriate * clcd_panel structure. Note: we do not have any information on * the required timings for the 8.4in panel, so we presently assume * VGA timings. */ static int realview_clcd_setup(struct clcd_fb *fb) { const char *panel_name; unsigned long framesize; framesize = 1024 * 768 * 2; panel_name = realview_clcd_panel_name(); fb->panel = versatile_clcd_get_panel(panel_name); if (!fb->panel) return VMM_EINVALID; return versatile_clcd_setup_dma(fb, framesize); }
/* * Detect which LCD panel is connected, and return the appropriate * clcd_panel structure. Note: we do not have any information on * the required timings for the 8.4in panel, so we presently assume * VGA timings. */ static int realview_clcd_setup(struct clcd_fb *fb) { void __iomem *sys_clcd = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_CLCD_OFFSET; const char *panel_name, *vga_panel_name; unsigned long framesize; u32 val; if (machine_is_realview_eb()) { /* VGA, 16bpp */ framesize = 640 * 480 * 2; vga_panel_name = "VGA"; } else { /* XVGA, 16bpp */ framesize = 1024 * 768 * 2; vga_panel_name = "XVGA"; } val = readl(sys_clcd) & SYS_CLCD_ID_MASK; if (val == SYS_CLCD_ID_SANYO_3_8) panel_name = "Sanyo TM38QV67A02A"; else if (val == SYS_CLCD_ID_SANYO_2_5) panel_name = "Sanyo QVGA Portrait"; else if (val == SYS_CLCD_ID_EPSON_2_2) panel_name = "Epson L2F50113T00"; else if (val == SYS_CLCD_ID_VGA) panel_name = vga_panel_name; else { pr_err("CLCD: unknown LCD panel ID 0x%08x, using VGA\n", val); panel_name = vga_panel_name; } fb->panel = versatile_clcd_get_panel(panel_name); if (!fb->panel) return -EINVAL; return versatile_clcd_setup_dma(fb, framesize); }