RFC: PCI SD host controller driver & mmc/mmcsd modules
improvements
Henry Hu
henry.hu.sh at gmail.com
Sun Oct 12 11:08:44 UTC 2008
Hello,
I've tried your driver, and it worked fine at my laptop.
I have a Samsung R70, with built-in SD card reader(in fact, it can
read many cards, and there are 4 unknown devices related to it).The
transfer speed with dd bs=512 is almost 800KB/s, which I think is
fairly fast.
I'm testing it with a transcend 2G mini SD card, with SD-miniSD adapter.
I'm using 7-STABLE, so I changed kproc_create to kthread_create to
compile the mmcsd module.
There are errors, but the transfer completed normally.
System log:
sdhci0: <RICOH R5C822 SD> mem 0xf0401000-0xf04010ff at device 9.1 on pci5
sdhci0: slot 0 uses DMA
sdhci0-slot0: ============== REGISTER DUMP ==============
sdhci0-slot0: Sys addr: 0x00000000 | Version: 0x00000200
sdhci0-slot0: Blk size: 0x00000000 | Blk cnt: 0x00000000
sdhci0-slot0: Argument: 0x00000000 | Trn mode: 0x00000000
sdhci0-slot0: Present: 0x01f20000 | Host ctl: 0x00000000
sdhci0-slot0: Power: 0x00000000 | Blk gap: 0x00000000
sdhci0-slot0: Wake-up: 0x00000000 | Clock: 0x00000000
sdhci0-slot0: Timeout: 0x00000000 | Int stat: 0x00000000
sdhci0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb
sdhci0-slot0: AC12 err: 0x00000000 | Slot int: 0x00000000
sdhci0-slot0: Caps: 0x01c021a1 | Max curr: 0x00000040
sdhci0-slot0: ===========================================
sdhci0: 1 slot(s) allocated
sdhci0: [ITHREAD]
sdhci0-slot0: Card inserted
sdhci0-slot0: Card removed
sdhci0-slot0: Card inserted
mmc0: <MMC/SD bus> on sdhci0
sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0)
sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0)
link_elf: symbol kproc_create undefined
link_elf: symbol kproc_create undefined
sdhci0-slot0: Card removed
mmc0: detached
sdhci0-slot0: Card inserted
mmc0: <MMC/SD bus> on sdhci0
sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0)
sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0)
link_elf: symbol kproc_create undefined
sdhci0-slot0: Card removed
mmc0: detached
sdhci0-slot0: Card inserted
mmc0: <MMC/SD bus> on sdhci0
sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0)
sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0)
sdhci0-slot0: Card removed
mmc0: detached
link_elf: symbol kproc_create undefined
sdhci0-slot0: Card inserted
mmc0: <MMC/SD bus> on sdhci0
sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0)
sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0)
mmcsd0: 1950MB <SD Memory Card> at mmc0 16MHz/4bit
GEOM_LABEL: Label for provider mmcsd0 is msdosfs/USBFDD-BOOT.
GEOM_LABEL: Label msdosfs/USBFDD-BOOT removed.
GEOM_LABEL: Label for provider mmcsd0 is msdosfs/USBFDD-BOOT.
sdhci0-slot0: Card removed
mmcsd0: detached
mmc0: detached
GEOM_LABEL: Label msdosfs/USBFDD-BOOT removed.
Also thanks to your new UAA driver! Good work!
Regards,
Henry
2008/10/12 Alexander Motin <mav at freebsd.org>:
> Alexander Motin wrote:
>>
>> I would like to present initial revision of my generic PCI SD Host
>> Controller driver (sdhci). It support PCI devices with class 8 and subclass
>> 5 according to SD Host Controller Specification.
>> Latest patches against 8-CURRENT (mostly fit 7-STABLE) may be found at:
>> http://people.freebsd.org/~mav/sdhci/
>
> For those who are not tracking actively, I would like to report that most of
> original driver's child illnesses are now healed.
>
> Driver now supports both PIO and DMA modes. Because of some special tunings
> DMA works fine even on almost broken ENE chips. I am reaching 15MB/s
> transfer (maximum for my controller's bus) with only about 1% of CPU load.
> Implemented 4 bits bus width and high speed timing modes support for high
> data rates up to 52MHz. Cards hot insertion/removing is now working.
> Together with in-tree mmc/mmcsd drivers improvements most of card types (SD,
> SDHC, standard and high capacity MMC) are now supported.
>
> --
> Alexander Motin
> _______________________________________________
> freebsd-mobile at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-mobile
> To unsubscribe, send any mail to "freebsd-mobile-unsubscribe at freebsd.org"
>
More information about the freebsd-mobile
mailing list