1 在arch/arm/mach-s3c2410/mach-smdk2410.c中添加
//lcd
#include <asm/arch/regs-lcd.h>
#include <asm/arch-s3c2410/fb.h>
//lcd
static struct s3c2410fb_mach_info s3c2410_lcd_info __initdata ={
.fixed_syncs = 0,
.regs = {
.lcdcon1 = S3C2410_LCDCON1_TFT16BPP |
S3C2410_LCDCON1_TFT |S3C2410_LCDCON1_CLKVAL(4),
.lcdcon2 = S3C2410_LCDCON2_VBPD(1) |
S3C2410_LCDCON2_VFPD(5)|S3C2410_LCDCON2_VSPW(1) ,
.lcdcon3 = S3C2410_LCDCON3_HBPD(36) | S3C2410_LCDCON3_HFPD(19) ,
.lcdcon4 = S3C2410_LCDCON4_MVAL(13) | S3C2410_LCDCON4_HSPW(5),
.lcdcon5 = S3C2410_LCDCON5_FRM565 | S3C2410_LCDCON5_INVVLINE
| S3C2410_LCDCON5_HWSWP | S3C2410_LCDCON5_PWREN
|S3C2410_LCDCON5_INVVFRAME,
},
.lpcsel = 0x0,
.gpccon = 0xaaaaaaaa,
.gpccon_mask = 0xffffffff,
.gpcup = 0xaaaaaaaa,
.gpcup_mask = 0xffffffff,
.gpdcon = 0x0,
.gpdcon_mask = 0x0,
.gpdup = 0x0,
.gpdup_mask = 0xffffffff,
.width = 240,
.height = 320,
.xres = {240,240,240},
.yres = {320,320,320},
.bpp = {16,16,16},
};
//lcd init
static void __init smdk2410_lcd_init(void)
{
set_s3c2410fb_info(&s3c2410_lcd_info);
}
2 在文件最后MACHINE_END之前添加
.init_machine = smdk2410_lcd_init,
3 编译内核,选中所装驱动
#make menuconfig
Device Drivers >
Graphics support --->
<*> support for frame buffer devices
<*> S3C2410 LCD framebuffer support
Logo configuration ---> //开机画面的选择,可据个人需要更改
去掉10 分钟关闭LCD 的方法:
注释掉drivers\char\vt.c 的blank_screen_t(unsigned long dummy)的函数内容,否则,lcd 会在10 分钟左右关掉显示
上个图:效果不好,将就着
发现logo下面有个光标一只在闪,解决办法:
gedit drivers/video/console/fbcon.c
将static void fb_flashcursor(void *private)static 和
void fbcon_cursor(struct vc_data *vc, int mode)
制成空函数即可。
用户1657754 2012-6-6 11:18
用户1655238 2012-6-3 13:14
用户1632198 2012-6-1 20:11
用户377235 2012-5-21 20:14
有同感……
用户1679196 2009-3-25 08:23
用户1679196 2009-3-25 08:22
用户741296 2009-3-24 11:15