static void setup_parallel_timing(struct pxafb_info *fbi) { struct fb_info *info = &fbi->info; struct fb_videomode *mode = info->mode; unsigned int lines_per_panel, pcd = get_pcd(fbi, mode->pixclock); fbi->reg_lccr1 = LCCR1_DisWdth(mode->xres) + LCCR1_HorSnchWdth(mode->hsync_len) + LCCR1_BegLnDel(mode->left_margin) + LCCR1_EndLnDel(mode->right_margin); /* * If we have a dual scan LCD, we need to halve * the YRES parameter. */ lines_per_panel = mode->yres; if ((fbi->lccr0 & LCCR0_SDS) == LCCR0_Dual) lines_per_panel /= 2; fbi->reg_lccr2 = LCCR2_DisHght(lines_per_panel) + LCCR2_VrtSnchWdth(mode->vsync_len) + LCCR2_BegFrmDel(mode->upper_margin) + LCCR2_EndFrmDel(mode->lower_margin); fbi->reg_lccr3 = fbi->lccr3 | (mode->sync & FB_SYNC_HOR_HIGH_ACT ? LCCR3_HorSnchH : LCCR3_HorSnchL) | (mode->sync & FB_SYNC_VERT_HIGH_ACT ? LCCR3_VrtSnchH : LCCR3_VrtSnchL); if (pcd) fbi->reg_lccr3 |= LCCR3_PixClkDiv(pcd); }
.yres = 240, .hsync_len = 1, .vsync_len = 1, .left_margin = 70, .upper_margin = 13, .right_margin = 1, .lower_margin = 1, .sync = 0, .cmap_greyscale = 0, }; static struct pxafb_mach_info generic_tft_320x240 = { .modes = &generic_tft_320x240_mode, .num_modes = 1, .lccr0 = (LCCR0_PAS), .lccr3 = (LCCR3_PixClkDiv(0x01) | LCCR3_Acb(0xff) | LCCR3_PCP), .cmap_inverse = 0, .cmap_static = 0, .lcd_conn = LCD_COLOR_TFT_18BPP, }; static struct pxafb_mach_info *simcom_display = &generic_tft_640x480;//&generic_crt_800x600; static void __init simcom_init_display(void) { set_pxa_fb_info(simcom_display); } #else
.hsync_len = 3, .vsync_len = 2, .left_margin = 3, .upper_margin = 0, .right_margin = 3, .lower_margin = 0, .sync = (FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT), .cmap_greyscale = 0, }; static struct pxafb_mach_info generic_stn_320x240 = { .modes = &generic_stn_320x240_mode, .num_modes = 1, .lccr0 = 0, .lccr3 = (LCCR3_PixClkDiv(0x03) | LCCR3_Acb(0xff) | LCCR3_PCP), .cmap_inverse = 0, .cmap_static = 0, }; static struct pxafb_mode_info generic_tft_640x480_mode = { .pixclock = 38461, .bpp = 8, .xres = 640, .yres = 480, .hsync_len = 60, .vsync_len = 2, .left_margin = 70, .upper_margin = 10,