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

linux2.6.21下的I2C驱动问题
请各位大侠不吝赐教!
  使用linux2.6.21内核,打了arm9的补丁,芯片使用ATRM9200,实时时钟芯片使用ds1307,现在想使用arm9的i2c总线驱动ds1307,在内核中选择了i2c驱动支持。并在rtc下选择了ds1307。现在可以肯定的是我的硬件电路肯定没有问题,因为我有一个原来的2.4内核的驱动,读写ds1307一点问题没有。我现在升级到2.6内核之后打印信息如下
U-Boot 1.1.1 (Aug 3 2005 - 14:31:02)

U-Boot code: 21F00000 -> 21F15C30 BSS: -> 21F19F84
RAM Configuration:
Bank #0: 20000000 32 MB
Flash: 16 MB
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 2  1  0 
## Starting application at 0x21000000 ...
Uncompressing Linux.............................................................................. done, booting the kernel.
Linux version 2.6.21.3 (root@seawolf) (gcc version 3.4.1) #110 Mon Mar 22 16:39:30 CST 2010
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: Atmel AT91RM9200-DK
Warning: bad configuration page, trying to continue
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 179 MHz, master 59 MHz, main 18.432 MHz
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: 8128
Kernel command line: mem=32M console=ttyS0,115200 initrd=0x211A0000,6000000 root=/dev/ram0 rw
AT91: 128 gpio irqs in 4 banks
PID hash table entries: 128 (order: 7, 512 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 24096KB available (2192K code, 188K data, 100K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
init i2c at91 TWI
AT91: Power Management
Generic PHY: Registered new driver
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 5859K
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
JFFS2: default compression mode: priority
io scheduler noop registered
io scheduler anticipatory registered (default)
Epson S1D13XXX FB Driver
s1d13xxxfb: chip not found: 20
Non-volatile memory driver v1.2
AT91 Watchdog Timer enabled (5 seconds, nowayout)
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xfffc0000 (irq = 6) is a ATMEL_SERIAL
atmel_usart.2: ttyS2 at MMIO 0xfffc4000 (irq = 7) is a ATMEL_SERIAL
atmel_usart.3: ttyS3 at MMIO 0xfffc8000 (irq = 8) is a ATMEL_SERIAL
atmel_usart.4: ttyS4 at MMIO 0xfffcc000 (irq = 9) is a ATMEL_SERIAL
RAMDISK driver initialized: 16 RAM disks of 15360K size 1024 blocksize
at91 id is 2250256 
eth0: Link down.
eth0: AT91 ethernet at 0xfefbc000 int=24 10-HalfDuplex (00:01:03:05:18:22)
eth0: Altima AC101L PHY
INTEL-MTD probing 16bit FLASH
Intel Flash Jffs2 Device: Found 1 x16 devices at 0x0 in 16-bit bank
 Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
Using builtin partition table
Creating 5 MTD partitions on "Intel Flash Jffs2 Device":
0x00000000-0x00020000 : "reserved for bootloader"
mtd: Giving out device 0 to reserved for bootloader
0x00020000-0x001a0000 : "reserved for kernel"
mtd: Giving out device 1 to re