I have tested s3cmci driver with linux 2.6.24-rc5, but failed. s3cmci patch is from : http://svn.openmoko.org/branches/src/target/kernel/2.6.24.x/patches/s3c_mci.patch.<br>When I used linux-2.6.21.3 kernel with related s3cmci patch, the sd card works well.<br><br>The following is my kernel boot messages:<br>Starting kernel ...<br><br>Uncompressing Linux............................................................ done, booting the kernel.<br>Linux version 2.6.24-rc5 (Lonsn@localhost.localdomain) (gcc version 4.0.0 (DENX ELDK 4.1 4.0.0)) #2 Sun Jan 13 17:53:13 CST 8CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177<br>Machine: MOTION2440<br>Memory policy: ECC disabled, Data cache writeback<br>CPU S3C2440A (id 0x32440001)<br>S3C244X: core 304.000 MHz, memory 101.333 MHz, peripheral 50.666 MHz<br>S3C24XX Clocks, (c) 2004 Simtec Electronics<br>CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on<br>CPU0: D VIVT write-back cache<br>CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets<br>CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets<br>Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 6096<br>Kernel command line: root=/dev/ram0 rw console=ttySAC0,115200 initrd=0x30800000,0x400000 mem=24m<br>irq: clearing pending ext status 00110000<br>irq: clearing subpending status 00000003<br>irq: clearing subpending status 00000002<br>PID hash table entries: 128 (order: 7, 512 bytes)<br>timer tcon=00500000, tcnt a4ed, tcfg 00000200,00000000, usec 00001e51<br>Console: colour dummy device 80x30<br>console [ttySAC0] enabled<br>Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)<br>Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)<br>Memory: 24MB = 24MB total<br>Memory: 18256KB available (1632K code, 222K data, 84K init)<br>Mount-cache hash table entries: 512<br>CPU: Testing write buffer coherency: ok<br>S3C2440: Initialising architecture<br>S3C2440: IRQ Support<br>S3C2440: Clock Support, DVS off<br>S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics<br>DMA channel 0 at c2000000, irq 33<br>DMA channel 1 at c2000040, irq 34<br>DMA channel 2 at c2000080, irq 35<br>DMA channel 3 at c20000c0, irq 36<br>checking if image is initramfs...it isn't (no cpio magic); looks like an initrd<br>Freeing initrd memory: 4096K<br>NetWinder Floating Point Emulator V0.97 (double precision)<br>io scheduler noop registered<br>io scheduler anticipatory registered (default)<br>io scheduler deadline registered<br>io scheduler cfq registered<br>Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled<br>s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440<br>s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440<br>RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize<br>loop: module loaded<br>mice: PS/2 mouse device common for all mice<br>S3C24XX RTC, (c) 2004,2006 Simtec Electronics<br>i2c /dev entries driver<br>s3c2440-i2c s3c2440-i2c: slave address 0x10<br>s3c2440-i2c s3c2440-i2c: bus frequency set to 98 KHz<br>s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter<br>S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics<br>s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled<br>s3c2440-sdi s3c2440-sdi: powered down.<br>s3c2440-sdi s3c2440-sdi: initialisation done.<br>drivers/rtc/hctosys.c: unable to open rtc device (rtc0)<br>RAMDISK: Compressed image found at block 0<br>VFS: Mounted root (ext2 filesystem).<br>Freeing init memory: 84K<br>init started: BusyBox v1.5.1 (2007-06-12 15:38:24 CST) multi-call binary<br>starting pid 703, tty '': '/etc/init.d/rcS'<br>Welcome to Motion Detection Board<br>Any question, contact lonsn@163.com<br>starting pid 705, tty '': '/bin/sh'<br>MOTION2440# s3c2440-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz).<br>s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).<br>s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).<br>s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).<br>s3c2440-sdi s3c2440-sdi: CMD[FAIL(-110)] #3 op:CMD5 arg:0x00000000 flags:0x082e1 retries:3 Status:nothing to complete<br>s3c2440-sdi s3c2440-sdi: CMD[FAIL(-110)] #4 op:CMD5 arg:0x00000000 flags:0x082e1 retries:2 Status:nothing to complete<br>s3c2440-sdi s3c2440-sdi: CMD[FAIL(-110)] #5 op:CMD5 arg:0x00000000 flags:0x082e1 retries:1 Status:nothing to complete<br>s3c2440-sdi s3c2440-sdi: CMD[FAIL(-110)] #6 op:CMD5 arg:0x00000000 flags:0x082e1 retries:0 Status:nothing to complete<br>s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).<br>s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).<br>s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).<br>s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).<br>s3c2440-sdi s3c2440-sdi: running at 16888kHz (requested: 25000kHz).<br>mmc0: new SD card at address e624<br>mmcblk0: mmc0:e624 SD02G 1985024KiB<br> mmcblk0:&lt;7&gt;mmc0: starting CMD18 arg 00000000 flags 000000b5<br>Unable to handle kernel paging request at virtual address c1800000<br>pgd = c0c60000<br>[c1800000] *pgd=00000000<br>Internal error: Oops: 805 [#1]<br>Modules linked in:<br>CPU: 0    Not tainted  (2.6.24-rc5 #2)<br>PC is at pio_tasklet+0x2f8/0x880<br>LR is at 0x1<br>pc : [&lt;c01423dc&gt;]    lr : [&lt;00000001&gt;]    psr: 20000013<br>sp : c01b7ecc  ip : 00000001  fp : c01b7ef0<br>r10: 3001a43c  r9 : 41129200  r8 : 3001a470<br>r7 : 00000000  r6 : 0000000a  r5 : c144d9a0  r4 : c2600040<br>r3 : c1800000  r2 : 00000000  r1 : c1450044  r0 : c144c000<br>Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel<br>Control: c000717f  Table: 30c60000  DAC: 00000017<br>Process swapper (pid: 0, stack limit = 0xc01b6258)<br>Stack: (0xc01b7ecc to 0xc01b8000)<br>7ec0:                            00000025 c0d22fc0 00000000 c01de8c8 0000000a<br>7ee0: 00000000 c01b7f04 c01b7ef4 c003b628 c01420f4 00000001 c01b7f20 c01b7f08<br>7f00: c003b97c c003b5b8 c01c1fe4 00000025 c01ea934 c01b7f30 c01b7f24 c003ba30<br>7f20: c003b930 c01b7f50 c01b7f34 c001d048 c003b9fc ffffffff f4000000 00200000<br>7f40: c01b9ba0 c01b7fa8 c01b7f54 c001da44 c001d010 c1449e20 f410000c 00000000<br>7f60: 60000013 c001edbc c01b6000 c001bf2c c01b9ba0 3001a470 41129200 3001a43c<br>7f80: c01b7fa8 c01b7f9c c01b7f9c c001ee1c c001ee28 60000013 ffffffff c01b7fc0<br>7fa0: c01b7fac c001ec80 c001edcc c01e11fc c01cce6c c01b7fd0 c01b7fc4 c0142c8c<br>7fc0: c001ec54 c01b7ff4 c01b7fd4 c0008b04 c0142c4c c0008470 c001bf2c c0007175<br>7fe0: c01cd2f0 c001bf24 00000000 c01b7ff8 30008034 c00088a4 00000000 00000000<br>Backtrace:<br>[&lt;c01420e4&gt;] (pio_tasklet+0x0/0x880) from [&lt;c003b628&gt;] (tasklet_action+0x80/0xdc)<br> r7:00000000 r6:0000000a r5:c01de8c8 r4:00000000<br>[&lt;c003b5a8&gt;] (tasklet_action+0x0/0xdc) from [&lt;c003b97c&gt;] (__do_softirq+0x5c/0xcc)<br> r4:00000001<br>[&lt;c003b920&gt;] (__do_softirq+0x0/0xcc) from [&lt;c003ba30&gt;] (irq_exit+0x44/0x4c)<br> r6:c01ea934 r5:00000025 r4:c01c1fe4<br>[&lt;c003b9ec&gt;] (irq_exit+0x0/0x4c) from [&lt;c001d048&gt;] (asm_do_IRQ+0x48/0x5c)<br>[&lt;c001d000&gt;] (asm_do_IRQ+0x0/0x5c) from [&lt;c001da44&gt;] (__irq_svc+0x24/0xa0)<br>Exception stack(0xc01b7f54 to 0xc01b7f9c)<br>7f40:                                              c1449e20 f410000c 00000000<br>7f60: 60000013 c001edbc c01b6000 c001bf2c c01b9ba0 3001a470 41129200 3001a43c<br>7f80: c01b7fa8 c01b7f9c c01b7f9c c001ee1c c001ee28 60000013 ffffffff<br> r7:c01b9ba0 r6:00200000 r5:f4000000 r4:ffffffff<br>[&lt;c001edbc&gt;] (default_idle+0x0/0x78) from [&lt;c001ec80&gt;] (cpu_idle+0x3c/0x58)<br>[&lt;c001ec44&gt;] (cpu_idle+0x0/0x58) from [&lt;c0142c8c&gt;] (rest_init+0x50/0x60)<br> r5:c01cce6c r4:c01e11fc<br>[&lt;c0142c3c&gt;] (rest_init+0x0/0x60) from [&lt;c0008b04&gt;] (start_kernel+0x270/0x2dc)<br>[&lt;c0008894&gt;] (start_kernel+0x0/0x2dc) from [&lt;30008034&gt;] (0x30008034)<br>Code: e5953040 e5952014 e7d22003 e5953068 (e4c32001)<br>Kernel panic - not syncing: Fatal exception in interrupt<br><br><br>    在2008-01-12,"Harald Welte" &lt;laforge@openmoko.org&gt; 写道: On Wed, Jan 09, 2008 at 10:16:01PM +0800, Lonsn wrote:<br>&gt; Hi:<br>&gt; I'm now using s3cmci patch(http://svnweb.openmoko.org/branches/src/target/kernel/2.6.21.x/patches/s3c_mci.patch?rev=2805&amp;view=auto) and it works well. The SD card write speed is about 26Mbits/s(S3C2440A 400MHz, Sandisk UltraIII 2GB sd card).<br>&gt; But the CPU load is too heavy(80%). So I want to let s3cmci driver work in DMA mode. I changed host-&gt;dodma = 1;<br><br><br>&gt; But it doesn't work and the driver cann't detect the sd card. Does<br>&gt; anyone use the s3cmci driver in DMA mode successfully?<br><br>I don't think anyone has used it with DMA in a long time (probably no<br>later than 2.6.14 or even 2.6.10).  There have been DMA API changes that<br>might not be reflected in the driver.<br><br>I strongly recommend you use the driver that is present in the 2.6.24.x<br>branch of the openmoko svn (which is also what has been submitted to<br>linux-arm-kernel some weeks back).<br><br>&gt; Another question: Can sd card work speed be more than 25MHz? As I<br>&gt; know, the maximum sdi clock of S3C2440A is 33MHz(APB clock=67MHz,<br>&gt; prescaler value=1) and UltraIII sd card can support 40MHz<br>&gt; frequency(20MBytes/s). If we can let s3cmci driver works in 33MHz<br>&gt; modes, maybe the sd card IO performance could be increased a lot. But<br>&gt; the sdi clock works only 22.5MHz(prescaler value=2) mode now.<br><br>I don't think anyone has tried this yet.<br><br>-- <br>- Harald Welte &lt;laforge@openmoko.org&gt;                          http://openmoko.org/<br>============================================================================<br>Software for the world's first truly open Free Software mobile phone<br><br><!-- footer --><br><hr>
<a style="font-size:14px;line-height:15px; color:#000; text-decoration:none" href="http://event.mail.163.com/chanel/click.htm?from=NO_25&domain=163" target="_blank"><span style="text-decoration:underline; color:blue">网 易 有 道 词 典 -- 全 球 最 强 大 的 免 费 英 汉 互 译 词 典 ( 只 有 2 兆 )</span> </a>