From owner-freebsd-arm@FreeBSD.ORG Sun Oct 12 13:12:14 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 115D81065697; Sun, 12 Oct 2008 13:12:14 +0000 (UTC) (envelope-from webmaster@kibab.com) Received: from smtp.ht-systems.ru (mr0.ht-systems.ru [78.110.50.55]) by mx1.freebsd.org (Postfix) with ESMTP id E1FF78FC08; Sun, 12 Oct 2008 13:12:12 +0000 (UTC) (envelope-from webmaster@kibab.com) Received: from [83.237.171.239] (helo=kibab-nb) by smtp.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1Kp0jy-0006zC-Ev; Sun, 12 Oct 2008 17:12:10 +0400 Date: Sun, 12 Oct 2008 17:12:01 +0400 From: Ilya Bakulin To: Ilya Bakulin Message-Id: <20081012171201.da4da754.webmaster@kibab.com> In-Reply-To: <20081008113848.c9b44354.webmaster@kibab.com> References: <48DEA8E7.2080503@FreeBSD.org> <5f67a8c40810052226k3070a11ah463a819c677f6307@mail.gmail.com> <20081008113848.c9b44354.webmaster@kibab.com> Organization: HT-Systems X-Mailer: Sylpheed 2.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Sun__12_Oct_2008_17_12_01_+0400_0_zhgMgXDi6X6+dB" Cc: Alexander Motin , freebsd-mobile@freebsd.org, freebsd-arm@freebsd.org, freebsd-current@freebsd.org, Zaphod Beeblebrox , imp@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, 12 Oct 2008 13:12:14 -0000 --Signature=_Sun__12_Oct_2008_17_12_01_+0400_0_zhgMgXDi6X6+dB Content-Type: multipart/mixed; boundary="Multipart=_Sun__12_Oct_2008_17_12_01_+0400_e1mHiLotC0w.aU4r" --Multipart=_Sun__12_Oct_2008_17_12_01_+0400_e1mHiLotC0w.aU4r Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, 8 Oct 2008 11:38:48 +0400 Ilya Bakulin wrote: > I have another SD card, 2 Gb size, in my camera. It's from Kingston. It d= oesn't work: >=20 > sdhci0-slot0: Card inserted > mmc0: on sdhci0 > sdhci0-slot0: Command error 1 (opcode 2 arg 0 flags 103 dlen 0 dflags 0) > mmc0: setting transfer rate to 50.000MHz >=20 > ... and no new storage devices appear. Problem was solved by increasing the number of answer read attempts in mmc_= send_app_op_cond(). With attached patch (against latest driver version) car= d is recognized properly on ~ 190th attempt (while in original driver there= are only 100 attempts). Output from dmesg now: sdhci0-slot0: Card inserted mmc0: on sdhci0 sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0) mmc_send_app_ocond(): cmd completed in 0 iter sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0) mmc_send_app_ocond(): cmd completed in 195 iter mmcsd0: 1964MB at mmc0 50MHz/4bit GEOM_LABEL: Label for provider mmcsd0s1 is msdosfs/KODAK. Furthermore, non-mine SDHC card is now also recognized in this cardreader (= it doesn't even under Windows). In this case, it takes about 400 attempts t= o read answer. --=20 Ilya Bakulin --Multipart=_Sun__12_Oct_2008_17_12_01_+0400_e1mHiLotC0w.aU4r Content-Type: text/x-diff; name="mmc_c_inc_attempts.diff" Content-Disposition: attachment; filename="mmc_c_inc_attempts.diff" Content-Transfer-Encoding: quoted-printable --- mmc.c~ 2008-10-11 21:30:40.000000000 +0400 +++ mmc.c 2008-10-12 13:34:32.000000000 +0400 @@ -428,7 +428,7 @@ cmd.flags =3D MMC_RSP_R3 | MMC_CMD_BCR; cmd.data =3D NULL; =20 - for (i =3D 0; i < 100; i++) { + for (i =3D 0; i < 1000; i++) { err =3D mmc_wait_for_app_cmd(sc, 0, &cmd, CMD_RETRIES); if (err !=3D MMC_ERR_NONE) break; @@ -438,8 +438,9 @@ err =3D MMC_ERR_TIMEOUT; mmc_ms_delay(10); } + printf("mmc_send_app_ocond(): cmd completed in %d iter\n", i); if (rocr && err =3D=3D MMC_ERR_NONE) - *rocr =3D cmd.resp[0]; + *rocr =3D cmd.resp[0]; return (err); } =20 --Multipart=_Sun__12_Oct_2008_17_12_01_+0400_e1mHiLotC0w.aU4r-- --Signature=_Sun__12_Oct_2008_17_12_01_+0400_0_zhgMgXDi6X6+dB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkjx96kACgkQo9vlj1oadwjF5gCgnVPkD6m95Cc+DsnlE934e7eL dSgAoNXvcx8U33ZXrTVrTlDqrqqynBUg =RaPu -----END PGP SIGNATURE----- --Signature=_Sun__12_Oct_2008_17_12_01_+0400_0_zhgMgXDi6X6+dB-- From owner-freebsd-arm@FreeBSD.ORG Mon Oct 13 17:04:00 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 BF63510656A2; Mon, 13 Oct 2008 17:04:00 +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 5EF4C8FC19; Mon, 13 Oct 2008 17:04:00 +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 m9DH29jV043173; Mon, 13 Oct 2008 11:02:10 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 13 Oct 2008 11:03:10 -0600 (MDT) Message-Id: <20081013.110310.-1622595361.imp@bsdimp.com> To: webmaster@kibab.com From: "M. Warner Losh" In-Reply-To: <20081012171201.da4da754.webmaster@kibab.com> References: <5f67a8c40810052226k3070a11ah463a819c677f6307@mail.gmail.com> <20081008113848.c9b44354.webmaster@kibab.com> <20081012171201.da4da754.webmaster@kibab.com> 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: zbeeble@gmail.com, mav@freebsd.org, freebsd-current@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: Mon, 13 Oct 2008 17:04:01 -0000 In message: <20081012171201.da4da754.webmaster@kibab.com> Ilya Bakulin writes: : On Wed, 8 Oct 2008 11:38:48 +0400 : Ilya Bakulin wrote: : : > I have another SD card, 2 Gb size, in my camera. It's from Kingston. It doesn't work: : > : > sdhci0-slot0: Card inserted : > mmc0: on sdhci0 : > sdhci0-slot0: Command error 1 (opcode 2 arg 0 flags 103 dlen 0 dflags 0) : > mmc0: setting transfer rate to 50.000MHz : > : > ... and no new storage devices appear. : : Problem was solved by increasing the number of answer read attempts in mmc_send_app_op_cond(). With attached patch (against latest driver version) card is recognized properly on ~ 190th attempt (while in original driver there are only 100 attempts). : : Output from dmesg now: : sdhci0-slot0: Card inserted : mmc0: on sdhci0 : sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0) : mmc_send_app_ocond(): cmd completed in 0 iter : sdhci0-slot0: Command error 1 (opcode 8 arg 426 flags 101 dlen 0 dflags 0) : mmc_send_app_ocond(): cmd completed in 195 iter : mmcsd0: 1964MB at mmc0 50MHz/4bit : GEOM_LABEL: Label for provider mmcsd0s1 is msdosfs/KODAK. : : Furthermore, non-mine SDHC card is now also recognized in this cardreader (it doesn't even under Windows). In this case, it takes about 400 attempts to read answer. I think I bumped the number of iterations to 100 when I found that 10 wasn't enough. 25 different cards worked just fine, but I got use of a 16MB SD card at BSDcan that needed like 65. Bumping it from 100 to 1000, however, makes the timeout go from 1s to 10s. That opens up window for insertion races, but that's the only downside I see... Of course, we want to fix those races, but this may expose them a little more.. I can't believe that you had a card that took 4s to become active! Can you confirm the elapsed time is really 4s for that card? Otherwise, this may be pointing out a bug in another area of the code... Warner From owner-freebsd-arm@FreeBSD.ORG Tue Oct 14 01:39: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 6B1771065695 for ; Tue, 14 Oct 2008 01:39:08 +0000 (UTC) (envelope-from vibarus@googlemail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.245]) by mx1.freebsd.org (Postfix) with ESMTP id 2140F8FC0A for ; Tue, 14 Oct 2008 01:39:07 +0000 (UTC) (envelope-from vibarus@googlemail.com) Received: by an-out-0708.google.com with SMTP id b33so167118ana.13 for ; Mon, 13 Oct 2008 18:39:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:subject :cc:in-reply-to:mime-version:content-type:content-transfer-encoding :content-disposition:references; bh=0jnOVWe5UeZoGlrPG+r5WpdoIXpp0gdHW6n/n86uLBM=; b=jhybafL2hdzJBdi4/6azJmPj8hqWRzpV49MSxcQ8lUaaeHRiYYGkWBqOZZSHycnk9Q YXUd+4X2XcGO/78ObVootPSkRrcHxB2M7gUzWUYJjt0gTxtwe8VWCqle/OdcAe1xA37Q q5Fll7qIypOMluP0+b3CHKEa3yi6weOUlPAWo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=q4fO14LUyyVauwMqFAnZUEsIy2vCCcJu7rb/vrN8dC+GOpMPU9UDitlzFHDXs7dqNh qzulTOwfLu1aoxOljytbiT+BczoEyXYkpYONxXm38GkSbDsn/pqr+eSK9/zu1vBd1v6a 2Sl7xZp+IgqQ7cXQaE5/pqjsLwgRpllgDm7Co= Received: by 10.100.216.12 with SMTP id o12mr6707721ang.92.1223946836947; Mon, 13 Oct 2008 18:13:56 -0700 (PDT) Received: by 10.100.206.12 with HTTP; Mon, 13 Oct 2008 18:13:56 -0700 (PDT) Message-ID: Date: Tue, 14 Oct 2008 03:13:56 +0200 From: "Vincent Barus" Cc: freebsd-arm@freebsd.org In-Reply-To: <48DA31B3.5040906@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48DA31B3.5040906@semihalf.com> Subject: Re: FreeBSD/arm support for Marvell chips -- please review 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: Tue, 14 Oct 2008 01:39:08 -0000 Hi, nice progress. Maybe someday there's a way to get a stripped down FreeBSD working on a d-link dns-323 (http://wiki.dns323.info/ ) ? It's a 88F5181 CPU. Regards, Vincent On Wed, Sep 24, 2008 at 2:25 PM, Rafal Jaworowski wrote: > All, > With the recent series of submits in P4's arm-devel branch, I have completed > import of FreeBSD/arm support for three families of Marvell integrated > systems-on-chip built on ARMv5TE-compliant core. Orion support has been around > for a while already, and recently added were extensions for Kirkwood and > Discovery support, new drivers for integrated peripherals and other improvements. > > I'd like to merge this with SVN within the coming weeks, so would like to ask > everyone to review the code and let me know about any comments or notes: > > 1. CPU + SOC specific integrated peripherals > http://p4web.freebsd.org/@md=d&cd=//depot/&c=jjG@//depot/projects/arm/src/sys/arm/mv/?ac=83 > > 2. Other peripherals: > http://p4web.freebsd.org/@md=d&cd=//depot/&c=jjG@//depot/projects/arm/src/sys/dev/mge/?ac=83 > http://p4web.freebsd.org/@md=d&cd=//depot/&c=jjG@//depot/projects/arm/src/sys/dev/usb/ehci_mbus.c?ac=22 > http://p4web.freebsd.org/@md=d&cd=//depot/&c=jjG@//depot/projects/arm/src/sys/dev/uart/uart_bus_mbus.c?ac=22 > http://p4web.freebsd.org/@md=d&cd=//depot/&c=jjG@//depot/projects/arm/src/sys/dev/uart/uart_cpu_mv.c?ac=22 > > > The code is synced with up-to-date CURRENT and has been successfully tested on > the following chips: > * 88F5182, 88F5281 > * 88F6281 > * MV78100 > > Supported functionality highlights: > * EHCI USB 2.0 > * Ethernet > * GPIO > * Interrupt controller > * L1, L2 cache > * Timers, watchdog, RTC > * TWSI (I2C) > * UART > > * Multiuser operation > * Self-hosted kernel/world builds > * NFS- or USB-mounted root filesystem > > For users reference I have put together an initial howto with examples and > other details: http://wiki.freebsd.org/FreeBSDMarvell > > Rafal > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" > From owner-freebsd-arm@FreeBSD.ORG Tue Oct 14 12:15:49 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 119381065694 for ; Tue, 14 Oct 2008 12:15:49 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from semihalf.com (semihalf.com [206.130.101.55]) by mx1.freebsd.org (Postfix) with ESMTP id D26EC8FC14 for ; Tue, 14 Oct 2008 12:15:48 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by semihalf.com (8.13.1/8.13.1) with ESMTP id m9ECFlCI018747; Tue, 14 Oct 2008 06:15:47 -0600 Message-ID: <48F48D71.4030008@semihalf.com> Date: Tue, 14 Oct 2008 14:15:45 +0200 From: Rafal Jaworowski Organization: Semihalf MIME-Version: 1.0 To: Vincent Barus References: <48DA31B3.5040906@semihalf.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: FreeBSD/arm support for Marvell chips -- please review 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: Tue, 14 Oct 2008 12:15:49 -0000 Vincent Barus wrote: > Hi, > nice progress. Maybe someday there's a way to get a stripped down > FreeBSD working on a d-link dns-323 (http://wiki.dns323.info/ ) ? > It's a 88F5181 CPU. The port is reported to work on 88F5181 (kevlo@ had his LinkstationPro running), so the device you mention should only require some configuration tweaks, if anything. Rafal From owner-freebsd-arm@FreeBSD.ORG Tue Oct 14 14:40: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 28B071065689 for ; Tue, 14 Oct 2008 14:40:32 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from semihalf.com (semihalf.com [206.130.101.55]) by mx1.freebsd.org (Postfix) with ESMTP id EB4D88FC12 for ; Tue, 14 Oct 2008 14:40:31 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by semihalf.com (8.13.1/8.13.1) with ESMTP id m9EEeTNW022248 for ; Tue, 14 Oct 2008 08:40:30 -0600 Message-ID: <48F4AF5C.9000205@semihalf.com> Date: Tue, 14 Oct 2008 16:40:28 +0200 From: Rafal Jaworowski Organization: Semihalf MIME-Version: 1.0 To: freebsd-arm@freebsd.org Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit Subject: FreeBSD/arm for Marvell chips in the tree 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: Tue, 14 Oct 2008 14:40:32 -0000 All, I have finished integration of FreeBSD/arm support for Marvell systems-on-chip into the SVN repository. There are still items to improve, and new drivers (PCIE, PCI) and extensions (minidumps, gdbserver) will be introduced soon, but generally the port is in quite decent state already, so enjoy! This would not be possible without all great work of the following people at Semihalf: Grzegorz Bernacki Rafal Czubak Michal Hajduk Bartlomiej Sieka Jan Sieka Piotr Ziecik Special thanks to Maen Suleiman of Marvell for help and assistance. Rafal From owner-freebsd-arm@FreeBSD.ORG Tue Oct 14 14:53:05 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 DAF5F106569B for ; Tue, 14 Oct 2008 14:53:05 +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 806458FC0C for ; Tue, 14 Oct 2008 14:53:05 +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 m9EEooxe064514; Tue, 14 Oct 2008 08:50:50 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 14 Oct 2008 08:51:49 -0600 (MDT) Message-Id: <20081014.085149.-857170835.imp@bsdimp.com> To: raj@semihalf.com From: "M. Warner Losh" In-Reply-To: <48F48D71.4030008@semihalf.com> References: <48DA31B3.5040906@semihalf.com> <48F48D71.4030008@semihalf.com> 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 Subject: Re: FreeBSD/arm support for Marvell chips -- please review 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: Tue, 14 Oct 2008 14:53:05 -0000 In message: <48F48D71.4030008@semihalf.com> Rafal Jaworowski writes: : Vincent Barus wrote: : > Hi, : > nice progress. Maybe someday there's a way to get a stripped down : > FreeBSD working on a d-link dns-323 (http://wiki.dns323.info/ ) ? : > It's a 88F5181 CPU. : : The port is reported to work on 88F5181 (kevlo@ had his LinkstationPro : running), so the device you mention should only require some configuration : tweaks, if anything. I have plans on doing a DIR-615 too once things are in the tree... Warner From owner-freebsd-arm@FreeBSD.ORG Tue Oct 14 16:00:07 2008 Return-Path: Delivered-To: freebsd-arm@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD0AF1065699 for ; Tue, 14 Oct 2008 16:00:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A8EE48FC23 for ; Tue, 14 Oct 2008 16:00:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id m9EG05x0013448 for ; Tue, 14 Oct 2008 16:00:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id m9EG050M013441; Tue, 14 Oct 2008 16:00:05 GMT (envelope-from gnats) Resent-Date: Tue, 14 Oct 2008 16:00:05 GMT Resent-Message-Id: <200810141600.m9EG050M013441@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-arm@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Henning Petersen Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C80B4106569A for ; Tue, 14 Oct 2008 15:56:59 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id B5FCD8FC0C for ; Tue, 14 Oct 2008 15:56:59 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id m9EFuxts014659 for ; Tue, 14 Oct 2008 15:56:59 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id m9EFuxdm014658; Tue, 14 Oct 2008 15:56:59 GMT (envelope-from nobody) Message-Id: <200810141556.m9EFuxdm014658@www.freebsd.org> Date: Tue, 14 Oct 2008 15:56:59 GMT From: Henning Petersen To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: arm/128095: Sizeof(pointer) bug . 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: Tue, 14 Oct 2008 16:00:07 -0000 >Number: 128095 >Category: arm >Synopsis: Sizeof(pointer) bug . >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-arm >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 14 16:00:05 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Henning Petersen >Release: current-Freebsd >Organization: >Environment: >Description: >How-To-Repeat: >Fix: --- src/sys/arm/xscale/ixp425/if_npe.c 22 Mar 2008 16:53:28 -0000 1.9 +++ src/sys/arm/xscale/ixp425/if_npe.c 14 Oct 2008 06:50:58 -0000 @@ -448,7 +448,7 @@ { int error, i; - memset(dma, 0, sizeof(dma)); + memset(dma, 0, sizeof(*dma)); dma->name = name; dma->nbuf = nbuf; Patch attached with submission follows: Index: src/sys/arm/xscale/ixp425/if_npe.c =================================================================== RCS file: /usr/ncvs/src/sys/arm/xscale/ixp425/if_npe.c,v retrieving revision 1.9 diff -u -r1.9 if_npe.c --- src/sys/arm/xscale/ixp425/if_npe.c 22 Mar 2008 16:53:28 -0000 1.9 +++ src/sys/arm/xscale/ixp425/if_npe.c 14 Oct 2008 06:50:58 -0000 @@ -448,7 +448,7 @@ { int error, i; - memset(dma, 0, sizeof(dma)); + memset(dma, 0, sizeof(*dma)); dma->name = name; dma->nbuf = nbuf; >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-arm@FreeBSD.ORG Tue Oct 14 16:09: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 758D4106568C for ; Tue, 14 Oct 2008 16:09:08 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout015.mac.com (asmtpout015.mac.com [17.148.16.90]) by mx1.freebsd.org (Postfix) with ESMTP id 6215F8FC12 for ; Tue, 14 Oct 2008 16:09:08 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp015.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0K8Q00L8EKUTKO00@asmtp015.mac.com> for freebsd-arm@freebsd.org; Tue, 14 Oct 2008 09:09:03 -0700 (PDT) Message-id: From: Marcel Moolenaar To: Rafal Jaworowski In-reply-to: <48F4AF5C.9000205@semihalf.com> Date: Tue, 14 Oct 2008 09:08:52 -0700 References: <48F4AF5C.9000205@semihalf.com> X-Mailer: Apple Mail (2.929.2) Cc: freebsd-arm@freebsd.org Subject: Re: FreeBSD/arm for Marvell chips in the tree 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: Tue, 14 Oct 2008 16:09:08 -0000 On Oct 14, 2008, at 7:40 AM, Rafal Jaworowski wrote: > I have finished integration of FreeBSD/arm support for Marvell > systems-on-chip > into the SVN repository. There are still items to improve, and new > drivers > (PCIE, PCI) and extensions (minidumps, gdbserver) will be introduced > soon, but > generally the port is in quite decent state already, so enjoy! Thanks Rafal. Great work as usual! -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-arm@FreeBSD.ORG Tue Oct 14 20:25:36 2008 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11512106569F for ; Tue, 14 Oct 2008 20:25:36 +0000 (UTC) (envelope-from jhein@timing.com) Received: from Daffy.timing.com (mx2.timing.com [206.168.13.218]) by mx1.freebsd.org (Postfix) with ESMTP id B642A8FC29 for ; Tue, 14 Oct 2008 20:25:35 +0000 (UTC) (envelope-from jhein@timing.com) Received: from gromit.timing.com (gromit.timing.com [206.168.13.209]) by Daffy.timing.com (8.13.1/8.13.1) with ESMTP id m9EKPY1m025215 for ; Tue, 14 Oct 2008 14:25:35 -0600 (MDT) (envelope-from jhein@timing.com) Received: from gromit.timing.com (localhost [127.0.0.1]) by gromit.timing.com (8.14.3/8.14.3) with ESMTP id m9EKPWMR017694; Tue, 14 Oct 2008 14:25:32 -0600 (MDT) (envelope-from jhein@gromit.timing.com) Received: (from jhein@localhost) by gromit.timing.com (8.14.3/8.14.3/Submit) id m9EKPWk2017691; Tue, 14 Oct 2008 14:25:32 -0600 (MDT) (envelope-from jhein) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18677.60.434738.596456@gromit.timing.com> Date: Tue, 14 Oct 2008 14:25:32 -0600 From: John Hein To: arm@freebsd.org X-Mailer: VM 7.19 under Emacs 22.2.1 X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on Daffy.timing.com X-Virus-Status: Clean Cc: Subject: loadable drivers 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: Tue, 14 Oct 2008 20:25:36 -0000 What needs to be done to support loadable drivers under arm/freebsd? From owner-freebsd-arm@FreeBSD.ORG Tue Oct 14 20:59:24 2008 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB2D5106568A for ; Tue, 14 Oct 2008 20:59:24 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from smtp.ht-systems.ru (mr0.ht-systems.ru [78.110.50.55]) by mx1.freebsd.org (Postfix) with ESMTP id 9D1758FC1D for ; Tue, 14 Oct 2008 20:59:24 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from [85.21.245.235] (helo=orion.SpringDaemons.com) by smtp.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1Kpqeb-00085G-AM; Wed, 15 Oct 2008 00:38:05 +0400 Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 931A5398F3; Wed, 15 Oct 2008 00:38:42 +0400 (MSD) Date: Wed, 15 Oct 2008 00:38:42 +0400 From: Stanislav Sedov To: John Hein Message-Id: <20081015003842.a2bd682b.stas@FreeBSD.org> In-Reply-To: <18677.60.434738.596456@gromit.timing.com> References: <18677.60.434738.596456@gromit.timing.com> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Wed__15_Oct_2008_00_38_42_+0400_FW.OtFGD2QOnGk_e" Cc: arm@freebsd.org Subject: Re: loadable drivers 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: Tue, 14 Oct 2008 20:59:25 -0000 --Signature=_Wed__15_Oct_2008_00_38_42_+0400_FW.OtFGD2QOnGk_e Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, 14 Oct 2008 14:25:32 -0600 John Hein mentioned: > What needs to be done to support loadable drivers under arm/freebsd? I think they should work, aren't they? --=20 Stanislav Sedov ST4096-RIPE --Signature=_Wed__15_Oct_2008_00_38_42_+0400_FW.OtFGD2QOnGk_e Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkj1A1IACgkQK/VZk+smlYGG2ACfR+sA27tozbWuCNT0XtmEBoQj pe0Anj1WBAD8Y46wBd9tM9CDqth/JgVJ =QJs4 -----END PGP SIGNATURE----- --Signature=_Wed__15_Oct_2008_00_38_42_+0400_FW.OtFGD2QOnGk_e-- From owner-freebsd-arm@FreeBSD.ORG Tue Oct 14 21:17: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 6BC6A106569D for ; Tue, 14 Oct 2008 21:17:28 +0000 (UTC) (envelope-from dubaylu@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31]) by mx1.freebsd.org (Postfix) with ESMTP id 235DB8FC18 for ; Tue, 14 Oct 2008 21:17:27 +0000 (UTC) (envelope-from dubaylu@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so579880ywe.13 for ; Tue, 14 Oct 2008 14:17:27 -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:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=C/XhiaPpLgXm/QKH/gKg8BmXYjwZolnGLVVA83DdzxM=; b=ImW2TyU65e73q11J3kyK/gR9RqKImv+7vnQcW7vUJMcAEze+2L/SkjcNQwOnF9I2ZD CAqHcmPN/WgpZWiiNhtb9x6I/8ITXXTlnZ8ic1MreYQRSjaejZNQM67VZ0klAlTv11FX uxrD+5iRm0q00Mc7DK862xzNqsBZn8BFLf7pM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=mX31f84d3jq8ifbPNXVibFsaMNjoGT4M87Y4YK9z1wcZ/W3Z5f7w1b/MXx50UD6SeR 6oCcwvTSsLYz6m1Hyb1JGumBR0uxfpW3Kk3GE8R5FNsj0+SHDqDKgiAmz2HdGXatfkVN Gk+teSvE0v+aoJ0j9A3jVRGWtSx5twCIPNbk8= Received: by 10.100.207.14 with SMTP id e14mr37941ang.60.1224017434240; Tue, 14 Oct 2008 13:50:34 -0700 (PDT) Received: by 10.100.242.5 with HTTP; Tue, 14 Oct 2008 13:50:34 -0700 (PDT) Message-ID: <55a968a30810141350r3249adx85c289363e1b092a@mail.gmail.com> Date: Tue, 14 Oct 2008 16:50:34 -0400 From: "luasi dubay" To: freebsd-arm@freebsd.org In-Reply-To: <48F48D71.4030008@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48DA31B3.5040906@semihalf.com> <48F48D71.4030008@semihalf.com> Subject: Re: FreeBSD/arm support for Marvell chips -- please review 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: Tue, 14 Oct 2008 21:17:28 -0000 On 10/14/08, Rafal Jaworowski wrote: > Vincent Barus wrote: > > Hi, > > nice progress. Maybe someday there's a way to get a stripped down > > FreeBSD working on a d-link dns-323 (http://wiki.dns323.info/ ) ? > > It's a 88F5181 CPU. And some now have a 88F5182. I am running NetBSD on mine. The bootloader u-boot is stripped down and has no network access so be prepared to download kernels using kermit. Something else to think about if you want to turn it into a server, ...when it is power cycled the DNS323 needs a kick to get it going again. > > > The port is reported to work on 88F5181 (kevlo@ had his LinkstationPro > running), so the device you mention should only require some configuration > tweaks, if anything. The gpio's need reverse engineering too. The wiki does not provide enough information to power off the device. I am working on this. From owner-freebsd-arm@FreeBSD.ORG Tue Oct 14 21:34:43 2008 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D4901065688; Tue, 14 Oct 2008 21:34:43 +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 BA6538FC0A; Tue, 14 Oct 2008 21:34:42 +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 m9ELXInk069421; Tue, 14 Oct 2008 15:33:18 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 14 Oct 2008 15:34:18 -0600 (MDT) Message-Id: <20081014.153418.1353606085.imp@bsdimp.com> To: stas@freebsd.org From: "M. Warner Losh" In-Reply-To: <20081015003842.a2bd682b.stas@FreeBSD.org> References: <18677.60.434738.596456@gromit.timing.com> <20081015003842.a2bd682b.stas@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: arm@freebsd.org Subject: Re: loadable drivers 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: Tue, 14 Oct 2008 21:34:43 -0000 In message: <20081015003842.a2bd682b.stas@FreeBSD.org> Stanislav Sedov writes: : On Tue, 14 Oct 2008 14:25:32 -0600 : John Hein mentioned: : : > What needs to be done to support loadable drivers under arm/freebsd? : : I think they should work, aren't they? Build them... They work.. Err, no, it would take hundreds of hours on contract work done only by me... :-) Warner P.S. I used to work at timing.com :-) From owner-freebsd-arm@FreeBSD.ORG Tue Oct 14 22:50:28 2008 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A339106569B for ; Tue, 14 Oct 2008 22:50:28 +0000 (UTC) (envelope-from jhein@timing.com) Received: from Daffy.timing.com (ns2.timing.com [206.168.13.218]) by mx1.freebsd.org (Postfix) with ESMTP id 4E4748FC1C for ; Tue, 14 Oct 2008 22:50:28 +0000 (UTC) (envelope-from jhein@timing.com) Received: from gromit.timing.com (gromit.timing.com [206.168.13.209]) by Daffy.timing.com (8.13.1/8.13.1) with ESMTP id m9EMoQFt045222; Tue, 14 Oct 2008 16:50:27 -0600 (MDT) (envelope-from jhein@timing.com) Received: from gromit.timing.com (localhost [127.0.0.1]) by gromit.timing.com (8.14.3/8.14.3) with ESMTP id m9EMWUDi020951; Tue, 14 Oct 2008 16:32:30 -0600 (MDT) (envelope-from jhein@gromit.timing.com) Received: (from jhein@localhost) by gromit.timing.com (8.14.3/8.14.3/Submit) id m9EMWUQF020948; Tue, 14 Oct 2008 16:32:30 -0600 (MDT) (envelope-from jhein) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18677.7678.159413.615726@gromit.timing.com> Date: Tue, 14 Oct 2008 16:32:30 -0600 From: John Hein To: "M. Warner Losh" In-Reply-To: <20081014.153418.1353606085.imp@bsdimp.com> References: <18677.60.434738.596456@gromit.timing.com> <20081015003842.a2bd682b.stas@FreeBSD.org> <20081014.153418.1353606085.imp@bsdimp.com> X-Mailer: VM 7.19 under Emacs 22.2.1 X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on Daffy.timing.com X-Virus-Status: Clean Cc: arm@freebsd.org Subject: Re: loadable drivers 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: Tue, 14 Oct 2008 22:50:28 -0000 M. Warner Losh wrote at 15:34 -0600 on Oct 14, 2008: > In message: <20081015003842.a2bd682b.stas@FreeBSD.org> > Stanislav Sedov writes: > : On Tue, 14 Oct 2008 14:25:32 -0600 > : John Hein mentioned: > : > : > What needs to be done to support loadable drivers under arm/freebsd? > : > : I think they should work, aren't they? > > Build them... They work.. Sorry for the poor problem statement. They do load, but I'm not getting into the probe or attach. At first I thought the load was failing, but that was driver error (pardon the pun). Let me get better debug info, and I'll come back with a better question or an explanation. From owner-freebsd-arm@FreeBSD.ORG Wed Oct 15 16:25:38 2008 Return-Path: Delivered-To: arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14D291065694 for ; Wed, 15 Oct 2008 16:25:38 +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 C66CA8FC1E for ; Wed, 15 Oct 2008 16:25:37 +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 m9FGOE0N091115; Wed, 15 Oct 2008 10:24:14 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 15 Oct 2008 10:25:14 -0600 (MDT) Message-Id: <20081015.102514.796899934.imp@bsdimp.com> To: ticso@cicely.de, ticso@cicely7.cicely.de From: "M. Warner Losh" In-Reply-To: <20081015162140.GQ25586@cicely7.cicely.de> References: <20081014.153418.1353606085.imp@bsdimp.com> <18677.7678.159413.615726@gromit.timing.com> <20081015162140.GQ25586@cicely7.cicely.de> 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: arm@FreeBSD.org Subject: Re: loadable drivers 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: Wed, 15 Oct 2008 16:25:38 -0000 In message: <20081015162140.GQ25586@cicely7.cicely.de> Bernd Walter writes: : On Tue, Oct 14, 2008 at 04:32:30PM -0600, John Hein wrote: : > M. Warner Losh wrote at 15:34 -0600 on Oct 14, 2008: : > > In message: <20081015003842.a2bd682b.stas@FreeBSD.org> : > > Stanislav Sedov writes: : > > : On Tue, 14 Oct 2008 14:25:32 -0600 : > > : John Hein mentioned: : > > : : > > : > What needs to be done to support loadable drivers under arm/freebsd? : > > : : > > : I think they should work, aren't they? : > > : > > Build them... They work.. : > : > Sorry for the poor problem statement. They do load, but I'm not : > getting into the probe or attach. At first I thought the load : > was failing, but that was driver error (pardon the pun). : : Then it is likely a driver or configuration specific problem. : One of the possible reasons is that you may missing hints, because many : devices in embedded systems don't support probing. : IIRC I already successfully loaded USB modules on AT91. The problem, communicated privately, was there's no identify routine, so it never was added to atmelbus so nothing happened when the module was loaded. Warner From owner-freebsd-arm@FreeBSD.ORG Wed Oct 15 16:39:50 2008 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE39F106568E for ; Wed, 15 Oct 2008 16:39:50 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 24E028FC1C for ; Wed, 15 Oct 2008 16:39:49 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id m9FGLiRO032040 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 15 Oct 2008 18:21:45 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by cicely5.cicely.de (8.14.2/8.14.2) with ESMTP id m9FGLftA074676 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 15 Oct 2008 18:21:42 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id m9FGLfOc054163; Wed, 15 Oct 2008 18:21:41 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id m9FGLejQ054162; Wed, 15 Oct 2008 18:21:40 +0200 (CEST) (envelope-from ticso) Date: Wed, 15 Oct 2008 18:21:40 +0200 From: Bernd Walter To: John Hein Message-ID: <20081015162140.GQ25586@cicely7.cicely.de> References: <18677.60.434738.596456@gromit.timing.com> <20081015003842.a2bd682b.stas@FreeBSD.org> <20081014.153418.1353606085.imp@bsdimp.com> <18677.7678.159413.615726@gromit.timing.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18677.7678.159413.615726@gromit.timing.com> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED=-1.8, AWL=0.069, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: arm@freebsd.org Subject: Re: loadable drivers X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Oct 2008 16:39:50 -0000 On Tue, Oct 14, 2008 at 04:32:30PM -0600, John Hein wrote: > M. Warner Losh wrote at 15:34 -0600 on Oct 14, 2008: > > In message: <20081015003842.a2bd682b.stas@FreeBSD.org> > > Stanislav Sedov writes: > > : On Tue, 14 Oct 2008 14:25:32 -0600 > > : John Hein mentioned: > > : > > : > What needs to be done to support loadable drivers under arm/freebsd? > > : > > : I think they should work, aren't they? > > > > Build them... They work.. > > Sorry for the poor problem statement. They do load, but I'm not > getting into the probe or attach. At first I thought the load > was failing, but that was driver error (pardon the pun). Then it is likely a driver or configuration specific problem. One of the possible reasons is that you may missing hints, because many devices in embedded systems don't support probing. IIRC I already successfully loaded USB modules on AT91. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Wed Oct 15 16:45:50 2008 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56E8C1065692 for ; Wed, 15 Oct 2008 16:45:50 +0000 (UTC) (envelope-from jhein@timing.com) Received: from Daffy.timing.com (smtp.timing.com [206.168.13.218]) by mx1.freebsd.org (Postfix) with ESMTP id F3B328FC14 for ; Wed, 15 Oct 2008 16:45:49 +0000 (UTC) (envelope-from jhein@timing.com) Received: from gromit.timing.com (gromit.timing.com [206.168.13.209]) by Daffy.timing.com (8.13.1/8.13.1) with ESMTP id m9FGjgRu081664; Wed, 15 Oct 2008 10:45:47 -0600 (MDT) (envelope-from jhein@timing.com) Received: from gromit.timing.com (localhost [127.0.0.1]) by gromit.timing.com (8.14.3/8.14.3) with ESMTP id m9FGjeWw065326; Wed, 15 Oct 2008 10:45:40 -0600 (MDT) (envelope-from jhein@gromit.timing.com) Received: (from jhein@localhost) by gromit.timing.com (8.14.3/8.14.3/Submit) id m9FGjele065323; Wed, 15 Oct 2008 10:45:40 -0600 (MDT) (envelope-from jhein) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18678.7732.431604.484585@gromit.timing.com> Date: Wed, 15 Oct 2008 10:45:40 -0600 From: John Hein To: ticso@cicely.de In-Reply-To: <20081015162140.GQ25586@cicely7.cicely.de> References: <18677.60.434738.596456@gromit.timing.com> <20081015003842.a2bd682b.stas@FreeBSD.org> <20081014.153418.1353606085.imp@bsdimp.com> <18677.7678.159413.615726@gromit.timing.com> <20081015162140.GQ25586@cicely7.cicely.de> X-Mailer: VM 7.19 under Emacs 22.2.1 X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on Daffy.timing.com X-Virus-Status: Clean Cc: arm@freebsd.org Subject: Re: loadable drivers 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: Wed, 15 Oct 2008 16:45:50 -0000 Bernd Walter wrote at 18:21 +0200 on Oct 15, 2008: > On Tue, Oct 14, 2008 at 04:32:30PM -0600, John Hein wrote: > > M. Warner Losh wrote at 15:34 -0600 on Oct 14, 2008: > > > In message: <20081015003842.a2bd682b.stas@FreeBSD.org> > > > Stanislav Sedov writes: > > > : On Tue, 14 Oct 2008 14:25:32 -0600 > > > : John Hein mentioned: > > > : > > > : > What needs to be done to support loadable drivers under arm/freebsd? > > > : > > > : I think they should work, aren't they? > > > > > > Build them... They work.. > > > > Sorry for the poor problem statement. They do load, but I'm not > > getting into the probe or attach. At first I thought the load > > was failing, but that was driver error (pardon the pun). > > Then it is likely a driver or configuration specific problem. > One of the possible reasons is that you may missing hints, because many > devices in embedded systems don't support probing. > IIRC I already successfully loaded USB modules on AT91. Yes, it was my error... missing identify method. I've been using drivers parented to self-identifying busses for so long, I forgot that important little detail. Sorry for the gross misdirection. Note that loading the uftdi driver via kldload behaves differently on arm than when it's compiled into the kernel. It boils down to uaa->iface being NULL (in uftdi_match) in the former case and not NULL in the latter. I haven't tracked that down yet, but kldload works fine on x86. From owner-freebsd-arm@FreeBSD.ORG Wed Oct 15 17:25:28 2008 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A43F1065695 for ; Wed, 15 Oct 2008 17:25:28 +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 D6E808FC14 for ; Wed, 15 Oct 2008 17:25:27 +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 m9FHOlR0091727; Wed, 15 Oct 2008 11:24:48 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 15 Oct 2008 11:25:49 -0600 (MDT) Message-Id: <20081015.112549.35219823.imp@bsdimp.com> To: jhein@timing.com From: "M. Warner Losh" In-Reply-To: <18678.7732.431604.484585@gromit.timing.com> References: <18677.7678.159413.615726@gromit.timing.com> <20081015162140.GQ25586@cicely7.cicely.de> <18678.7732.431604.484585@gromit.timing.com> 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: arm@freebsd.org, ticso@cicely.de Subject: Re: loadable drivers 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: Wed, 15 Oct 2008 17:25:28 -0000 In message: <18678.7732.431604.484585@gromit.timing.com> John Hein writes: : Bernd Walter wrote at 18:21 +0200 on Oct 15, 2008: : > On Tue, Oct 14, 2008 at 04:32:30PM -0600, John Hein wrote: : > > M. Warner Losh wrote at 15:34 -0600 on Oct 14, 2008: : > > > In message: <20081015003842.a2bd682b.stas@FreeBSD.org> : > > > Stanislav Sedov writes: : > > > : On Tue, 14 Oct 2008 14:25:32 -0600 : > > > : John Hein mentioned: : > > > : : > > > : > What needs to be done to support loadable drivers under arm/freebsd? : > > > : : > > > : I think they should work, aren't they? : > > > : > > > Build them... They work.. : > > : > > Sorry for the poor problem statement. They do load, but I'm not : > > getting into the probe or attach. At first I thought the load : > > was failing, but that was driver error (pardon the pun). : > : > Then it is likely a driver or configuration specific problem. : > One of the possible reasons is that you may missing hints, because many : > devices in embedded systems don't support probing. : > IIRC I already successfully loaded USB modules on AT91. : : Yes, it was my error... missing identify method. I've been using : drivers parented to self-identifying busses for so long, I forgot : that important little detail. : : Sorry for the gross misdirection. : : Note that loading the uftdi driver via kldload behaves differently on : arm than when it's compiled into the kernel. It boils down to : uaa->iface being NULL (in uftdi_match) in the former case and not NULL : in the latter. I haven't tracked that down yet, but kldload works : fine on x86. There's issue with loading usb drivers because it was never designed for that... Some drivers work, others don't. Warner From owner-freebsd-arm@FreeBSD.ORG Wed Oct 15 19:15:31 2008 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B04D91065688 for ; Wed, 15 Oct 2008 19:15:31 +0000 (UTC) (envelope-from jhein@timing.com) Received: from Daffy.timing.com (daffy.timing.com [206.168.13.218]) by mx1.freebsd.org (Postfix) with ESMTP id 729B08FC0A for ; Wed, 15 Oct 2008 19:15:31 +0000 (UTC) (envelope-from jhein@timing.com) Received: from gromit.timing.com (gromit.timing.com [206.168.13.209]) by Daffy.timing.com (8.13.1/8.13.1) with ESMTP id m9FIkrFx097693; Wed, 15 Oct 2008 12:46:54 -0600 (MDT) (envelope-from jhein@timing.com) Received: from gromit.timing.com (localhost [127.0.0.1]) by gromit.timing.com (8.14.3/8.14.3) with ESMTP id m9FIkpIe068402; Wed, 15 Oct 2008 12:46:51 -0600 (MDT) (envelope-from jhein@gromit.timing.com) Received: (from jhein@localhost) by gromit.timing.com (8.14.3/8.14.3/Submit) id m9FIkpvG068397; Wed, 15 Oct 2008 12:46:51 -0600 (MDT) (envelope-from jhein) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18678.15002.142599.726@gromit.timing.com> Date: Wed, 15 Oct 2008 12:46:50 -0600 From: John Hein To: "M. Warner Losh" In-Reply-To: <20081015.112549.35219823.imp@bsdimp.com> References: <18677.7678.159413.615726@gromit.timing.com> <20081015162140.GQ25586@cicely7.cicely.de> <18678.7732.431604.484585@gromit.timing.com> <20081015.112549.35219823.imp@bsdimp.com> X-Mailer: VM 7.19 under Emacs 22.2.1 X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on Daffy.timing.com X-Virus-Status: Clean Cc: arm@freebsd.org, ticso@cicely.de Subject: Re: loadable drivers 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: Wed, 15 Oct 2008 19:15:31 -0000 M. Warner Losh wrote at 11:25 -0600 on Oct 15, 2008: > There's issue with loading usb drivers because it was never designed > for that... Some drivers work, others don't. I remember that, but I wonder why it works okay on x86. Hmmm... now that I check it again, it seems it only works on x86 if the ko is specified to be loaded in loader.conf (even if ugen is compiled out and not loaded). Loading it later after boot makes the uftdi_match fail. So that explains why it doesn't work on arm (no loader support for loading .ko's) at all. Ah... it also works if it's loaded at boot, unloaded later, then reloaded. From owner-freebsd-arm@FreeBSD.ORG Wed Oct 15 20:25:14 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 729831065690; Wed, 15 Oct 2008 20:25:14 +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 6B06C8FC14; Wed, 15 Oct 2008 20:25:13 +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 225133346; Wed, 15 Oct 2008 23:25:12 +0300 Message-ID: <48F651A7.3040001@FreeBSD.org> Date: Wed, 15 Oct 2008 23:25:11 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.16 (X11/20080726) MIME-Version: 1.0 To: "M. Warner Losh" References: <5f67a8c40810052226k3070a11ah463a819c677f6307@mail.gmail.com> <20081008113848.c9b44354.webmaster@kibab.com> <20081012171201.da4da754.webmaster@kibab.com> <20081013.110310.-1622595361.imp@bsdimp.com> In-Reply-To: <20081013.110310.-1622595361.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org, freebsd-current@freebsd.org, zbeeble@gmail.com, 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: Wed, 15 Oct 2008 20:25:14 -0000 M. Warner Losh wrote: > : Problem was solved by increasing the number of answer read attempts in mmc_send_app_op_cond(). With attached patch (against latest driver version) card is recognized properly on ~ 190th attempt (while in original driver there are only 100 attempts). > : > : Furthermore, non-mine SDHC card is now also recognized in this cardreader (it doesn't even under Windows). In this case, it takes about 400 attempts to read answer. > > I think I bumped the number of iterations to 100 when I found that 10 > wasn't enough. 25 different cards worked just fine, but I got use of > a 16MB SD card at BSDcan that needed like 65. Bumping it from 100 to > 1000, however, makes the timeout go from 1s to 10s. That opens up > window for insertion races, but that's the only downside I see... Of > course, we want to fix those races, but this may expose them a little > more.. > > I can't believe that you had a card that took 4s to become active! > > Can you confirm the elapsed time is really 4s for that card? > Otherwise, this may be pointing out a bug in another area of the > code... Completely fortunate I have noticed that number of iterations depends on my laptop power source. After small investigation I have found that it actually depends on dev.cpu.0.freq value. With default value 2400 I have only several iterations. But every double frequency decrease doubles iteration count. With minimum value 100MHz I have more then 100 iterations. Same time it doesn't looks like this time is a real wall time. It looks like DELAY() used in a loop has some problems with time counting. -- Alexander Motin From owner-freebsd-arm@FreeBSD.ORG Wed Oct 15 20:45:18 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 46F071065691; Wed, 15 Oct 2008 20:45:18 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from smtp.ht-systems.ru (mr0.ht-systems.ru [78.110.50.55]) by mx1.freebsd.org (Postfix) with ESMTP id AE9918FC18; Wed, 15 Oct 2008 20:45:17 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from [85.21.245.235] (helo=orion.SpringDaemons.com) by smtp.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1KqDF4-0001Jc-Sf; Thu, 16 Oct 2008 00:45:14 +0400 Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 3410E398F1; Thu, 16 Oct 2008 00:45:53 +0400 (MSD) Date: Thu, 16 Oct 2008 00:45:48 +0400 From: Stanislav Sedov To: Alexander Motin Message-Id: <20081016004548.437cba9d.stas@FreeBSD.org> In-Reply-To: <48F651A7.3040001@FreeBSD.org> References: <5f67a8c40810052226k3070a11ah463a819c677f6307@mail.gmail.com> <20081008113848.c9b44354.webmaster@kibab.com> <20081012171201.da4da754.webmaster@kibab.com> <20081013.110310.-1622595361.imp@bsdimp.com> <48F651A7.3040001@FreeBSD.org> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Thu__16_Oct_2008_00_45_48_+0400_gpvxnSXKe9UYcK1e" Cc: zbeeble@gmail.com, 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: Wed, 15 Oct 2008 20:45:18 -0000 --Signature=_Thu__16_Oct_2008_00_45_48_+0400_gpvxnSXKe9UYcK1e Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, 15 Oct 2008 23:25:11 +0300 Alexander Motin mentioned: >=20 > Completely fortunate I have noticed that number of iterations depends on= =20 > my laptop power source. After small investigation I have found that it=20 > actually depends on dev.cpu.0.freq value. With default value 2400 I have= =20 > only several iterations. But every double frequency decrease doubles=20 > iteration count. With minimum value 100MHz I have more then 100=20 > iterations. Same time it doesn't looks like this time is a real wall=20 > time. It looks like DELAY() used in a loop has some problems with time=20 > counting. >=20 What do you mean? DELAY(9) on your laptop doesn't correspond to the real time? AFAIK, DELAY(9) relies on current timecounter for time accountiong, so there might be problems with it. Have you tried switching the kern.timecounter.hardware sysctl to see if it will affect results? --=20 Stanislav Sedov ST4096-RIPE --Signature=_Thu__16_Oct_2008_00_45_48_+0400_gpvxnSXKe9UYcK1e Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkj2VoEACgkQK/VZk+smlYHA5wCeIgg4IPiIQihQ3sVJ5IzawUaK nGgAnid2uyjyJbK0jty1Tp3zl+gXNRn7 =WF8Y -----END PGP SIGNATURE----- --Signature=_Thu__16_Oct_2008_00_45_48_+0400_gpvxnSXKe9UYcK1e-- From owner-freebsd-arm@FreeBSD.ORG Thu Oct 16 10:06: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 0F8761065687; Thu, 16 Oct 2008 10:06:25 +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 0FBE28FC1F; Thu, 16 Oct 2008 10:06:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from orphanage.alkar.net (account mav@alkar.net [212.86.226.11] verified) by cmail.optima.ua (CommuniGate Pro SMTP 5.1.14) with ESMTPA id 225200459; Thu, 16 Oct 2008 13:06:19 +0300 Message-ID: <48F7121A.2010307@FreeBSD.org> Date: Thu, 16 Oct 2008 13:06:18 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.14 (X11/20080612) MIME-Version: 1.0 To: Stanislav Sedov References: <1223284984.00022179.1223272802@10.7.7.3> <1223497390.00023332.1223487003@10.7.7.3> <1223832181.00024566.1223819402@10.7.7.3> <1223929384.00025003.1223917802@10.7.7.3> <1224112991.00025726.1224102602@10.7.7.3> <1224123783.00025735.1224113402@10.7.7.3> In-Reply-To: <1224123783.00025735.1224113402@10.7.7.3> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 16 Oct 2008 11:13:39 +0000 Cc: freebsd-arm@freebsd.org, zbeeble@gmail.com, freebsd-mobile@freebsd.org, freebsd-current@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: Thu, 16 Oct 2008 10:06:25 -0000 Stanislav Sedov wrote: > On Wed, 15 Oct 2008 23:25:11 +0300 > Alexander Motin mentioned: >> Completely fortunate I have noticed that number of iterations depends on >> my laptop power source. After small investigation I have found that it >> actually depends on dev.cpu.0.freq value. With default value 2400 I have >> only several iterations. But every double frequency decrease doubles >> iteration count. With minimum value 100MHz I have more then 100 >> iterations. Same time it doesn't looks like this time is a real wall >> time. It looks like DELAY() used in a loop has some problems with time >> counting. > > What do you mean? DELAY(9) on your laptop doesn't correspond to the > real time? Yes. It works fine when laptop operates at full frequency, but proportionally reduces time interval when powerd drops frequency down. I have also evidence about the same problem on another laptop with 7.1-PRERELEASE. > AFAIK, DELAY(9) relies on current timecounter for time > accountiong, so there might be problems with it. Have you tried > switching the kern.timecounter.hardware sysctl to see if it will > affect results? It was late and I am not very aware in FreeBSD time counting, so I have not tried to investigate it deeper. -- Alexander Motin From owner-freebsd-arm@FreeBSD.ORG Thu Oct 16 14:10:59 2008 Return-Path: Delivered-To: freebsd-arm@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69B6B106568E; Thu, 16 Oct 2008 14:10:59 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 40AFF8FC1C; Thu, 16 Oct 2008 14:10:59 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from freefall.freebsd.org (gavin@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id m9GEAxIc039881; Thu, 16 Oct 2008 14:10:59 GMT (envelope-from gavin@freefall.freebsd.org) Received: (from gavin@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id m9GEAwRN039877; Thu, 16 Oct 2008 14:10:58 GMT (envelope-from gavin) Date: Thu, 16 Oct 2008 14:10:58 GMT Message-Id: <200810161410.m9GEAwRN039877@freefall.freebsd.org> To: henning.petersen@t-online.de, gavin@FreeBSD.org, freebsd-arm@FreeBSD.org From: gavin@FreeBSD.org Cc: Subject: Re: arm/128095: Sizeof(pointer) bug . 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: Thu, 16 Oct 2008 14:10:59 -0000 Synopsis: Sizeof(pointer) bug . State-Changed-From-To: open->patched State-Changed-By: gavin State-Changed-When: Thu Oct 16 14:09:54 UTC 2008 State-Changed-Why: Patched in r183886. http://www.freebsd.org/cgi/query-pr.cgi?pr=128095 From owner-freebsd-arm@FreeBSD.ORG Thu Oct 16 14:16:37 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 B2C7F1065686; Thu, 16 Oct 2008 14:16:37 +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 6D7DF8FC18; Thu, 16 Oct 2008 14:16:37 +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 m9GEFQ2B012588; Thu, 16 Oct 2008 08:15:26 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 16 Oct 2008 08:16:28 -0600 (MDT) Message-Id: <20081016.081628.43009259.imp@bsdimp.com> To: mav@freebsd.org From: "M. Warner Losh" In-Reply-To: <48F7121A.2010307@FreeBSD.org> References: <1224112991.00025726.1224102602@10.7.7.3> <1224123783.00025735.1224113402@10.7.7.3> <48F7121A.2010307@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, zbeeble@gmail.com, 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: Thu, 16 Oct 2008 14:16:37 -0000 In message: <48F7121A.2010307@FreeBSD.org> Alexander Motin writes: : Stanislav Sedov wrote: : > On Wed, 15 Oct 2008 23:25:11 +0300 : > Alexander Motin mentioned: : >> Completely fortunate I have noticed that number of iterations depends on : >> my laptop power source. After small investigation I have found that it : >> actually depends on dev.cpu.0.freq value. With default value 2400 I have : >> only several iterations. But every double frequency decrease doubles : >> iteration count. With minimum value 100MHz I have more then 100 : >> iterations. Same time it doesn't looks like this time is a real wall : >> time. It looks like DELAY() used in a loop has some problems with time : >> counting. : > : > What do you mean? DELAY(9) on your laptop doesn't correspond to the : > real time? : : Yes. It works fine when laptop operates at full frequency, but : proportionally reduces time interval when powerd drops frequency down. I : have also evidence about the same problem on another laptop with : 7.1-PRERELEASE. Is the slower clock making DELAY take less/more time? Or is the slower clock fed to the SDHCI part who feeds it to the SD card so less time accumulates on the SD card because the clock line to it is running slower? : > AFAIK, DELAY(9) relies on current timecounter for time : > accountiong, so there might be problems with it. Have you tried : > switching the kern.timecounter.hardware sysctl to see if it will : > affect results? : : It was late and I am not very aware in FreeBSD time counting, so I have : not tried to investigate it deeper. I would have thought that if DELAY(10) went from 10us to 100us because you are battery power, you'd have more cards working rather than fewer.. Warner From owner-freebsd-arm@FreeBSD.ORG Thu Oct 16 15:28:48 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 5A6711065686; Thu, 16 Oct 2008 15:28:48 +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 00FD18FC26; Thu, 16 Oct 2008 15:28:47 +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 m9GFRhZK013918; Thu, 16 Oct 2008 09:27:43 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 16 Oct 2008 09:28:44 -0600 (MDT) Message-Id: <20081016.092844.-1548243521.imp@bsdimp.com> To: mav@freebsd.org From: "M. Warner Losh" In-Reply-To: <48F75773.7030100@FreeBSD.org> References: <48F7121A.2010307@FreeBSD.org> <20081016.081628.43009259.imp@bsdimp.com> <48F75773.7030100@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, zbeeble@gmail.com, 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: Thu, 16 Oct 2008 15:28:48 -0000 In message: <48F75773.7030100@FreeBSD.org> Alexander Motin writes: : M. Warner Losh wrote: : > In message: <48F7121A.2010307@FreeBSD.org> : > Alexander Motin writes: : > : Stanislav Sedov wrote: : > : > On Wed, 15 Oct 2008 23:25:11 +0300 : > : > Alexander Motin mentioned: : > : >> Completely fortunate I have noticed that number of iterations depends on : > : >> my laptop power source. After small investigation I have found that it : > : >> actually depends on dev.cpu.0.freq value. With default value 2400 I have : > : >> only several iterations. But every double frequency decrease doubles : > : >> iteration count. With minimum value 100MHz I have more then 100 : > : >> iterations. Same time it doesn't looks like this time is a real wall : > : >> time. It looks like DELAY() used in a loop has some problems with time : > : >> counting. : > : > : > : > What do you mean? DELAY(9) on your laptop doesn't correspond to the : > : > real time? : > : : > : Yes. It works fine when laptop operates at full frequency, but : > : proportionally reduces time interval when powerd drops frequency down. I : > : have also evidence about the same problem on another laptop with : > : 7.1-PRERELEASE. : > : > Is the slower clock making DELAY take less/more time? Or is the : > slower clock fed to the SDHCI part who feeds it to the SD card so less : > time accumulates on the SD card because the clock line to it is : > running slower? : > : > : > AFAIK, DELAY(9) relies on current timecounter for time : > : > accountiong, so there might be problems with it. Have you tried : > : > switching the kern.timecounter.hardware sysctl to see if it will : > : > affect results? : > : : > : It was late and I am not very aware in FreeBSD time counting, so I have : > : not tried to investigate it deeper. : > : > I would have thought that if DELAY(10) went from 10us to 100us because : > you are battery power, you'd have more cards working rather than : > fewer.. : : No, it's opposite. With lower frequency I have proportionally smaller : delays (more loop iterations). I don't remember exact numbers now, but : general tendency was like: with 2400MHz - 10 iterations, with 1200MHz - : 20 iterations and with 100MHz - 240 iterations. But neither syslog, nor : my eyes saw any visible delay there. You have more iterations. I'd have expected less. This doesn't say anything at all about DELAY, per se. If you are waiting for 1M cycles at 100MHz, it is only .01s, while at 10MHz it is .1s. Delay is implemented by reading a counter in the 8254 that's been calibrated. So unless the clock that's clocking it is running FASTER, delay won't be the source of additional iterations. Hmmm, looking at the i386 delay code, it looks like it depends on tsc_frequency being right when tsc isn't broken. If that's set bogusly, that could cause DELAY to be slower... : It looks like working on battery power DELAY() code expects timer speed : reduced, while estimating final timer value, but looks like timer itself : runs on full speed. Have you confirmed this with getting timestamps per loop? The delay code doesn't seem to adjust at all. We should likely look at i386/i386/tsc.c and instrument it to see what it is doing to tsc_freq in your case... Warner From owner-freebsd-arm@FreeBSD.ORG Thu Oct 16 15:02:15 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 B2ED11065689; Thu, 16 Oct 2008 15:02:15 +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 6C5FF8FC33; Thu, 16 Oct 2008 15:02:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from orphanage.alkar.net (account mav@alkar.net [212.86.226.11] verified) by cmail.optima.ua (CommuniGate Pro SMTP 5.1.14) with ESMTPA id 225231106; Thu, 16 Oct 2008 18:02:12 +0300 Message-ID: <48F75773.7030100@FreeBSD.org> Date: Thu, 16 Oct 2008 18:02:11 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.14 (X11/20080612) MIME-Version: 1.0 To: "M. Warner Losh" References: <1224112991.00025726.1224102602@10.7.7.3> <1224123783.00025735.1224113402@10.7.7.3> <48F7121A.2010307@FreeBSD.org> <20081016.081628.43009259.imp@bsdimp.com> In-Reply-To: <20081016.081628.43009259.imp@bsdimp.com> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 16 Oct 2008 16:16:09 +0000 Cc: freebsd-arm@freebsd.org, zbeeble@gmail.com, 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: Thu, 16 Oct 2008 15:02:15 -0000 M. Warner Losh wrote: > In message: <48F7121A.2010307@FreeBSD.org> > Alexander Motin writes: > : Stanislav Sedov wrote: > : > On Wed, 15 Oct 2008 23:25:11 +0300 > : > Alexander Motin mentioned: > : >> Completely fortunate I have noticed that number of iterations depends on > : >> my laptop power source. After small investigation I have found that it > : >> actually depends on dev.cpu.0.freq value. With default value 2400 I have > : >> only several iterations. But every double frequency decrease doubles > : >> iteration count. With minimum value 100MHz I have more then 100 > : >> iterations. Same time it doesn't looks like this time is a real wall > : >> time. It looks like DELAY() used in a loop has some problems with time > : >> counting. > : > > : > What do you mean? DELAY(9) on your laptop doesn't correspond to the > : > real time? > : > : Yes. It works fine when laptop operates at full frequency, but > : proportionally reduces time interval when powerd drops frequency down. I > : have also evidence about the same problem on another laptop with > : 7.1-PRERELEASE. > > Is the slower clock making DELAY take less/more time? Or is the > slower clock fed to the SDHCI part who feeds it to the SD card so less > time accumulates on the SD card because the clock line to it is > running slower? > > : > AFAIK, DELAY(9) relies on current timecounter for time > : > accountiong, so there might be problems with it. Have you tried > : > switching the kern.timecounter.hardware sysctl to see if it will > : > affect results? > : > : It was late and I am not very aware in FreeBSD time counting, so I have > : not tried to investigate it deeper. > > I would have thought that if DELAY(10) went from 10us to 100us because > you are battery power, you'd have more cards working rather than > fewer.. No, it's opposite. With lower frequency I have proportionally smaller delays (more loop iterations). I don't remember exact numbers now, but general tendency was like: with 2400MHz - 10 iterations, with 1200MHz - 20 iterations and with 100MHz - 240 iterations. But neither syslog, nor my eyes saw any visible delay there. It looks like working on battery power DELAY() code expects timer speed reduced, while estimating final timer value, but looks like timer itself runs on full speed. -- Alexander Motin From owner-freebsd-arm@FreeBSD.ORG Thu Oct 16 16:39:50 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 8E0D81065690; Thu, 16 Oct 2008 16:39:50 +0000 (UTC) (envelope-from taku@tackymt.homeip.net) Received: from basalt.tackymt.homeip.net (unknown [IPv6:2001:3e0:577:0:20d:61ff:fecc:2253]) by mx1.freebsd.org (Postfix) with ESMTP id 2D63E8FC0C; Thu, 16 Oct 2008 16:39:49 +0000 (UTC) (envelope-from taku@tackymt.homeip.net) Received: from localhost (localhost [127.0.0.1]) by basalt.tackymt.homeip.net (Postfix) with ESMTP id F12331075B; Fri, 17 Oct 2008 01:39:48 +0900 (JST) X-Virus-Scanned: amavisd-new at tackymt.homeip.net Received: from localhost ([127.0.0.1]) by localhost (basalt.tackymt.homeip.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cMmGxc1yeZd7; Fri, 17 Oct 2008 01:39:46 +0900 (JST) Received: from basalt.tackymt.homeip.net (basalt.tackymt.homeip.net [IPv6:2001:3e0:577:0:20d:61ff:fecc:2253]) by basalt.tackymt.homeip.net (Postfix) with ESMTP; Fri, 17 Oct 2008 01:39:46 +0900 (JST) Date: Fri, 17 Oct 2008 01:39:46 +0900 From: Taku YAMAMOTO To: "M. Warner Losh" Message-Id: <20081017013946.3534221e.taku@tackymt.homeip.net> In-Reply-To: <20081016.092844.-1548243521.imp@bsdimp.com> References: <48F7121A.2010307@FreeBSD.org> <20081016.081628.43009259.imp@bsdimp.com> <48F75773.7030100@FreeBSD.org> <20081016.092844.-1548243521.imp@bsdimp.com> X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.9; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: mav@freebsd.org, freebsd-mobile@freebsd.org, freebsd-arm@freebsd.org, freebsd-current@freebsd.org, zbeeble@gmail.com 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: Thu, 16 Oct 2008 16:39:50 -0000 On Thu, 16 Oct 2008 09:28:44 -0600 (MDT) "M. Warner Losh" wrote: > In message: <48F75773.7030100@FreeBSD.org> > Alexander Motin writes: > : No, it's opposite. With lower frequency I have proportionally smaller > : delays (more loop iterations). I don't remember exact numbers now, but > : general tendency was like: with 2400MHz - 10 iterations, with 1200MHz - > : 20 iterations and with 100MHz - 240 iterations. But neither syslog, nor > : my eyes saw any visible delay there. > > You have more iterations. I'd have expected less. This doesn't say > anything at all about DELAY, per se. If you are waiting for 1M cycles > at 100MHz, it is only .01s, while at 10MHz it is .1s. Delay is > implemented by reading a counter in the 8254 that's been calibrated. > So unless the clock that's clocking it is running FASTER, delay won't > be the source of additional iterations. > > Hmmm, looking at the i386 delay code, it looks like it depends on > tsc_frequency being right when tsc isn't broken. If that's set > bogusly, that could cause DELAY to be slower... I have a Core 2 Duo whose TSC ticks regardless of how EST is set. In conjunction of tsc_freq_changed() function defined in tsc.c, tsc_freq becomes lower than actual, thus shorter DELAY(). Maybe his machine has the same. -- -|-__ YAMAMOTO, Taku | __ < - A chicken is an egg's way of producing more eggs. - From owner-freebsd-arm@FreeBSD.ORG Thu Oct 16 16:52:17 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 446C910656AB; Thu, 16 Oct 2008 16:52:17 +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 ED8C38FC1A; Thu, 16 Oct 2008 16:52:16 +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 m9GGn1r8014970; Thu, 16 Oct 2008 10:49:01 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 16 Oct 2008 10:50:02 -0600 (MDT) Message-Id: <20081016.105002.-1975970550.imp@bsdimp.com> To: taku@tackymt.homeip.net From: "M. Warner Losh" In-Reply-To: <20081017013946.3534221e.taku@tackymt.homeip.net> References: <48F75773.7030100@FreeBSD.org> <20081016.092844.-1548243521.imp@bsdimp.com> <20081017013946.3534221e.taku@tackymt.homeip.net> 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: mav@FreeBSD.org, freebsd-mobile@FreeBSD.org, stas@FreeBSD.org, freebsd-arm@FreeBSD.org, freebsd-current@FreeBSD.org, zbeeble@gmail.com 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: Thu, 16 Oct 2008 16:52:17 -0000 In message: <20081017013946.3534221e.taku@tackymt.homeip.net> Taku YAMAMOTO writes: : On Thu, 16 Oct 2008 09:28:44 -0600 (MDT) : "M. Warner Losh" wrote: : : > In message: <48F75773.7030100@FreeBSD.org> : > Alexander Motin writes: : > : No, it's opposite. With lower frequency I have proportionally smaller : > : delays (more loop iterations). I don't remember exact numbers now, but : > : general tendency was like: with 2400MHz - 10 iterations, with 1200MHz - : > : 20 iterations and with 100MHz - 240 iterations. But neither syslog, nor : > : my eyes saw any visible delay there. : > : > You have more iterations. I'd have expected less. This doesn't say : > anything at all about DELAY, per se. If you are waiting for 1M cycles : > at 100MHz, it is only .01s, while at 10MHz it is .1s. Delay is : > implemented by reading a counter in the 8254 that's been calibrated. : > So unless the clock that's clocking it is running FASTER, delay won't : > be the source of additional iterations. : > : > Hmmm, looking at the i386 delay code, it looks like it depends on : > tsc_frequency being right when tsc isn't broken. If that's set : > bogusly, that could cause DELAY to be slower... : : I have a Core 2 Duo whose TSC ticks regardless of how EST is set. : In conjunction of tsc_freq_changed() function defined in tsc.c, : tsc_freq becomes lower than actual, thus shorter DELAY(). : : Maybe his machine has the same. That would cause the problem. If we're bogusly adjusting tsc_freq we should fix that... Warner From owner-freebsd-arm@FreeBSD.ORG Thu Oct 16 17:25:38 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 0CAF3106569A; Thu, 16 Oct 2008 17:25:38 +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 D02A28FC16; Thu, 16 Oct 2008 17:25:36 +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 225242339; Thu, 16 Oct 2008 20:25:35 +0300 Message-ID: <48F7790F.5000904@FreeBSD.org> Date: Thu, 16 Oct 2008 20:25:35 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.16 (X11/20080726) MIME-Version: 1.0 To: Taku YAMAMOTO References: <48F7121A.2010307@FreeBSD.org> <20081016.081628.43009259.imp@bsdimp.com> <48F75773.7030100@FreeBSD.org> <20081016.092844.-1548243521.imp@bsdimp.com> <20081017013946.3534221e.taku@tackymt.homeip.net> In-Reply-To: <20081017013946.3534221e.taku@tackymt.homeip.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-mobile@freebsd.org, freebsd-arm@freebsd.org, freebsd-current@freebsd.org, zbeeble@gmail.com 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: Thu, 16 Oct 2008 17:25:38 -0000 Taku YAMAMOTO wrote: > On Thu, 16 Oct 2008 09:28:44 -0600 (MDT) > "M. Warner Losh" wrote: > >> In message: <48F75773.7030100@FreeBSD.org> >> Alexander Motin writes: >> : No, it's opposite. With lower frequency I have proportionally smaller >> : delays (more loop iterations). I don't remember exact numbers now, but >> : general tendency was like: with 2400MHz - 10 iterations, with 1200MHz - >> : 20 iterations and with 100MHz - 240 iterations. But neither syslog, nor >> : my eyes saw any visible delay there. >> >> You have more iterations. I'd have expected less. This doesn't say >> anything at all about DELAY, per se. If you are waiting for 1M cycles >> at 100MHz, it is only .01s, while at 10MHz it is .1s. Delay is >> implemented by reading a counter in the 8254 that's been calibrated. >> So unless the clock that's clocking it is running FASTER, delay won't >> be the source of additional iterations. >> >> Hmmm, looking at the i386 delay code, it looks like it depends on >> tsc_frequency being right when tsc isn't broken. If that's set >> bogusly, that could cause DELAY to be slower... > > I have a Core 2 Duo whose TSC ticks regardless of how EST is set. > In conjunction of tsc_freq_changed() function defined in tsc.c, > tsc_freq becomes lower than actual, thus shorter DELAY(). > > Maybe his machine has the same. Indeed: CPU: Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz (2394.01-MHz K8-class CPU) Origin = "GenuineIntel" Id = 0x6fb Stepping = 11 Features=0xbfebfbff Features2=0xe3bd AMD Features=0x20100800 AMD Features2=0x1 Cores per package: 2 FreeBSD 8.0-CURRENT amd64. -- Alexander Motin From owner-freebsd-arm@FreeBSD.ORG Fri Oct 17 07:16:52 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 442F2106568A; Fri, 17 Oct 2008 07:16:52 +0000 (UTC) (envelope-from webmaster@kibab.com) Received: from smtp.ht-systems.ru (mr0.ht-systems.ru [78.110.50.55]) by mx1.freebsd.org (Postfix) with ESMTP id 1086F8FC4F; Fri, 17 Oct 2008 07:16:51 +0000 (UTC) (envelope-from webmaster@kibab.com) Received: from [83.237.169.185] (helo=kibab-nb) by smtp.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1KqjZm-0001QL-Ub; Fri, 17 Oct 2008 11:16:47 +0400 Date: Fri, 17 Oct 2008 11:16:50 +0400 From: Ilya Bakulin To: Alexander Motin Message-Id: <20081017111650.a84afa26.webmaster@kibab.com> In-Reply-To: <48F7790F.5000904@FreeBSD.org> References: <48F7121A.2010307@FreeBSD.org> <20081016.081628.43009259.imp@bsdimp.com> <48F75773.7030100@FreeBSD.org> <20081016.092844.-1548243521.imp@bsdimp.com> <20081017013946.3534221e.taku@tackymt.homeip.net> <48F7790F.5000904@FreeBSD.org> Organization: HT-Systems X-Mailer: Sylpheed 2.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Fri__17_Oct_2008_11_16_50_+0400_rnekfZlu8fHMD.yt" Cc: freebsd-arm@freebsd.org, freebsd-mobile@freebsd.org, Taku YAMAMOTO , freebsd-current@freebsd.org, zbeeble@gmail.com 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: Fri, 17 Oct 2008 07:16:52 -0000 --Signature=_Fri__17_Oct_2008_11_16_50_+0400_rnekfZlu8fHMD.yt Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, 16 Oct 2008 20:25:35 +0300 Alexander Motin wrote: > Indeed: > CPU: Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz (2394.01-MHz=20 > K8-class CPU) > Origin =3D "GenuineIntel" Id =3D 0x6fb Stepping =3D 11 > Features=3D0xbfebfbff MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS, > HTT,TM,PBE> > Features2=3D0xe3bd xTPR,PDCM> > AMD Features=3D0x20100800 > AMD Features2=3D0x1 > Cores per package: 2 >=20 > FreeBSD 8.0-CURRENT amd64. >=20 > --=20 > Alexander Motin Same here:=20 CPU: Intel(R) Core(TM)2 Duo CPU T5870 @ 2.00GHz (1995.01-MHz 686-class= CPU) Origin =3D "GenuineIntel" Id =3D 0x6fd Stepping =3D 13 Features=3D0xbfebfbff Features2=3D0xe39d AMD Features=3D0x20100000 AMD Features2=3D0x1 Cores per package: 2 Running FreeBSD 7-STABLE i386. On Mon, 13 Oct 2008 11:03:10 -0600 (MDT) "M. Warner Losh" wrote: > I can't believe that you had a card that took 4s to become active! >=20 > Can you confirm the elapsed time is really 4s for that card? > Otherwise, this may be pointing out a bug in another area of the > code... >=20 > Warner I don't have this card any more. And regarging my SD... I can't do exact me= asures. What I have done yesterday is: ; Running at full frequency: Oct 16 11:53:50 kibab-nb sudo: kibab : TTY=3Dttyp3 ; PWD=3D/home/kibab ; US= ER=3Droot ; COMMAND=3D/etc/rc.d/powerd stop Oct 16 11:54:00 kibab-nb sudo: = kibab : TTY=3Dttyp3 ; PWD=3D/home/kibab ; USER=3Droot ; COMMAND=3D/usr/sbin= /powerd -a max=20 Oct 16 11:54:49 kibab-nb kernel: mmc0: on sdhci 0 Oct 16 11:54:49 kibab-nb kernel: mmc_send_app_ocond(): cmd completed in 0= iter=20 Oct 16 11:54:50 kibab-nb kernel: mmc_send_app_ocond(): cmd completed in 35 = iter 35 iterations! ; Running at lowest possible frequency: Oct 16 11:55:27 kibab-nb sudo: kibab : TTY=3Dttyp3 ; PWD=3D/home/kibab ; US= ER=3Droot ; COMMAND=3D/etc/rc.d/powerd stop Oct 16 11:55:30 kibab-nb sudo: = kibab : TTY=3Dttyp3 ; PWD=3D/home/kibab ; USER=3Droot ; COMMAND=3D/usr/sbin= /powerd -a min=20 Oct 16 11:55:46 kibab-nb kernel: mmc0: on sdhci0=20 Oct 16 11:55:46 kibab-nb kernel: mmc_send_app_ocond(): cmd completed in 0 i= ter=20 Oct 16 11:55:46 kibab-nb kernel: mmc_send_app_ocond(): cmd completed in 185= iter=20 185 iterations at lowest frequency... Sorry for long answer delay. --=20 Ilya Bakulin --Signature=_Fri__17_Oct_2008_11_16_50_+0400_rnekfZlu8fHMD.yt Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkj4O+UACgkQo9vlj1oadwiOCACfTenAz/ehFZVm55MLwCDnCY1F 4uYAn3uJ4c9NwCnnPTgR00skTv99IPrB =xqme -----END PGP SIGNATURE----- --Signature=_Fri__17_Oct_2008_11_16_50_+0400_rnekfZlu8fHMD.yt-- From owner-freebsd-arm@FreeBSD.ORG Sat Oct 18 08:03:20 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 56E781065693 for ; Sat, 18 Oct 2008 08:03:20 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id D6AFA8FC27 for ; Sat, 18 Oct 2008 08:03:19 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so645079fgb.35 for ; Sat, 18 Oct 2008 01:03:18 -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=TtrH16rzGDkWQH4agGhl4wA4hF8dAWRbZwGSAkKC9/s=; b=m0ZuCSHIAkhsmovmjSoX+9A/3FoxrOxXIALNUXlk0mEKHwSnkKcpPt5df1w+lxZh5F 7UNL6NObH9aNJDgMhfHxHUEkUySOEw1ZMJeY5veksfOJfUgiZtmXAXKuHPK40LR2+b4o 2H+SyxmRuY/JX3pI8kzi4VvdiC1eGQnwZxGdE= 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=ZAfBBIORIqcm06PmkJT+iQAS9zGlJGpxZhbfCnChRoYtgnfc+cbdfiUW4Wo5QpV6Dr 9fksO2cmjQTxjp6nSyQDZ5MzyE/OBr+UYkWj6uDztAq809dvLdu2+pJU67Dr8CuTMUuP 1E6djpiVLsdn0yr2/sdwBd8QpHc4CNTWOVa5g= Received: by 10.102.228.10 with SMTP id a10mr2681625muh.109.1224316998115; Sat, 18 Oct 2008 01:03:18 -0700 (PDT) Received: by 10.103.17.17 with HTTP; Sat, 18 Oct 2008 01:03:17 -0700 (PDT) Message-ID: Date: Sat, 18 Oct 2008 10:03:17 +0200 From: "Jacques Fourie" 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-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: Sat, 18 Oct 2008 08:03:20 -0000 > 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-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" > The device in my HP nw8240 notebook is a Texas Instruments 7621. This device is a multi-function PCI device with a CardBus, firewire, Flash Media and SD controller. The only way that I could get this driver to work for me is to disable SD card detection on the Flash Media controller, which is function 3 : pcitweak -w 02:06:03 -b 0x4c 0x02 Thanks for the great work! From owner-freebsd-arm@FreeBSD.ORG Sat Oct 18 15:58:42 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 12F9910656A2; Sat, 18 Oct 2008 15:58:42 +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 A62BD8FC0A; Sat, 18 Oct 2008 15:58:41 +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 m9IFu1o7064732; Sat, 18 Oct 2008 09:56:01 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 18 Oct 2008 09:57:03 -0600 (MDT) Message-Id: <20081018.095703.-135512205.imp@bsdimp.com> To: jacques.fourie@gmail.com From: "M. Warner Losh" In-Reply-To: References: <48DEA8E7.2080503@FreeBSD.org> <48F11087.20403@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: mav@FreeBSD.org, freebsd-current@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: Sat, 18 Oct 2008 15:58:42 -0000 In message: "Jacques Fourie" writes: : > 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-arm@freebsd.org mailing list : > http://lists.freebsd.org/mailman/listinfo/freebsd-arm : > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" : > : : The device in my HP nw8240 notebook is a Texas Instruments 7621. This : device is a multi-function PCI device with a CardBus, firewire, Flash : Media and SD controller. The only way that I could get this driver to : work for me is to disable SD card detection on the Flash Media : controller, which is function 3 : : : pcitweak -w 02:06:03 -b 0x4c 0x02 I have patches to mav's sdhci driver to do this. However, I can't get the driver to work. It detects the cards are inserted, but then all commands that require a response from the card fail. How many slots does your controller report? Which one is sd? Warner From owner-freebsd-arm@FreeBSD.ORG Sat Oct 18 17:01:10 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 6F2ED10656A1 for ; Sat, 18 Oct 2008 17:01:10 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.184]) by mx1.freebsd.org (Postfix) with ESMTP id E48578FC21 for ; Sat, 18 Oct 2008 17:01:09 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: by mu-out-0910.google.com with SMTP id i2so1039381mue.3 for ; Sat, 18 Oct 2008 10:01:08 -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=DXE3bYnLuUQZ0UaaOgF3ZiIGuT6k+QW9fO/kcKgM4I0=; b=A78AWWsPhP3JXvcIshwp6SGc3zPrqHHnsUAK1kpOHg8oHjkCgfxY2aMOjJBKafXWAQ 6F8/Hl4bDMdjZLC4/rv7bnF76oGDBJDtQjlcs4zMO9uZ3TkTdlrWbictjC19HPrE2CIG D/jEzIcBcEUeo8Ts9PvBcy0Xuo4AmZfK+OdIg= 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=RY54QQJFA/PZTk5mxe8imSUlSs+qmZppdu4K7Pdc90blyQwxDBVP3OaRXnbZNLOri/ cQReSrn8jm6VW7VezkkJN8KBMhfMb++LzWcXAqq0APqTkIw/YIuLAUbuLj57dLnrSqbv +oOVAO9eUHqe0O2hZgFX/048eR6djlwg0iyZg= Received: by 10.103.169.1 with SMTP id w1mr350118muo.41.1224349268150; Sat, 18 Oct 2008 10:01:08 -0700 (PDT) Received: by 10.103.17.17 with HTTP; Sat, 18 Oct 2008 10:01:07 -0700 (PDT) Message-ID: Date: Sat, 18 Oct 2008 19:01:07 +0200 From: "Jacques Fourie" To: "M. Warner Losh" In-Reply-To: <20081018.095703.-135512205.imp@bsdimp.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> <48F11087.20403@FreeBSD.org> <20081018.095703.-135512205.imp@bsdimp.com> Cc: mav@freebsd.org, freebsd-current@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: Sat, 18 Oct 2008 17:01:10 -0000 > In message: > "Jacques Fourie" writes: > : > 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-arm@freebsd.org mailing list > : > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > : > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" > : > > : > : The device in my HP nw8240 notebook is a Texas Instruments 7621. This > : device is a multi-function PCI device with a CardBus, firewire, Flash > : Media and SD controller. The only way that I could get this driver to > : work for me is to disable SD card detection on the Flash Media > : controller, which is function 3 : > : > : pcitweak -w 02:06:03 -b 0x4c 0x02 > > I have patches to mav's sdhci driver to do this. However, I can't get > the driver to work. It detects the cards are inserted, but then all > commands that require a response from the card fail. > > How many slots does your controller report? Which one is sd? > > Warner > My controller reports 3 slots, with the third one being sd. Jacques