Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Nov 2008 15:30:59 +0100
From:      Lars Engels <lars.engels@0x20.net>
To:        Alexander Motin <mav@FreeBSD.org>
Cc:        freebsd-arm@FreeBSD.org, freebsd-current@freebsd.org, imp@FreeBSD.org, freebsd-mobile@FreeBSD.org
Subject:   Re: RFC: PCI SD host controller driver & mmc/mmcsd modules improvements
Message-ID:  <20081106153059.1sf731434swc84so@0x20.net>
In-Reply-To: <48DEA8E7.2080503@FreeBSD.org>
References:  <48DEA8E7.2080503@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This message is in MIME format and has been PGP signed.

--=_1o14l270yykg
Content-Type: text/plain;
	charset=UTF-8;
	DelSp="Yes";
	format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Quoting Alexander Motin <mav@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 a=
t:
> 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 =20
any SD Card inserted:

sdhci0: <RICOH R5C822 SD> mem 0xe4003000-0xe40030ff irq 19 at device =20
6.3 on pci2
sdhci0: slot 0 uses DMA
sdhci0-slot0: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D REGISTER DUMP =3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
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: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
sdhci0: 1 slot(s) allocated
sdhci0: [ITHREAD]
sdhci0: detached
sdhci0: <RICOH R5C822 SD> mem 0xe4003000-0xe40030ff irq 19 at device =20
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=3D0x080500 card=3D0x30c3103c chip=3D0x08221180=
 =20
rev=3D0x20 hdr=3D0x00
     vendor     =3D 'Ricoh Company, Ltd.'
     device     =3D 'R5C832, R5C843 SDA Standard Compliant SD Host Controlle=
r'
     class      =3D base peripheral
none2@pci0:2:6:4:       class=3D0x088000 card=3D0x30c3103c chip=3D0x08431180=
 =20
rev=3D0x10 hdr=3D0x00
     vendor     =3D 'Ricoh Company, Ltd.'
     device     =3D 'unknown Ricoh MMC Host Controller'
     class      =3D base peripheral
none3@pci0:2:6:5:       class=3D0x088000 card=3D0x30c3103c chip=3D0x05921180=
 =20
rev=3D0x10 hdr=3D0x00
     vendor     =3D 'Ricoh Company, Ltd.'
     device     =3D '13871043 Ricoh Memory Stick Host Controller'
     class      =3D base peripheral
none4@pci0:2:6:6:       class=3D0x088000 card=3D0x30c3103c chip=3D0x08521180=
 =20
rev=3D0x10 hdr=3D0x00
     vendor     =3D 'Ricoh Company, Ltd.'
     device     =3D 'unknown Ricoh xD-Picture Card Host Controller'
     class      =3D base peripheral


Lars



--=_1o14l270yykg
Content-Type: application/pgp-signature
Content-Description: Digitale PGP-Unterschrift
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

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

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

--=_1o14l270yykg--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081106153059.1sf731434swc84so>