Quoting Alexander Motin :

> Hi.
>
> 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. With some
> limitations it successfully works on my Acer TM6292 notebook with ENE
> CB714 card reader.
>
> Things that are working now:
> - PIO mode single and multiple block read and write,
> - 1 and 4 bits bus width support.
>
> In PIO mode with 4GB SD card on 30MHz 4bit bus I have reached about
> 3.5MB/s (limited by CPU) linear read and 7MB/s (limited by card) linear
> write. Small blocks read/write performance limited by card.
>
> Things that are not working yet:
> - DMA modes (code is written, but as my controller looks like has
> broken DMA I have no ability to debug it),
> - card insert/remove detection (need more thinking), you should reload
> mmc module to rescan cards,
> - SDHC and MMC cards (have no such cards now to debug that code), only
> standard capacity SD Memory cards up to 4GB size are supported now,
> - high speed (double rate) bus mode (need more thinking and DMA support).
>
> Also to get such results I have improved existing mmc and mmcsd drivers
> a bit. mmc driver got:
> - 4 bit bus width support,
> - write protection switch support,
> - cards with more then 2GB capacity support.
> mmcsd driver got:
> - multiple block read and write support,
> - cards with more then 2GB capacity support,
> - I/O error reporting,
> - write protection switch support.
>
> Latest patches against 8-CURRENT (should also fit 7-STABLE) may be found at:
> http://people.freebsd.org/~mav/sdhci/
>
> I will be grateful for any feedbacks, comments and support.


Hi Alexander,

I just tried your latest version of mmc + sdhci but it does not detect
any SD Card inserted:

sdhci0: mem 0xe4003000-0xe40030ff irq 19 at device
6.3 on pci2
sdhci0: slot 0 uses DMA
sdhci0-slot0: ============== REGISTER DUMP ==============
sdhci0-slot0: Sys addr: 0x00000000 | Version: 0x00000400
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: 0x018021a1 | Max curr: 0x00000040
sdhci0-slot0: ===========================================
sdhci0: 1 slot(s) allocated
sdhci0: [ITHREAD]
sdhci0: detached
sdhci0: mem 0xe4003000-0xe40030ff irq 19 at device
6.3 on pci2
sdhci0: 1 slot(s) allocated
sdhci0: [ITHREAD]

Nothing happens when I insert a card.

The hardware is:
sdhci0@pci0:2:6:3: class=0x080500 card=0x30c3103c chip=0x08221180
rev=0x20 hdr=0x00
vendor = 'Ricoh Company, Ltd.'
device = 'R5C832, R5C843 SDA Standard Compliant SD Host Controller'
class = base peripheral
none2@pci0:2:6:4: class=0x088000 card=0x30c3103c chip=0x08431180
rev=0x10 hdr=0x00
vendor = 'Ricoh Company, Ltd.'
device = 'unknown Ricoh MMC Host Controller'
class = base peripheral
none3@pci0:2:6:5: class=0x088000 card=0x30c3103c chip=0x05921180
rev=0x10 hdr=0x00
vendor = 'Ricoh Company, Ltd.'
device = '13871043 Ricoh Memory Stick Host Controller'
class = base peripheral
none4@pci0:2:6:6: class=0x088000 card=0x30c3103c chip=0x08521180
rev=0x10 hdr=0x00
vendor = 'Ricoh Company, Ltd.'
device = 'unknown Ricoh xD-Picture Card Host Controller'
class = base peripheral


Lars



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)

iEYEABECAAYFAkkS/6MACgkQKc512sD3afjMtACgtoApDRRDZ+u83KFAsvS7u3gg
HDEAoMHxVc13zyUaEzDh6M5CCtgAeVtZ
=EU65
-----END PGP SIGNATURE-----