From owner-freebsd-arm@FreeBSD.ORG Wed Feb 12 04:15:21 2014 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A891BCB for ; Wed, 12 Feb 2014 04:15:21 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 54BDD1154 for ; Wed, 12 Feb 2014 04:15:19 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WDQto-0009es-8C; Wed, 12 Feb 2014 03:54:12 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s1C3s9uM073577; Tue, 11 Feb 2014 20:54:09 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18vNrxlPVUP3Gy+7dPv9Rg9 Subject: Re: wandboard / imx6 / exynos4 / cortex-a9 "wrong-endian bug" fixed From: Ian Lepore To: Bernd Walter In-Reply-To: <20140211134438.GD94205@cicely7.cicely.de> References: <1391371204.13026.43.camel@revolution.hippie.lan> <20140202230450.GA42331@cicely7.cicely.de> <20140210041313.GB89777@cicely7.cicely.de> <1392042832.1145.8.camel@revolution.hippie.lan> <20140211010733.GC94205@cicely7.cicely.de> <20140211134438.GD94205@cicely7.cicely.de> Content-Type: multipart/mixed; boundary="=-E08JNmeOtooT39v3lT6g" Date: Tue, 11 Feb 2014 20:54:08 -0700 Message-ID: <1392177248.1145.43.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: freebsd-arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Feb 2014 04:15:21 -0000 --=-E08JNmeOtooT39v3lT6g Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Tue, 2014-02-11 at 14:44 +0100, Bernd Walter wrote: > On Tue, Feb 11, 2014 at 02:07:33AM +0100, Bernd Walter wrote: > > On Mon, Feb 10, 2014 at 07:33:52AM -0700, Ian Lepore wrote: > > > On Mon, 2014-02-10 at 05:13 +0100, Bernd Walter wrote: > > > > On Mon, Feb 03, 2014 at 12:04:50AM +0100, Bernd Walter wrote: > > > [...] > > > > Second boot worked better, but booting hanged after devd. > > > > ... > > > > > > I have also seen this hang in devd during rc-script processing, a few > > > times recently. ^T always shows it to be in a nanslp wait. > > > > Never seen this again so far. > > > > > I've never used crochet or tried to use growfs, that may not be an > > > arm-related problem from the looks of it. > > > > Someone said he hadn't seen it on a recently updated Beaglebone, but > > not sure how recent the source code had been. > > I can't do Beaglebone tests myself, since I'm waiting for new boards. > > > > > I've never had getty/login hang in nanslp like that. When I'm running > > > with nfs root it tends to hang in rpccon state, and that's frequency and > > > annoying enough that I'm going to have to debug it soon (for all I know > > > that problem may be my old 8.4 nfs server). > > > > Interesting. > > > > I can't seen to get the second microSD-slot running. > > The controllers get attached, but mmc only to the onboard slot. > > The WiFi is SDIO, which I didn't compile into the kernel and I noticed > > there is a GPIO used to enable the chip. > > Strange enough the 4th controller gets an mmc1 device attached: > sdhci_imx3: mem 0x219c000-0x219ffff irq 57 on simplebus2 > sdhci_imx3-slot0: 200MHz HS 4bits 3.3V 3.0V PIO > sdhci_imx3-slot0: ============== REGISTER DUMP ============== > sdhci_imx3-slot0: Sys addr: 0x00000000 | Version: 0x00000002 > sdhci_imx3-slot0: Blk size: 0x00000000 | Blk cnt: 0x00000001 > sdhci_imx3-slot0: Argument: 0x00000000 | Trn mode: 0x00000000 > sdhci_imx3-slot0: Present: 0xf78d8088 | Host ctl: 0x00000000 > sdhci_imx3-slot0: Power: 0x0000000d | Blk gap: 0x00000080 > sdhci_imx3-slot0: Wake-up: 0x00000008 | Clock: 0x00000002 > sdhci_imx3-slot0: Timeout: 0x00000080 | Int stat: 0x00000000 > sdhci_imx3-slot0: Int enab: 0x017f00fb | Sig enab: 0x017f00fb > sdhci_imx3-slot0: AC12 err: 0x00000000 | Slot int: 0x00000000 > sdhci_imx3-slot0: Caps: 0x0377c800 | Max curr: 0x80000000 > sdhci_imx3-slot0: =========================================== > mmc1: on sdhci_imx3 > > It hangs on probing, but it is my understanding that this controller > isn't wired at all on wandboard. > But why isn't there an attachment with the other two controllers. > I can't get the uSD slot on the carrier board to work either, but my symptoms are different. Aha! I just noticed that Freescale moved some bits around in the Present State register and defined some that are undefined in the spec and so on. I completely overlooked that when I was writing the driver. I need to write some proper translation routines, which ain't happening tonight. :) But, as proof of concept, the attached little crude hack makes it successfully probe both of my sd slots now. -- Ian --=-E08JNmeOtooT39v3lT6g Content-Disposition: inline; filename="imx_sdhci_detect_hack.diff" Content-Type: text/x-patch; name="imx_sdhci_detect_hack.diff"; charset="us-ascii" Content-Transfer-Encoding: 7bit Index: sys/arm/freescale/imx/imx_sdhci.c =================================================================== --- sys/arm/freescale/imx/imx_sdhci.c (revision 261700) +++ sys/arm/freescale/imx/imx_sdhci.c (working copy) @@ -298,6 +298,9 @@ imx_sdhci_read_4(device_t dev, struct sdhci_slot * val32 |= sc->r1bfix_intmask; } + if (off == SDHCI_PRESENT_STATE && device_get_unit(dev) != 1) + val32 |= SDHCI_CARD_PRESENT; + return val32; } --=-E08JNmeOtooT39v3lT6g--