设为首页 加入收藏

TOP

FS2410 开发板Linux-2.6.35内核 LCD 驱动移植
2014-11-24 07:29:19 来源: 作者: 【 】 浏览:1
Tags:FS2410 开发 Linux-2.6.35 内核 LCD 驱动 移植

FS2410 开发板linux-2.6.35内核 LCD 驱动移植


在arch/arm/mach-smdk2410.c相应位置中添加如下红色行代码


#include //added by Thomas.Yang 2011-01-30
#include
#include
#include
#include
#include
#include
#include


/*LCD35 driver Added by Thomas.Yang (Yang Zhiping) 2011-01-30
********************************************************************/
static struct s3c2410fb_display fb_thomas_display = {
.type = S3C2410_LCDCON1_TFT, //LCD 类型
.width = 320, //LCD 宽
.height = 240, //LCD 高
.xres = 320,
.yres = 240,
.bpp = 16, //LCD 色深,每个像素占多少位
.pixclock = 156000, //像素时钟
.left_margin = 20,
.right_margin = 38,
.hsync_len = 30, //水平同步
.upper_margin = 4,
.lower_margin = 15,
.vsync_len = 3, //垂直同步
.lcdcon5 = S3C2410_LCD CON5_FRM565 |
S3C2410_LCD CON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
S3C2410_LCDCON5_PWREN |
S3C2410_LCDCON5_HWSWP,
};



The frame buffer device uses the following fields:


- pixclock: pixel clock in ps (pico seconds)
- left_margin: time from sync to picture
- right_margin: time from picture to sync
- upper_margin: time from sync to picture
- lower_margin: time from picture to sync
- hsync_len: length of horizontal sync
- vsync_len: length of vertical sync


static struct s3c2410fb_mach_info s3c2410fb_thomas_info __initdata={
.displays = &fb_thomas_display,
.num_displays = 1,
.default_display = 0,
.gpcup = 0xffffffff,
.gpcup_mask = 0xffffffff,
.gpccon = 0xaa9556a9,
.gpccon_mask = 0xffffffff,
.gpdup = 0xffffffff,
.gpdup_mask = 0xffffffff,
.gpdcon = 0xaaaaaaaa,
.gpdcon_mask = 0xffffffff,
.lpcsel =0x00,
};
/****************************************************************/
static void __init smdk2410_init(void)
{
s3c_i2c0_set_platdata(NULL);
s3c24xx_fb_set_platdata(&s3c2410fb_thomas_info); //LCD35 driver Added by Thomas.Yang (Yang Zhiping) 2011-01-30
platform_add_devices(smdk2410_devices, ARRAY_SIZE(smdk2410_devices));
smdk_machine_init();
}


在内核编译配置选项中选择:


Device Drivers ---> Graphics support --->


<*> Support for frame buffer devices --->


<*> S3C2410 LCD framebuffer Support
[*] S3C2410 lcd debug messages


[*] Backlight & LCD device support --->


<*> Samsung LTV350QV LCD Panel



[*] Bootup logo --->


[*] Standard 224-color Linux logo (NEW)


make uImage -j4


启动内核,LCD既可以显示linux kernel 小企鹅了。


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Linux Socket编程中的连接过程 下一篇Ubuntu 10.04 Bochs 安装配置及启..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Redis 分布式锁全解 (2025-12-25 17:19:51)
·SpringBoot 整合 Red (2025-12-25 17:19:48)
·MongoDB 索引 - 菜鸟 (2025-12-25 17:19:45)
·What Is Linux (2025-12-25 16:57:17)
·Linux小白必备:超全 (2025-12-25 16:57:14)