From owner-freebsd-arm@FreeBSD.ORG Sun Sep 28 06:02:25 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 DD778106568C for ; Sun, 28 Sep 2008 06:02:25 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153]) by mx1.freebsd.org (Postfix) with ESMTP id 6A8328FC13 for ; Sun, 28 Sep 2008 06:02:25 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so1045834fgb.35 for ; Sat, 27 Sep 2008 23:02:24 -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=yZiwt7E1RwQJ/DrOIg481hIMELzwIhQ4VlRrMhq47zA=; b=j5YzFrNILE8XAStPI0LliuKd1lXmGfQu07CIdNQiy13DD3bqdMpfqxcZMg87V31J4u PQRwQyddNZHrOMHkUTzddLBqvKoQj3w0/Huyb4ywXpAw8r/ItPBSvqoJN/j9kr+o6rjO BF/a/Iu7fmOD4peeLn9ejt4WtQIWDTxVVMhtM= 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=tzgZtABKEBP54U+ZRXWki4Uge+gkRR97vn2rVrczGrXDsO9/icI/tLA0G5yVMrWfMW lFDp37wRxeYVYZpYa9KbJ2kmwPOAyv3P55fCVsrzVH2w6ZfU3JPXS/jDjEArDXQpfKte P8zVXDGVhoB1XOOseZS39kDoACZw4B2MXQRV8= Received: by 10.103.206.12 with SMTP id i12mr2498691muq.33.1222580126857; Sat, 27 Sep 2008 22:35:26 -0700 (PDT) Received: by 10.103.231.14 with HTTP; Sat, 27 Sep 2008 22:35:26 -0700 (PDT) Message-ID: Date: Sun, 28 Sep 2008 02:35:26 -0300 From: "Carlos A. M. dos Santos" To: "Oleksandr Tymoshenko" In-Reply-To: <48DEA4EC.3030300@bluezbox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48DEA8E7.2080503@FreeBSD.org> <48DEA4EC.3030300@bluezbox.com> Cc: Alexander Motin , freebsd-current@freebsd.org, imp@freebsd.org, freebsd-arm@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: 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: Sun, 28 Sep 2008 06:02:26 -0000 On Sat, Sep 27, 2008 at 6:26 PM, Oleksandr Tymoshenko wrote: > Alexander Motin wrote: >> >> Hi. > >> >> Latest patches against 8-CURRENT (should also fit 7-STABLE) may be found >> at: >> http://people.freebsd.org/~mav/sdhci/ > > Thanks! That's just what I was looking for about three weeks ago :) >> >> I will be grateful for any feedbacks, comments and support. > > 7.1 requires s/kproc/kthread/ but otherwise works fine: > > sdhci0: mem 0xff9fb800-0xff9fb8ff irq 9 at device 1.2 on > pci2 > sdhci0: 1 slot(s) allocated > sdhci0: [ITHREAD] > > mmc0: on sdhci0 > mmc0: SD card: 507379712 bytes > mmcsd0: 483MB (read-only) at mmc0 > mmc0: setting transfer rate to 30.000MHz > mmc0: setting bus width to 4 bits > GEOM_LABEL: Label for provider mmcsd0s1 is msdosfs/SD. It did not detect the hardware on my Compaq 6910p: none2@pci0:2:6:3: class=0x080500 card=0x30be103c chip=0x08221180 rev=0x20 hdr=0x00 vendor = 'Ricoh Company, Ltd.' device = 'R5C832, R5C843 SDA Standard Compliant SD Host Controller' class = base peripheral none3@pci0:2:6:4: class=0x088000 card=0x30be103c chip=0x08431180 rev=0x10 hdr=0x00 vendor = 'Ricoh Company, Ltd.' device = 'unknown Ricoh MMC Host Controller' class = base peripheral Suggestions are welcome. :-) -- cd /usr/ports/sysutils/life make clean From owner-freebsd-arm@FreeBSD.ORG Sun Sep 28 06:12:28 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 45C271065694 for ; Sun, 28 Sep 2008 06:12:28 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by mx1.freebsd.org (Postfix) with ESMTP id BF9DC8FC25 for ; Sun, 28 Sep 2008 06:12:26 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so1046943fgb.35 for ; Sat, 27 Sep 2008 23:12:25 -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=991V+WFZ1CX6jyaUnhG3r+LO7ZFnmBDRS32bbsYf4JU=; b=E1Ku6v85EzqfssWrnSrjx9xb+E2syeB3clnKxGfEg83NY8/uw04E6/8zTPC3DnQO0O R0OR2Z3plPSsH2LxKge3B/1waia0g5v9FG2qlt19CMtS5OsE0/I8wg1Nm38tjVyvP4Ph yuAjBT9dSpYqsK6FPxDXx5sA8+K68KdVt1NdI= 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=I8eJB/0pCItoeOXCrbchDs7X2BgiNEhPQ8gOWnsL0M7CvI/yt0jjFXKDvQlEcAqPIt jmfY617n4vyy5WRRsXbqbZeDJ99htwxy4pGGoGiy5YZeuUMo4yAll9X5TvwLK7UfORud FVJS3cNr+JLEU+0vj0/8Sgkqolms1d1F/EbZo= Received: by 10.103.199.16 with SMTP id b16mr2536214muq.5.1222582345648; Sat, 27 Sep 2008 23:12:25 -0700 (PDT) Received: by 10.103.231.14 with HTTP; Sat, 27 Sep 2008 23:12:25 -0700 (PDT) Message-ID: Date: Sun, 28 Sep 2008 03:12:25 -0300 From: "Carlos A. M. dos Santos" To: "Oleksandr Tymoshenko" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48DEA8E7.2080503@FreeBSD.org> <48DEA4EC.3030300@bluezbox.com> Cc: Alexander Motin , freebsd-current@freebsd.org, imp@freebsd.org, freebsd-arm@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: 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: Sun, 28 Sep 2008 06:12:28 -0000 On Sun, Sep 28, 2008 at 2:35 AM, Carlos A. M. dos Santos wrote: > On Sat, Sep 27, 2008 at 6:26 PM, Oleksandr Tymoshenko > wrote: >> Alexander Motin wrote: >>> >>> Hi. >> >>> >>> Latest patches against 8-CURRENT (should also fit 7-STABLE) may be found >>> at: >>> http://people.freebsd.org/~mav/sdhci/ >> >> Thanks! That's just what I was looking for about three weeks ago :) >>> >>> I will be grateful for any feedbacks, comments and support. >> >> 7.1 requires s/kproc/kthread/ but otherwise works fine: >> >> sdhci0: mem 0xff9fb800-0xff9fb8ff irq 9 at device 1.2 on >> pci2 >> sdhci0: 1 slot(s) allocated >> sdhci0: [ITHREAD] >> >> mmc0: on sdhci0 >> mmc0: SD card: 507379712 bytes >> mmcsd0: 483MB (read-only) at mmc0 >> mmc0: setting transfer rate to 30.000MHz >> mmc0: setting bus width to 4 bits >> GEOM_LABEL: Label for provider mmcsd0s1 is msdosfs/SD. > > It did not detect the hardware on my Compaq 6910p: > > none2@pci0:2:6:3: class=0x080500 card=0x30be103c chip=0x08221180 > rev=0x20 hdr=0x00 > vendor = 'Ricoh Company, Ltd.' > device = 'R5C832, R5C843 SDA Standard Compliant SD Host Controller' > class = base peripheral > none3@pci0:2:6:4: class=0x088000 card=0x30be103c chip=0x08431180 > rev=0x10 hdr=0x00 > vendor = 'Ricoh Company, Ltd.' > device = 'unknown Ricoh MMC Host Controller' > class = base peripheral > > Suggestions are welcome. :-) Here goes a good suggestion: do not forget to load the module, you dumb ass! Now I got this: sdhci0: mem 0xe4103000-0xe41030ff irq 19 at device 6.3 on pci2 sdhci0: Reserved 0x100 bytes for rid 0x10 type 3 at 0xe4103000 sdhci0: 1 slot(s) allocated sdhci0: [MPSAFE] sdhci0: [ITHREAD] mmc0: on sdhci0 mmc0: Reset 0x6 never completed - 0x6. mmc0: ============== REGISTER DUMP ============== mmc0: Sys addr: 0x00000000 | Version: 0x00000400 mmc0: Blk size: 0x00000000 | Blk cnt: 0x00000000 mmc0: Argument: 0x00000000 | Trn mode: 0x00000000 mmc0: Present: 0x01f20000 | Host ctl: 0x00000000 mmc0: Power: 0x0000000f | Blk gap: 0x00000000 mmc0: Wake-up: 0x00000000 | Clock: 0x00008007 mmc0: Timeout: 0x00000000 | Int stat: 0x00000000 mmc0: Int enab: 0x00ff00fb | Sig enab: 0x00ff00fb mmc0: AC12 err: 0x00000000 | Slot int: 0x00000000 mmc0: Caps: 0x018021a1 | Max curr: 0x00000040 mmc0: =========================================== mmc0: Reset 0x6 never completed - 0x6. mmc0: ============== REGISTER DUMP ============== mmc0: Sys addr: 0x00000000 | Version: 0x00000400 mmc0: Blk size: 0x00000000 | Blk cnt: 0x00000000 mmc0: Argument: 0x00000000 | Trn mode: 0x00000000 mmc0: Present: 0x01f20000 | Host ctl: 0x00000000 mmc0: Power: 0x0000000f | Blk gap: 0x00000000 mmc0: Wake-up: 0x00000000 | Clock: 0x00008007 mmc0: Timeout: 0x00000000 | Int stat: 0x00000000 mmc0: Int enab: 0x00ff00fb | Sig enab: 0x00ff00fb mmc0: AC12 err: 0x00000000 | Slot int: 0x00000000 mmc0: Caps: 0x018021a1 | Max curr: 0x00000040 mmc0: =========================================== mmc0: setting transfer rate to 33.000MHz mmc0: Reset 0x6 never completed - 0x6. mmc0: ============== REGISTER DUMP ============== mmc0: Sys addr: 0x00000000 | Version: 0x00000400 mmc0: Blk size: 0x00000000 | Blk cnt: 0x00000000 mmc0: Argument: 0x00000000 | Trn mode: 0x00000000 mmc0: Present: 0x01f20000 | Host ctl: 0x00000000 mmc0: Power: 0x0000000f | Blk gap: 0x00000000 mmc0: Wake-up: 0x00000000 | Clock: 0x00000007 mmc0: Timeout: 0x00000000 | Int stat: 0x00000000 mmc0: Int enab: 0x00ff00fb | Sig enab: 0x00ff00fb mmc0: AC12 err: 0x00000000 | Slot int: 0x00000000 mmc0: Caps: 0x018021a1 | Max curr: 0x00000040 mmc0: =========================================== Much better. However, I got a system crash and reboot attempting to unload the module. -- cd /usr/ports/sysutils/life make clean From owner-freebsd-arm@FreeBSD.ORG Sun Sep 28 09:30:45 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 A9AC2106568B; Sun, 28 Sep 2008 09:30:45 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 668798FC15; Sun, 28 Sep 2008 09:30:45 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m8S9ScMs062292; Sun, 28 Sep 2008 03:28:38 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 28 Sep 2008 03:29:29 -0600 (MDT) Message-Id: <20080928.032929.-1264103837.imp@bsdimp.com> To: mav@freebsd.org From: "M. Warner Losh" In-Reply-To: <48DEA8E7.2080503@FreeBSD.org> References: <48DEA8E7.2080503@FreeBSD.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org, freebsd-current@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: 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: Sun, 28 Sep 2008 09:30:45 -0000 In message: <48DEA8E7.2080503@FreeBSD.org> Alexander Motin writes: : 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. I'll take a look at the driver and post a code review... Warner From owner-freebsd-arm@FreeBSD.ORG Sun Sep 28 11:01:32 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 51E581065677; Sun, 28 Sep 2008 11:01:32 +0000 (UTC) (envelope-from admin@lissyara.su) Received: from hosting.lissyara.su (hosting.lissyara.su [77.221.149.162]) by mx1.freebsd.org (Postfix) with ESMTP id DC0E28FC08; Sun, 28 Sep 2008 11:01:31 +0000 (UTC) (envelope-from admin@lissyara.su) Received: from [89.178.147.100] (port=52271 helo=acer.lissyara.int.otradno.ru) by hosting.lissyara.su with esmtpa (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KjtXC-000FND-6r; Sun, 28 Sep 2008 14:29:50 +0400 Message-ID: <48DF5C9D.2000702@lissyara.su> Date: Sun, 28 Sep 2008 14:29:49 +0400 From: Alex Keda User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; ru-RU; rv:1.8.1.16) Gecko/20080731 Thunderbird/2.0.0.16 Mnenhy/0.7.5.666 MIME-Version: 1.0 References: <48DEA8E7.2080503@FreeBSD.org> In-Reply-To: <48DEA8E7.2080503@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Description: if spam count > 60 - this is spam X-Spam-Count: 0 X-Spam-Description: if spam count > 60 - this is spam X-Spam-Count: 0 X-Descriptions: powered by www.lissyara.su X-Bounce-ID: hosting.lissyara.su 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-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: Sun, 28 Sep 2008 11:01:32 -0000 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 > at: > http://people.freebsd.org/~mav/sdhci/ > > I will be grateful for any feedbacks, comments and support. > Thanks! It work =) I have Acer Aspire 5101 but, when I attempt unload module - system hangs ========= messages ====== Sep 28 14:25:24 acer kernel: sdhci0: mem 0xd0210800-0xd02108ff irq 23 at device 4.2 on pci6 Sep 28 14:25:24 acer kernel: sdhci0: 1 slot(s) allocated Sep 28 14:25:24 acer kernel: sdhci0: [ITHREAD] Sep 28 14:25:24 acer kernel: mmc0: on sdhci0 Sep 28 14:25:24 acer kernel: mmc0: setting transfer rate to 33.000MHz Sep 28 14:25:24 acer kernel: sdhci1: at device 4.4 on pci6 Sep 28 14:25:24 acer kernel: sdhci1: 1 slot(s) allocated Sep 28 14:25:24 acer kernel: sdhci1: [ITHREAD] Sep 28 14:25:24 acer kernel: mmc1: on sdhci1 Sep 28 14:25:25 acer kernel: mmc1: SD card: 31129600 bytes Sep 28 14:25:25 acer kernel: mmcsd0: 29MB at mmc1 Sep 28 14:25:25 acer kernel: mmc1: setting transfer rate to 30.000MHz Sep 28 14:25:25 acer kernel: mmc1: setting bus width to 4 bits ========== pciconf -lv ============= cbb0@pci0:6:4:0: class=0x060700 card=0x009f1025 chip=0x14121524 rev=0x10 hdr=0x02 vendor = 'ENE Technology Inc' device = 'CB-712/714 CardBus Controller' class = bridge subclass = PCI-CardBus none1@pci0:6:4:1: class=0x050100 card=0x009f1025 chip=0x05301524 rev=0x01 hdr=0x00 vendor = 'ENE Technology Inc' device = 'CB-712/714/810 Memory Stick Card Reader' class = memory subclass = flash sdhci0@pci0:6:4:2: class=0x080501 card=0x009f1025 chip=0x05501524 rev=0x01 hdr=0x00 vendor = 'ENE Technology Inc' device = 'CB-712/714/810 Secure Digital Card Reader' class = base peripheral none2@pci0:6:4:3: class=0x050100 card=0x009f1025 chip=0x05201524 rev=0x01 hdr=0x00 vendor = 'ENE Technology Inc' device = 'PCI SmartMedia / xD Card Reader Controller' class = memory subclass = flash sdhci1@pci0:6:4:4: class=0x050100 card=0x009f1025 chip=0x05511524 rev=0x01 hdr=0x00 vendor = 'ENE Technology Inc' device = 'PCI SD/MMC Card Reader Controller' class = memory subclass = flash acer$ ============ uname -a =========== FreeBSD acer.lissyara.int.otradno.ru 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Sat Sep 27 16:35:08 MSD 2008 lissyara@acer.lissyara.int.otradno.ru:/usr/obj/usr/src/sys/color-console amd64 =========== kldstat ========== acer$ kldstat Id Refs Address Size Name 1 71 0xffffffff80100000 da1698 kernel (/boot/kernel/kernel) 2 2 0xffffffff80ea2000 759b8 sound.ko (/boot/kernel/sound.ko) 3 1 0xffffffff80f18000 21ae0 snd_hda.ko (/boot/kernel/snd_hda.ko) 4 1 0xffffffff80f3a000 2cf0 umodem.ko (/boot/kernel/umodem.ko) 5 1 0xffffffff80f3d000 6360 acpi_video.ko (/boot/kernel/acpi_video.ko) 6 1 0xffffffff80f44000 5538 atapicam.ko (/boot/kernel/atapicam.ko) 7 1 0xffffffff80f4a000 2f58 acpi_aiboost.ko (/boot/kernel/acpi_aiboost.ko) 8 1 0xffffffff80f4d000 3eb8 acpi_dock.ko (/boot/kernel/acpi_dock.ko) 9 1 0xffffffff80f51000 6e20 ng_bt3c.ko (/boot/kernel/ng_bt3c.ko) 10 5 0xffffffff80f58000 15bf8 netgraph.ko (/boot/kernel/netgraph.ko) 11 1 0xffffffff80f6e000 39660 ng_btsocket.ko (/boot/kernel/ng_btsocket.ko) 12 3 0xffffffff80fa8000 2da0 ng_bluetooth.ko (/boot/kernel/ng_bluetooth.ko) 13 1 0xffffffff80fab000 bec8 ng_ubt.ko (/boot/kernel/ng_ubt.ko) 14 1 0xffffffff80fb7000 2938 ubtbcmfw.ko (/boot/kernel/ubtbcmfw.ko) 15 1 0xffffffff80fba000 17890 ng_l2cap.ko (/boot/kernel/ng_l2cap.ko) 16 1 0xffffffff80fd2000 3fc8 iicbb.ko (/boot/kernel/iicbb.ko) 17 2 0xffffffff80fd6000 3f48 iicbus.ko (/boot/kernel/iicbus.ko) 19 1 0xffffffff80ff1000 14db0 tmpfs.ko (/boot/kernel/tmpfs.ko) 20 1 0xffffffff81222000 a48c ipfw.ko (/boot/kernel/ipfw.ko) 21 1 0xffffffff8122d000 b8ba fuse.ko (/usr/local/modules/fuse.ko) 22 1 0xffffffff81239000 3652 vkbd.ko (/boot/kernel/vkbd.ko) 23 1 0xffffffff8123d000 754 rtc.ko (/usr/local/modules/rtc.ko) 24 1 0xffffffff8123e000 1ab19 linux.ko (/boot/kernel/linux.ko) 25 1 0xffffffff81259000 24fd3 radeon.ko (/boot/kernel/radeon.ko) 26 1 0xffffffff8127e000 10341 drm.ko (/boot/kernel/drm.ko) 27 1 0xffffffff8128f000 2a02 mmc.ko (/boot/modules/mmc.ko) 28 1 0xffffffff81292000 b97 mmcsd.ko (/boot/modules/mmcsd.ko) 29 1 0xffffffff81293000 2a28 sdhci.ko (/boot/modules/sdhci.ko) From owner-freebsd-arm@FreeBSD.ORG Sun Sep 28 21:01:01 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 B7504106568F; Sun, 28 Sep 2008 21:01:01 +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 B63058FC15; Sun, 28 Sep 2008 21:01:00 +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 222683818; Mon, 29 Sep 2008 00:01:00 +0300 Message-ID: <48DFFE9A.9070302@FreeBSD.org> Date: Mon, 29 Sep 2008 01:00:58 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.16 (X11/20080726) MIME-Version: 1.0 To: "Carlos A. M. dos Santos" References: <48DEA8E7.2080503@FreeBSD.org> <48DEA4EC.3030300@bluezbox.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org, freebsd-current@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: 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: Sun, 28 Sep 2008 21:01:01 -0000 Carlos A. M. dos Santos wrote: > Here goes a good suggestion: do not forget to load the module, you > dumb ass! Now I got this: > > sdhci0: mem 0xe4103000-0xe41030ff irq 19 at device 6.3 on pci2 > sdhci0: Reserved 0x100 bytes for rid 0x10 type 3 at 0xe4103000 > sdhci0: 1 slot(s) allocated > sdhci0: [MPSAFE] > sdhci0: [ITHREAD] > mmc0: on sdhci0 > mmc0: Reset 0x6 never completed - 0x6. Looks like there is several version of this controller requiring special driver quirks. At least Linux driver includes several. I have implemented some, so you can try to play with them. > Much better. However, I got a system crash and reboot attempting to > unload the module. I have rewritten detach function. PS: Also I have implemented card insert/remove in a way specific for this device via mmc bus attach/detach. Not sure it is the best way for mmc subsystem generally, but it recommended by SD Host controller specification and works for now. -- Alexander Motin