From owner-freebsd-arm@FreeBSD.ORG Sat Sep 27 21:43:08 2008 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E57261065688; Sat, 27 Sep 2008 21:43:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id E48138FC08; Sat, 27 Sep 2008 21:43:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from [212.86.226.226] (account mav@alkar.net HELO mavbook.mavhome.dp.ua) by cmail.optima.ua (CommuniGate Pro SMTP 5.1.14) with ESMTPSA id 222571166; Sat, 27 Sep 2008 23:43:05 +0300 Message-ID: <48DEA8E7.2080503@FreeBSD.org> Date: Sun, 28 Sep 2008 00:43:03 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.16 (X11/20080726) MIME-Version: 1.0 To: freebsd-arm@FreeBSD.org, freebsd-mobile@FreeBSD.org, freebsd-current@freebsd.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: imp@FreeBSD.org Subject: RFC: PCI SD host controller driver & mmc/mmcsd modules improvements X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Sep 2008 21:43:09 -0000 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. -- Alexander Motin