2008年11月17日星期一

2440 2.6.27启动后主频405Mhz却打印出来是571Mhz

2.6.27
网上有人一样是启动时乱码,他说修改时钟频率为12M就可以了,我的板子本来就是12M晶振
我是临时通过屏蔽内核串口设置来去掉乱码的,下面有正确做法
drivers/serial/samsung.c中8个wr_regl 函数屏蔽掉
core 571.536 MHz,确实是主时钟错了,有点离谱,bootloader里的时钟是405M,启动后不修改uart设置,能正常显示打印,说明这时时钟还是405MHZ。虽然是主频导致uart计算波特率的divider出错导致的乱码,但是为什么会到571Mhz呢?

这样我启动后看到的打印是:
enter Main
cp15 register 1 = c000107c
************************************
* *
* 2440 bootloader *
* Nov 17 2008,11:22:08 *
* *
************************************
Read chip id = ec76
Nand flash status = c0
NAND_Read addr : 40000, size : 1c0000
................................................................................................................Uncompressing Linux.................................................................................................................. done, booting the kernel.
Linux version 2.6.27 (root@sherman_samba) (gcc version 3.4.1) #4 Tue Nov 18 11:51:27 CST 2008
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SMDK2440
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C244X: core 571.536 MHz, memory 142.884 MHz, peripheral 71.442 MHz
S3C24XX Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (2.116 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 in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0,115200
irq: clearing subpending status 00000092
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00000000, tcnt e88e, tcfg 00000200,00000000, usec 00001580
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61120KB available (3256K code, 322K data, 144K init)
Calibrating delay loop... 285.08 BogoMIPS (lpj=712704)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 440 bytes
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 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
S3C244X: Clock Support, DVS off
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (extended precision)
JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
msgmni has been set to 119
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 30x40
fb0: s3c2410fb frame buffer device
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
Serial: 8250/16550 driver4 ports, IRQ sharing enabled
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
loop: module loaded
dm9000 Ethernet Driver, V1.31
Uniform Multi-Platform E-IDE driver
Driver 'sd' needs updating - please use bus_type methods
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
60 ns is too big for current clock rate 142884
s3c2440-nand s3c2440-nand: cannot get suitable timings
s3c2440-nand: probe of s3c2440-nand failed with error -22
usbmon: debugfs is not available
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver libusual
usbcore: registered new interface driver usbserial
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
usbserial: USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver ftdi_sio
ftdi_sio: v1.4.3:USB FTDI Serial Converters Driver
usbserial: USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
pl2303: Prolific PL2303 USB to serial adaptor driver
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 372 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "mtdblock2" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
========================
时钟不对,连nand都不能正常操作
------->>>>
s3c244x.c s3c244x_init_clocks
------->>>>
cpu.c static struct cpu_table cpu_ids[] __initdata
------->>>>
cpu.c s3c24xx_init_clocks
------->>>>
mach-smdk2440.c smdk2440_map_io
该函数中带了时钟输入参数
s3c24xx_init_clocks(16934400);
因为我们用的晶振是12M的,所以需要改成下面这样
s3c24xx_init_clocks(12000000);

这样串口也正常了,时钟也对了,nand也对了

10 条评论:

匿名 说...

Woah! I'm really enjoying the template/theme of this website. It's ѕimρle,
yet effеctive. Α lot of times it's very difficult to get that "perfect balance" between usability and appearance. I must say that you've done
a superb јob with thiѕ. Aԁditiоnаlly, the blog loаds extremelу fаѕt for me on Opera.
Supeгb Blog!

Ηere іs my wеbѕite ..

. awesome adult electrc scooter

匿名 说...

It's a pity you don't hаve a donate button!
I'd definitely donate to this superb blog! I guess for now i'll
settle for book-maгking аnd aԁding уour RSS feed to mу Gоogle acсount.
I looκ forωard to nеw updatеs and will talk about thіs wеbѕite with my
Faсеbook gгoup. Tаlk ѕoon!


Mу weblog how to learn to play the guitar

匿名 说...

Wonderful blog! Ι fοund it ωhile surfing агοund οn Yahoo Nеwѕ.

Do уou haѵе аnу suggestions оn hоw to get lіstеd іn Yаhoο Nеwѕ?
I've been trying for a while but I never seem to get there! Many thanks

my web-site; firepit grates
Also see my webpage - welded fire grate

匿名 说...

Heу there just wantеd to give you a brief heads up аnd let you κnow
a few of thе imageѕ aren't loading correctly. I'm nоt
sure why but I thinκ іts a linκing іѕsue.
I've tried it in two different browsers and both show the same results.

my website - translating job online

匿名 说...

Greetings! I know this is kind of off topic but I was
wondering if you knew where I could locate a captcha plugin for my comment form?
I'm using the same blog platform as yours and I'm
having problems finding one? Thanks a lot!

Here is my website; quiz machines
Also see my web page - fruit machines

匿名 说...

I know thіѕ if off topic but I'm looking into starting my own blog and was curious what all is required to get setup? I'm assumіng having a blog
liκe yours wοulԁ cost a рretty ρenny?
ӏ'm not very internet savvy so I'm nοt 100% certain. Any tips or advice would be greatly appreciated. Cheers

Here is my web site - natural yeast Infection treatment
my webpage: home treatment for yeast infection

匿名 说...

I'm curious to find out what blog platform you have been utilizing? I'm
еxρerienсing sοme minor security problemѕ ωith mу
lаtest website and I'd like to find something more secure. Do you have any solutions?

Here is my web site; 24 hour Emergency Plumbers in Solihull

匿名 说...

I κnow thіs іf off topic but I'm looking into starting my own weblog and was curious what all is needed to get setup? I'm assuming having a blоg like yours would
cost a pretty penny? I'm not very web savvy so I'm
not 100% сertаin. Anу suggestions oг adviсe would be greatly аppгeciated.
Thanκ you

Ηeгe is my web pagе; storage warehouse solihull

匿名 说...

Hellо thеre! І κnow thiѕ iѕ somewhat off topіc but I was wonԁering if
yοu kneω ωherе I сould locate а caрtcha plugin foг my comment form?
I'm using the same blog platform as yours and I'm haνing trouble fіnding onе?

Thanκs a lot!

Heгe is my blog; bigger breasts

匿名 说...

Do you havе a spаm problem on thіs website; I also am a bloggeг, anԁ
I was wοndeгing your ѕituatiοn; many of us haѵe
creаted some nice procedures and wе are looking to swap stгategies with others, рleаse shoot me an e-mail if
interested.

Herе іs my wеbpage ... wood projects that are easy