移植LCD驱动到S3C2410出错
我在移植LCD驱动到S3C2410,linux内核是2.6.14。结果内核出现了白屏,根据网上查的资料应该会出现小企鹅的。大虾们有没有遇到过类似的情况,指点一下小弟,下面是内核启动的时候出现的相关信息:Initializing Cryptographic API
Console: switching to colour frame buffer device 30x40
fb0: s3c2410fb frame buffer device
fb1: Virtual frame buffer device, using 1024K of video memory 你内核有配置Linux开机logo吗?要配置才有小企鹅!还有你的LCD驱动还有问题,不应该显示白屏。 我在配置的时候加了logo选项了,我按照网上的资料改了两个文件,在arch/arm/mach-s3c2410/mach-smdk2410.c中加入:
#include <asm/arch/regs-serial.h>
#include <asm/arch/regs-lcd.h>
#include <asm/arch-s3c2410/fb.h>
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_LINEVAL(319) | \
S3C2410_LCDCON2_VFPD(2) | \
S3C2410_LCDCON2_VSPW(1),
.lcdcon3= S3C2410_LCDCON3_HBPD(6) | \
S3C2410_LCDCON3_HOZVAL(239) | \
S3C2410_LCDCON3_HFPD(30),
.lcdcon4= S3C2410_LCDCON4_MVAL(13) | \
S3C2410_LCDCON4_HSPW(3),
.lcdcon5 = S3C2410_LCDCON5_FRM565 |S3C2410_LCDCON5_INVVCLK |\
S3C2410_LCDCON5_INVVLINE| \
S3C2410_LCDCON5_PWREN| \
S3C2410_LCDCON5_INVVFRAME ,
},
.lpcsel=0x0,
.gpccon= 0xaaaaaaaa,
.gpccon_mask= 0xffffffff,
.gpcup= 0xffffffff,
.gpcup_mask= 0xffffffff,
.gpdcon= 0xaaaaaaaa,
.gpdcon_mask=0x0,
.gpdup= 0xffffffff,
.gpdup_mask= 0xffffffff,
.width= 240,
.height= 320,
.xres= {240,240,240},
.yres= {320,320,320},
.bpp= {16,16,16},
};
static void __init smdk2410_lcd_init(void)
{
s3c24xx_fb_set_platdata(&s3c2410_lcd_info);
}
在arch/arm/mach-s3c2410/devs.c加入:
void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd)
{
struct s3c2410fb_mach_info *npd;
npd = kmalloc(sizeof(*npd), GFP_KERNEL);
if (npd) {
memcpy(npd, pd, sizeof(*npd));
s3c_device_lcd.dev.platform_data = npd;
} else {
printk(KERN_ERR "no memory for LCD platform data\n");
}
}
EXPORT_SYMBOL(s3c24xx_fb_set_platdata);
上面那些关键性代码错了会导致白屏呢? 这个都说不准了! 没了啊?我的天……
页:
[1]