From owner-freebsd-mobile@FreeBSD.ORG Thu Nov 6 14:31:01 2008 Return-Path: Delivered-To: freebsd-mobile@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E918106567C; Thu, 6 Nov 2008 14:31:01 +0000 (UTC) (envelope-from lars.engels@0x20.net) Received: from mail.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb::3]) by mx1.freebsd.org (Postfix) with ESMTP id 9E31D8FC20; Thu, 6 Nov 2008 14:31:00 +0000 (UTC) (envelope-from lars.engels@0x20.net) Received: from mail.0x20.net (mail.0x20.net [217.69.67.217]) by mail.0x20.net (Postfix) with ESMTP id 4E4D53A66A; Thu, 6 Nov 2008 15:30:59 +0100 (CET) Received: from i011-63.fin-nrw.de (i011-63.fin-nrw.de [193.109.238.130]) by 0x20.net (Horde MIME library) with HTTP; Thu, 06 Nov 2008 15:30:59 +0100 Message-ID: <20081106153059.1sf731434swc84so@0x20.net> X-Priority: 3 (Normal) Date: Thu, 06 Nov 2008 15:30:59 +0100 From: Lars Engels To: Alexander Motin References: <48DEA8E7.2080503@FreeBSD.org> In-Reply-To: <48DEA8E7.2080503@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=_1o14l270yykg"; protocol="application/pgp-signature"; micalg="pgp-sha1" Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.1.3) 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 X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Nov 2008 14:31:01 -0000 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 : > 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: 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: 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--