Linux2.6.26.5加入TFT-LCD驅動
首先下載內核源碼,我這里用的是linux-2.6.26.5的內核源碼。
本文引用地址:http://www.ex-cimer.com/article/148334.htm(1) 在arch/arm/mach-s3c2410/mach-smdk2410.c里添加頭文件:
#include
(2) 在arch/arm/ plat-s3c24xx / commON-smdk.c文件中添加如下信息:
#include
然后添加如下代碼:
STatic struct s3c2410fb_display qt2410_LCD_cfg[] __initdata = {
{
.LCDcon5 = S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_INVVCLK|
S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_INVVframe.|
S3C2410_LCDCON5_PWREN |
S3C2410_LCDCON5_HWSWP,
.type = S3C2410_LCDCON1_TFT,
.width = 320,
.height = 240,
.pixclock = 100000, /* HCLK/10 */
.xres = 320,
.yres = 240,
.bpp = 16,
.left_margin = 13,
.right_margin = 8,
.hsync_len = 4,
.upper_margin = 2,
.lower_margin = 7,
.vsync_len = 4,
}
};
static struct s3c2410fb_mach_info qt2410_fb_info __initdata = {
.displays = qt2410_lcd_cfg,
.num_displays = ARRAY_SIZE(qt2410_lcd_cfg),
.default_display = 0,
.lpcsel = ((0xCE6) ~7) | 14,
};
在smdk_machine_init函數里添加:
s3c24xx_fb_set_platdata(qt2410_fb_info);
(3) 重新配置內核
# make menuconfig
Device Drivers
Graphics support→
Support for frAME. buffer devices→
(4) 重新編譯內核
#make zImage
這樣你新編譯的內核就支持LCD驅動了。
LCD顯示屏相關文章:lcd顯示屏原理
lcd相關文章:lcd原理
評論