On 22/08/2011 05:37, Steven King wrote: > On Sunday 21 August 2011 07:59:20 Lennart Sorensen wrote: >> On Sun, Aug 21, 2011 at 01:50:30AM +0200, Angelo Dureghello wrote: >>> i would like to try a connected Dallas DS1307 rtc to the i2c bus of a >>> coldfire 5307. I am using a main line kernel 2.6.36.2, but i don't see >>> any "coldfire" i2c bus driver. What driver i should look for ? What >>> kconfig options must be enabled ? >> >> I use a patch for a driver called mcf-i2c for 2.6.29. I have no idea >> if that has ever made it into the kernel proper though. Looking at >> Linus's git tree it seems the answer is no. >> >> This of course assuming the i2c on the 5307 is anything like the i2c on >> the 5270. > > The i2c controller is the same for all the ColdFire parts. In fact, other > than nomenclature, its pretty much the same i2c controller as is used on > the '08 and hc11/12 and although I have not looked closely, I think even the > ppc and iMX. So any of the various i2c drivers for the 2.6 kernel on > coldfire should work (I think there are at least 3), you'll just have to make > sure the addresses for the i2c registers for your part are correct. > >
Hi Steven, i am trying your patch, but seems the /dev device cannot be created correctly: uClinux/COLDFIRE(m5307) COLDFIRE port done by Greg Ungerer, g...@snapgear.com Modified for M5307 by Dave Miller, dmil...@intellistor.com Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne On node 0 totalpages: 4096 free_area_init_node: node 0, pgdat 00197798, node_mem_map 00249000 DMA zone: 32 pages used for memmap DMA zone: 0 pages reserved DMA zone: 4064 pages, LIFO batch:0 Built 1 zonelists in Zone order, mobility grouping off. Total pages: 4064 Kernel command line: root=/dev/mtdblock3 rootfstype=romfs console=ttyS0,115200 init=/bin/init PID hash table entries: 64 (order: -4, 256 bytes) Dentry cache hash table entries: 2048 (order: 1, 8192 bytes) Inode-cache hash table entries: 1024 (order: 0, 4096 bytes) Memory available: 13904k/16384k RAM, (1445k kernel code, 172k data) SLUB: Genslabs=12, HWalign=16, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 Hierarchical RCU implementation. RCU-based detection of stalled CPUs is disabled. Verbose stalled-CPUs detection is disabled. NR_IRQS:256 Calibrating delay loop... 59.18 BogoMIPS (lpj=295936) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 512 NET: Registered protocol family 16 i2c-core: driver [dummy] registered amcore_init(): registering device resources dm9000_pre_init() bio: create slab <bio-0> at 0 Switching to clocksource tmr NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 512 (order: 0, 4096 bytes) TCP bind hash table entries: 512 (order: -1, 2048 bytes) TCP: Hash tables configured (established 512 bind 512) TCP reno registered UDP hash table entries: 256 (order: 0, 4096 bytes) UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc. ROMFS MTD (C) 2007 Red Hat, Inc. msgmni has been set to 27 io scheduler noop registered io scheduler deadline registered io scheduler cfq registered (default) ColdFire internal UART serial driver ttyS0 at MMIO 0x100001c0 (irq = 73) is a ColdFire UART console [ttyS0] enabled ttyS1 at MMIO 0x10000200 (irq = 74) is a ColdFire UART brd: module loaded nbd: registered device at major 43 physmap platform flash device: 00400000 at ffc00000 physmap-flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000bf Chip ID 0x00235d number of CFI chips: 1 cmdlinepart partition parsing not available RedBoot partition parsing not available Using physmap partition information Creating 3 MTD partitions on "physmap-flash": 0x000000000000-0x000000020000 : "U-Boot (128K)" 0x000000020000-0x000000300000 : "Kernel+ROMfs (2994K)" 0x000000300000-0x000000400000 : "JFFS2 (1024K)" uclinux[mtd]: RAM probe address=0x1b4748 size=0x91000 Creating 1 MTD partitions on "RAM": 0x000000000000-0x000000091000 : "ROMfs" Generic platform RAM MTD, (c) 2004 Simtec Electronics dm9000 Ethernet Driver, V1.31 dm9000 dm9000.0: eth%d: Invalid ethernet MAC address. Please set using ifconfig eth0: dm9000e at 30000000,30000004 IRQ 25 MAC: 00:00:00:00:00:00 (chip) i2c-core: driver [rtc-ds1307] registered i2c /dev entries driver i2c-core: driver [dev_driver] registered TCP cubic registered NET: Registered protocol family 17 drivers/rtc/hctosys.c: unable to open rtc device (rtc0) VFS: Mounted root (romfs filesystem) readonly on device 31:3. Freeing unused kernel memory: 52k freed (0x19b000 - 0x1a7000) eth0: link down eth0: link up, 10Mbps, half-duplex, lpa 0x0021 ~ # cd /dev /dev # ls console mtd2 ptyp1 ptypa ram3 ttyp0 ttyp9 cua0 mtd3 ptyp2 ptypb random ttyp1 ttypa cua1 mtdblock0 ptyp3 ptypc tty ttyp2 ttypb flash mtdblock1 ptyp4 ptypd tty0 ttyp3 ttypc ipsec mtdblock2 ptyp5 ptype tty1 ttyp4 ttypd kmem mtdblock3 ptyp6 ptypf tty2 ttyp5 ttype mem null ptyp7 ram0 tty3 ttyp6 ttypf mtd0 ppp ptyp8 ram1 ttyS0 ttyp7 urandom mtd1 ptyp0 ptyp9 ram2 ttyS1 ttyp8 zero /dev # I am trying to figure out the reason. Any help is appreciated, thanks angelo _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev