日期:2014-05-16  浏览次数:20699 次

Linux2.6.16修改中LCD分辨率后 内核无法启动
我修改了s3c2410fb.c中,原来为:
static struct s3c2410fb_mach_info smdk2410_lcd_platdata = {
.width= 320,
.height= 240,
.xres = {
.defval= 320,
.min= 320,
.max= 320,
},
.yres = {
.defval= 240,
.min= 240,
.max= 240,
},
.bpp = {
.defval= 16,
.min= 16,
.max= 16,
},

.regs = {
.lcdcon1= S3C2410_LCDCON1_TFT8BPP | S3C2410_LCDCON1_TFT | S3C2410_LCDCON1_CLKVAL(7),
.lcdcon2= S3C2410_LCDCON2_VBPD(7) | S3C2410_LCDCON2_VFPD(8) | S3C2410_LCDCON2_VSPW(8) | S3C2410_LCDCON2_LINEVAL(239),
.lcdcon3= S3C2410_LCDCON3_HBPD(50) | S3C2410_LCDCON3_HFPD(50) | S3C2410_LCDCON3_HOZVAL(319),
.lcdcon4= S3C2410_LCDCON4_HSPW(18) ,//| S3C2410_LCDCON4_MVAL(13),
.lcdcon5= S3C2410_LCDCON5_FRM565 | S3C2410_LCDCON5_HWSWP | S3C2410_LCDCON5_PWREN,
},

.gpcup= 0xFFFFFFFF,
.gpcup_mask= 0xFFFFFFFF,
.gpccon= 0xaaaaaaaa,
.gpccon_mask= 0xFFFFFFFF,
.gpdup= 0xFFFFFFFF,
.gpdup_mask= 0xFFFFFFFF,
.gpdcon= 0xaaaaaaaa,
.gpdcon_mask= 0xFFFFFFFF,
.lpcsel= 0x00,
};

其中分辨率部分修改成
.width= 640,
.height= 480,
.xres = {
.defval= 640,
.min= 640,
.max= 640,
},
.yres = {
.defval= 480,
.min= 480,
.max= 480,
},
.bpp = {
.defval= 16,
.min= 16,
.max= 16,
},

内核启动时就
Starting kernel ...

Uncompressing Linux.............................................................
 done, booting the kernel.
Linux version 2.6.16 (root@localhost.localdomain) (gcc version 4.1.1) #645 Sat M
ay 16 19:27:24 CST 2015
CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T)
Machine: SMDK2410
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C2410: core 202.800 MHz, memory 101.400 MHz, peripheral 50.700 MHz
S3C2410 Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists
Kernel command line: console=ttySAC0,115200 root=/dev/mtdblock3 noinitrd rootfst
ype=jffs2 ro mem=64m
irq: clearing subpending status 00000002
PID hash table entries: 512 (order: 9, 8192 bytes)
timer tcon=00500000, tcnt a509, tcfg 00000200,00000000, usec 00001e4c
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 64MB = 64MB total
Memory: 62896KB available (1652K code, 179K data, 76K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
S3C2410: Initialising architecture
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
yaffs May 16 2015 19:26:16 Installing.
io scheduler noop registered
io scheduler deadline registered (default)
io scheduler cfq registered
Console: switching to colour frame buffer device 80x60
fb0: s3c2410fb frame buffer device
Unable to handle kernel paging request at virtual address c48c0000
pgd = c0004000
[c48c0000] *pgd=30299011, *pte=00000000, *ppte=00000000
Internal error: Oops: 7 [#1]
CPU: 0
pc : [<c00cd408>] lr : [<00000000>] Not tainted
sp : c0287e7c ip : 00000000 fp : c0287eac
r10: 00000000 r9 : c01de780 r8 : 00000000
r7 : 00000000