From owner-freebsd-mobile@FreeBSD.ORG Sun Oct 12 11:08:44 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 0E53B106571A for ; Sun, 12 Oct 2008 11:08:44 +0000 (UTC) (envelope-from henry.hu.sh@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by mx1.freebsd.org (Postfix) with ESMTP id 889A18FC15 for ; Sun, 12 Oct 2008 11:08:43 +0000 (UTC) (envelope-from henry.hu.sh@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so875940fgb.35 for ; Sun, 12 Oct 2008 04:08:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=vtgdh00wyJ4Fdfb67AREHcC36Uq5+xhxOuVvex/Ag1A=; b=qT/wiEoCWWK2NvDQ5BjVu18Xzgp94qeLnDZiD47ZLUPQrEzYV81UjHY4irHMespUXH ivQ1E8CY17Ol7Ne7tImPcSI/YG4ls9bXGQEh1PzZdxZGPGnkpsPzbwkrg6j17L7oXvaB daECNKgQZtuS/FTQXLT6UW0jmiR3zBVW64cs4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=UT8rvMSdcTVhWxqfs7CXN11xdCS2QGPRJUStos4OBTaJTUCVJe6cHiWjtRCjDP9QM2 IFleDwfpgy33Z3b3U0hHDLFEnngnrKq/VutvvaEkWSxTVyul+n21tWVF3ooUaTOeXpRZ i3+bfpVWFKyAik8Po5bzIAz+cyxUwDtEtePJU= Received: by 10.86.82.6 with SMTP id f6mr3749674fgb.78.1223807949531; Sun, 12 Oct 2008 03:39:09 -0700 (PDT) Received: by 10.86.28.5 with HTTP; Sun, 12 Oct 2008 03:39:09 -0700 (PDT) Message-ID: <53a1e0710810120339g66180c86n239c35bf2abf9467@mail.gmail.com> Date: Sun, 12 Oct 2008 18:39:09 +0800 From: "Henry Hu" To: "Alexander Motin" In-Reply-To: <48F11087.20403@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48DEA8E7.2080503@FreeBSD.org> <48F11087.20403@FreeBSD.org> Cc: 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: Sun, 12 Oct 2008 11:08:44 -0000 Hello, I've tried your driver, and it worked fine at my laptop. I have a Samsung R70, with built-in SD card reader(in fact, it can read many cards, and there are 4 unknown devices related to it).The transfer speed with dd bs=512 is almost 800KB/s, which I think is fairly fast. I'm testing it with a transcend 2G mini SD card, with SD-miniSD adapter. I'm using 7-STABLE, so I changed kproc_create to kthread_create to compile the mmcsd module. There are errors, but the transfer completed normally. System log: sdhci0: mem 0xf0401000-0xf04010ff at device 9.1 on pci5 sdhci0: slot 0 uses DMA sdhci0-slot0: ============== REGISTER DUMP ============== sdhci0-slot0: Sys addr: 0x00000000 | Version: 0x00000200 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: 0x01c021a1 | Max curr: 0x00000040 sdhci0-slot0: =========================================== sdhci0: 1 slot(s) allocated sdhci0: [ITHREAD] sdhci0-slot0: Card inserted sdhci0-slot0: Card removed sdhci0-slot0: Card inserted mmc0: on sdhci0 sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0) sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0) link_elf: symbol kproc_create undefined link_elf: symbol kproc_create undefined sdhci0-slot0: Card removed mmc0: detached sdhci0-slot0: Card inserted mmc0: on sdhci0 sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0) sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0) link_elf: symbol kproc_create undefined sdhci0-slot0: Card removed mmc0: detached sdhci0-slot0: Card inserted mmc0: on sdhci0 sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0) sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0) sdhci0-slot0: Card removed mmc0: detached link_elf: symbol kproc_create undefined sdhci0-slot0: Card inserted mmc0: on sdhci0 sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0) sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0) mmcsd0: 1950MB at mmc0 16MHz/4bit GEOM_LABEL: Label for provider mmcsd0 is msdosfs/USBFDD-BOOT. GEOM_LABEL: Label msdosfs/USBFDD-BOOT removed. GEOM_LABEL: Label for provider mmcsd0 is msdosfs/USBFDD-BOOT. sdhci0-slot0: Card removed mmcsd0: detached mmc0: detached GEOM_LABEL: Label msdosfs/USBFDD-BOOT removed. Also thanks to your new UAA driver! Good work! Regards, Henry 2008/10/12 Alexander Motin : > Alexander Motin wrote: >> >> 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. >> Latest patches against 8-CURRENT (mostly fit 7-STABLE) may be found at: >> http://people.freebsd.org/~mav/sdhci/ > > For those who are not tracking actively, I would like to report that most of > original driver's child illnesses are now healed. > > Driver now supports both PIO and DMA modes. Because of some special tunings > DMA works fine even on almost broken ENE chips. I am reaching 15MB/s > transfer (maximum for my controller's bus) with only about 1% of CPU load. > Implemented 4 bits bus width and high speed timing modes support for high > data rates up to 52MHz. Cards hot insertion/removing is now working. > Together with in-tree mmc/mmcsd drivers improvements most of card types (SD, > SDHC, standard and high capacity MMC) are now supported. > > -- > Alexander Motin > _______________________________________________ > freebsd-mobile@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mobile > To unsubscribe, send any mail to "freebsd-mobile-unsubscribe@freebsd.org" >