微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > ARM-Linux驱动移植--RTC(实时时钟)移植

ARM-Linux驱动移植--RTC(实时时钟)移植

时间:11-20 来源:互联网 点击:

硬件平台:FL2440

内核版本:2.6.28

主机平台:Ubuntu 11.04

内核版本:2.6.39

首先修改内核源码/arch/arm/mach-s3c2410/mach-smdk2410.c

添加红色字体部分

  1. staticstructplatform_device*smdk2410_devices[]__initdata={
  2. &s3c_device_usb,
  3. &s3c_device_lcd,
  4. &s3c_device_wdt,
  5. &s3c_device_i2c,
  6. &s3c_device_iis,
  7. &s3c_device_sdi,
  8. &s3c_device_dm9000,
  9. &s3c_device_ts,
  10. &s3c_device_rtc,
  11. };

make zImage重新编译内核,然后烧写内核(编译内核前,make menuconfig时选择rtc相关的驱动,如下图)

烧写完成后启动开发板,启动信息如下:

+------------------------------------------------------------+
| FL2440 Bootloader VER-5.1 Modified By Yan Ming! |
|------------------------------------------------------------|
|------------------------------------------------------------|
|CPU ID is 0x32440001 |
|FCLK=400MHz,HCLK=100MHz,PCLK=50MHz, CPU is running at 400MHz|
|UPLL=96MHz, UCLK=48MHz |
|Serial port 0, Baud rate is 115200. |
|OS image stored in NAND Flash. |
|Autoboot delay is 2 seconds. |
+------------------------------------------------------------+
Set boot params = root=/dev/mtdblock3 init=/linuxrc load_ramdisk=0 console=ttyS
Load Kernel...
Uncompressing Linux.............................................................
Linux version 2.6.28.7 (yan@yan-laptop) (gcc version 3.4.1) #343 Sun Jul 3 19:11
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: SMDK2410
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
MM: CPU does not support supersection mapping for 0x55000000000 at 0xf0d00000
S3C244X: core 400.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
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: root=/dev/mtdblock3 init=/linuxrc load_ramdisk=0 console=t
irq: clearing pending ext status 00080000
irq: clearing subpending status 00000092
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00500d00, tcnt a2c1, tcfg 0000020f,00000030, usec 00001eb8
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 (3288K code, 312K data, 144K init)
Calibrating delay loop... 199.47 BogoMIPS (lpj=498688)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 288 bytes
NET: Registered protocol family 16
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, 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)
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
JFFS2 version 2.2. (NAND) (SUMMARY) 2001-2006 Red Hat, Inc.
yaffs Jul 3 2011 19:14:41 Installing.
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 40x30
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

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

网站地图

Top