- 论坛徽章:
- 0
|
我在配置的时候加了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);
上面那些关键性代码错了会导致白屏呢? |
|