微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > 内核移植(2)arch/arm/mach-s3c2440/mach-smdk2440.c

内核移植(2)arch/arm/mach-s3c2440/mach-smdk2440.c

时间:11-21 来源:互联网 点击:
对于s3c2410、s3c2440开发板,它们的CPU Id都是0x41129200,在arch/arm/mm/proc -arm920.S中的_ _arm920_proc_info结构中。

定义开发板参数在arch/arm/mach-s3c2440/mach-smdk2440.c中,如机器类型ID、起始I/O物理地址、Bootloader传入的参数的地址、中断初始化函数等。

arch/arm/kernel/head.S是内核执行的第一个文件。

S3c2440开发板上启动uImage时串口输出乱码的原因,开发板晶振的频率设置有问题。

1、在arch/arm/mach-s3c2440/mach-smdk2440.c修改,

static void __init smdk2440_map_io(void)

{

s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc));

s3c24xx_init_clocks(16934400);

s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs));

}

修改为:

static void __init smdk2440_map_io(void)

{

s3c24xx_init_io(smdk2440_iodesc, ARRAY_SIZE(smdk2440_iodesc));

s3c24xx_init_clocks(12000000);

s3c24xx_init_uarts(smdk2440_uartcfgs, ARRAY_SIZE(smdk2440_uartcfgs));

}

U-Boot控制界面,看到内核的启动信息如下:

OpenJTAG> bootm 0x32000000

## Booting image at 32000000 ...

Image Name: Linux-2.6.22.6

Created: 2009-12-0911:36:02 UTC

Image Type: ARM Linux Kernel Image (uncompressed)

Data Size:1511064 Bytes =1.4 MB

Load Address: 30008000

Entry Point:30008000

Verifying Checksum ... OK

OK

Starting kernel ...

Uncompressing Linux......................................done, booting the kernel.

Linux version 2.6.22.6 (root@huanghuang-desktop) (gcc version 3.4.5) #1 Wed Dec 9 19:35:58 CST 2009

CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177

Machine: SMDK2410

Memory policy: ECC disabled, Data cache writeback

CPU S3C2410A (id 0x32410002)

S3C2410: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz

S3C24XX 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.Total pages: 16256

Kernel command line: noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0

irq: clearing subpending status 00000002

PID hash table entries: 256 (order: 8, 1024 bytes)

timer tcon=00500000, tcnt a2c1, tcfg 00000200,00000000, usec 00001eb8

Console: colour dummy device 80x30

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: 61696KB available (2788K code, 313K data, 132K init)

Mount-cache hash table entries: 512

CPU: Testing write buffer coherency: ok

NET: Registered protocol family 16

S3C2410 Power Management, (c) 2004 Simtec Electronics

S3C2410: Initialising architecture

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

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

NetWinder Floating Point Emulator V0.97 (double precision)

JFFS2 version 2.2. (NAND) 2001-2006 Red Hat, Inc.

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler deadline registered

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

ppdev: user-space parallel port driver

S3C2410 Watchdog Tim

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top