Re: RFC: PCI SD host controller driver & mmc/mmcsd modules improvements

From: Lars Engels <lars.engels_at_0x20.net>
Date: Thu, 06 Nov 2008 15:30:59 +0100
Quoting Alexander Motin <mav_at_FreeBSD.org>:

> 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: <RICOH R5C822 SD> 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: <RICOH R5C822 SD> 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_at_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_at_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_at_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_at_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



Received on Thu Nov 06 2008 - 13:31:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:37 UTC