linux2.6.22.6中针对s3c2410的LCD驱动移植
2012-11-12 13:34
441 查看
1.在arch/arm/mach-s3c2410/mach-smdk2410.c中添加头文件:
#include <asm/arch/fb.h>
#include <asm/arch/regs-gpio.h>
#include <asm/arch/regs-lcd.h>
2.继续在上面的文件中添加
static struct s3c2410fb_mach_info smdk2410_lcdcfg __initdata={
.fixed_syncs= 0,
.regs={
.lcdcon1= (7<<8)|(0<<7)|(3<<5)|(12<<1),
.lcdcon2= (4<<24)|(239<<14)(4<<6)|4,
.lcdcon3= (13<<19)|(319<<8)|4,
.lcdcon4= (13<<8)|18,
.lcdcon5= (1<<11)|(1<<10)|(1<<9)|(1<<8)|(0<<7)|(0<<6)|(1<<3)|(0<<1)|(1),
},
.type=S3C2410_LCDCON1_TFT,
.lpcsel= ((0XCE6)&~7)|1<<4,//0x0,
[b].width= 320,//640,
.height= 240,//480,
.xres = {
.min = 322,
.max = 320,
.defval = 320,
},
[b].yres = {
.min = 240,
.max = 240,
.defval = 480,
},
.bpp = {
.min = 16,
.max = 16,
.defval = 16,
},
};
在smdk2410_init函数里添加:
static void __init smdk2410_init(void)
{
[b]s3c24xx_fb_set_platdata(&smdk2410_lcdcfg);
platform_add_devices(smdk2410_devices, ARRAY_SIZE(smdk2410_devices));
smdk_machine_init();
}
下面配置内核
Device Drivers --->
Graphics support --->
<*> S3C2410 LCD framebuffer support
<*> Virtual Frame Buffer support(ONLY FOR TESTING!)
Console display driver support --->
<*> Framebuffer Console support
[*] Framebuffer Console Rotation
[*] Select compiled-in fonts
[*] VGA 8x8 font
[*] VGA 8x16 font
[*] Mini 4x6 font
[*] Sparc console 8x16 font
[*] Bootup logo --->
--- Bootup logo
[*] Standard 224-color Linux logo
然后就是重新编译内核 ,tftp到开发板启动,应该就可以看到企鹅Tux了。但你如果想在LCD上显示自己的Logo,那下面我介绍一下自定义Logo的方法:
[/b][/b][/b]
#include <asm/arch/fb.h>
#include <asm/arch/regs-gpio.h>
#include <asm/arch/regs-lcd.h>
2.继续在上面的文件中添加
static struct s3c2410fb_mach_info smdk2410_lcdcfg __initdata={
.fixed_syncs= 0,
.regs={
.lcdcon1= (7<<8)|(0<<7)|(3<<5)|(12<<1),
.lcdcon2= (4<<24)|(239<<14)(4<<6)|4,
.lcdcon3= (13<<19)|(319<<8)|4,
.lcdcon4= (13<<8)|18,
.lcdcon5= (1<<11)|(1<<10)|(1<<9)|(1<<8)|(0<<7)|(0<<6)|(1<<3)|(0<<1)|(1),
},
.type=S3C2410_LCDCON1_TFT,
.lpcsel= ((0XCE6)&~7)|1<<4,//0x0,
[b].width= 320,//640,
.height= 240,//480,
.xres = {
.min = 322,
.max = 320,
.defval = 320,
},
[b].yres = {
.min = 240,
.max = 240,
.defval = 480,
},
.bpp = {
.min = 16,
.max = 16,
.defval = 16,
},
};
在smdk2410_init函数里添加:
static void __init smdk2410_init(void)
{
[b]s3c24xx_fb_set_platdata(&smdk2410_lcdcfg);
platform_add_devices(smdk2410_devices, ARRAY_SIZE(smdk2410_devices));
smdk_machine_init();
}
下面配置内核
Device Drivers --->
Graphics support --->
<*> S3C2410 LCD framebuffer support
<*> Virtual Frame Buffer support(ONLY FOR TESTING!)
Console display driver support --->
<*> Framebuffer Console support
[*] Framebuffer Console Rotation
[*] Select compiled-in fonts
[*] VGA 8x8 font
[*] VGA 8x16 font
[*] Mini 4x6 font
[*] Sparc console 8x16 font
[*] Bootup logo --->
--- Bootup logo
[*] Standard 224-color Linux logo
然后就是重新编译内核 ,tftp到开发板启动,应该就可以看到企鹅Tux了。但你如果想在LCD上显示自己的Logo,那下面我介绍一下自定义Logo的方法:
[/b][/b][/b]
相关文章推荐
- 在S3C2410的6寸LCD驱动在linux2.6上的移植
- LCD驱动移植 Linux 2.6.22.19移植到S3C2410(GEC2410)
- S3C2410 LCD驱动的移植(基于linux-2.6.15.4内核)
- ubuntu 7.04 s3c2410 LCD触摸屏移植 linux 2.6.22.6
- 移植Linux2.6.22.2到博创2410-S(s3c2410A)(LCD驱动)
- 基于S3C2410平台的LCD for Linux 2.6 驱动移植
- linux-2.6.22.6中LCD驱动到FL2440-I移植
- S3c2410 Linux下LCD驱动详解
- linux2.6.32.2 LCD触屏驱动移植
- [转]移植linux-2.6.36内核后的ts及lcd驱动参数修改
- linux2.6.32.2 mini2440平台移植-- LCD 显示驱动 ( W35屏 )
- linux2.6.32.2 mini2440平台移植--LCD 背光驱动
- 【移植驱动到Linux3.4.2内核之二】LCD,触摸屏,按键,USB等驱动程序的移植心得总结
- linux2.6.32.2 mini2440平台移植--LCD 背光驱动
- Linux-2.6.32.2内核在mini2440上的移植----增加LCD背光驱动
- 移植Linux3.4.2版本内核到mini2440(二)--添加网卡、UVC摄像头、LCD驱动
- 移植基于linux-2.6.26.5内核s3c2410触摸屏驱动移植
- S3C2440 Linux驱动移植——LCD
- linux-2.6.26.5内核的 lcd驱动移植 lcd 触摸屏移植 tslib-1.4移植
- Linux-2.6.32.2内核在mini2440上的移植(七)---LCD驱动移植