- 论坛徽章:
- 0
|
Linux 2.6.24.4移植到S3C2410(nano2410)之:LCD
【平台信息】
目标板(Nano2410)------------------------
CPU: S3C2410X
SDRAM: HY57V561620(32MB)
FLASH: K9F1208(64MB)
NET: CS8900
HOST---------------------------------------
Linux Realse Version: Fecora Cor 8 (FC8)
CrossCompiler: gcc-4.1.1/glibc-2.3.2
从启动信息可以看出没有加载成功LCD驱动
......
io scheduler cfq registered
s3c2410-lcd s3c2410-lcd: no platform data for lcd, cannot attach
s3c2410-lcd: probe of s3c2410-lcd failed with error -22
lp: driver loaded but no devices found
......
内核代码修改步骤:
1. 修改文件/linux2.6.24.4/arch/arm/mach-s3c2410/mach-smdk2410.c
加入头文件#include
添加代码
static struct s3c2410fb_display nano2410_lcd_cfg[] __initdata = {
{
/* Config for 240x320 LCD */
.lcdcon5 = S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
S3C2410_LCDCON5_PWREN |
S3C2410_LCDCON5_HWSWP,
.type = S3C2410_LCDCON1_TFT,
.width = 240,
.height = 320,
.pixclock = 100000, /* HCLK/10 */
.xres = 240,
.yres = 320,
.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 nano2410_fb_info __initdata = {
.displays = nano2410_lcd_cfg,
.num_displays = ARRAY_SIZE(nano2410_lcd_cfg),
.default_display = 0,
.lpcsel = ((0xCE6) & ~7) | 1
};
在函数smdk2410_init()中加入
s3c24xx_fb_set_platdata(&nano2410_fb_info);
重新编译内核,看看启动信息
……
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/63560/showart_520838.html |
|