Linux下的LCD設備被抽象成標准的framebuffer設備,我們只需要修改與LCD有關的掃描時間及分辨率即可
1、修改 arch/arm/mach-s3c2440/mach-smdk2440.c 如下:
/* LCD driver info */
static struct s3c2410fb_display smdk2440_lcd_cfg __initdata = {
.lcdcon5 = S3C2410_LCDCON5_FRM565|
//S3C2410_LCDCON5_INVVLINE |
//S3C2410_LCDCON5_INVVFRAME|
S3C2410_LCDCON5_PWREN|
S3C2410_LCDCON5_HWSWP,
.type = S3C2410_LCDCON1_TFT,
.width = 320,
.height = 240,
.pixclock = 64000, /*HCLK 60 MHz, divisor 10 */
.xres = 320,
.yres = 240,
.bpp =16,
.left_margin = 18,
.right_margin = 38,
.hsync_len = 30,
.upper_margin = 18,
.lower_margin = 18,
.vsync_len = 3,
};
static struct s3c2410fb_mach_info smdk2440_fb_info __initdata = {
.displays = &smdk2440_lcd_cfg,
.num_displays = 1,
.default_display= 0,
#if 0
/*currently setup by downloader */
.gpccon = 0xaa940659,
.gpccon_mask = 0xffffffff,
.gpcup = 0x0000ffff,
.gpcup_mask = 0xffffffff,
.gpdcon = 0xaa84aaa0,
.gpdcon_mask = 0xffffffff,
.gpdup = 0x0000faff,
.gpdup_mask = 0xffffffff,
#endif
.gpccon = 0xaa955699, //這是將GPC和GPD設置成功能引腳,也可以不設置
.gpccon_mask = 0xffc003cc,
.gpcup =0x0000ffff,
.gpcup_mask = 0xffffffff,
.gpdcon = 0xaa95aaa1,
.gpdcon_mask = 0xffc0fff0,
.gpdup =0x0000faff,
.gpdup_mask = 0xffffffff,
//.lpcsel = ((0xCE6) & ~7) | 1<<4,
.lpcsel = 0xf82, //設置TCONSEL寄存器選擇三星240x320
};
static struct platform_device*smdk2440_devices[] __initdata = {
&s3c_device_ohci,
&s3c_device_lcd, //檢查這裡有沒有加上
&s3c_device_wdt,
&s3c_device_i2c0,
&s3c_device_iis,
};
2.讓系統啟動起來看到 bootlogo 小企鵝,得在 make menuconfig 中進行配置添加
在Device Drivers ---> Graphics support ---> Bootup logo下面可以全部選中支持