Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Mar 2014 15:25:13 +0100
From:      Bernd Walter <ticso@cicely7.cicely.de>
To:        Ian Lepore <ian@freebsd.org>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, freebsd-arm@freebsd.org, freebsd-embedded@freebsd.org
Subject:   Re: [PATCH] simplebus child device probe order control via FDT (motivated by BeagleBone Black)
Message-ID:  <20140304142513.GH15675@cicely7.cicely.de>
In-Reply-To: <1393939277.1149.300.camel@revolution.hippie.lan>
References:  <CAD44qMUyqzaFtjgXdgThgHcHjPctx-oZAdhvHp4Kf0G7N4HVog@mail.gmail.com> <7C2B7036-51CC-4C97-80C4-0A439874357D@bsdimp.com> <CAD44qMXe8bh0cR60tm8%2BLZ9W3WhJDuGX6xz9FLNHrzmXNd5FDQ@mail.gmail.com> <1393939277.1149.300.camel@revolution.hippie.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 04, 2014 at 06:21:17AM -0700, Ian Lepore wrote:
> There's a standard property for mmc/sd devices, "non-removable" whose
> presence denotes things like soldered-on eMMC parts.  Only one of our
> many sdhci drivers supports it right now (imx).  In general the core
> part of the driver (dev/sdhci) doesn't have good support for
> insert/remove/presence detection that's handled off to the side (whether
> it's non-removable or a gpio pin).
> 
> That alone doesn't solve the wider problem, though, which I think breaks
> down into two pieces.  Let's say you've got two slots, call them left
> and right.  You end up with these two problems...
> 
>       * Sometimes the right slot is mmcsd0, but it turns into mmcsd1 if
>         there's a card in the left slot when I boot; I don't want it to
>         change.
>       * I want the slot on the left to be named '1' and the right to be
>         '0'.
> 
> The first problem is easily solved without impacting dts in any way.  We
> just wire down the relationship controllerN -> mmcN -> mmcsdN.  This is
> exactly equivelent to the old ATA_STATIC_ID option in its effect -- you
> don't get to choose the names, but you know they won't change based on
> which devices are present.  It could be controlled with a tunable.
> 
> It's harder to envision the fix for the second part without adding an
> ad-hoc property for the devices.  Even with a property I'm not sure how
> easy it would be.
> 
> There's been talk of moving mmcsd towards using CAM.  I don't know that
> much about cam, but I suspect it rules out doing anything about #1 as
> well.  At least, I've never heard of wiring down /dev/daN to a specific
> device/slot/whatever.

CAM has wiring support.
This had been the case for SCSI even before CAM was written and was
vital in the days with many SCSI drives but without disk labeling
support.

Example from sys/conf/NOTES:
hint.scbus.0.at="ahc0"
hint.scbus.1.at="ahc1"
hint.scbus.1.bus="0"
hint.scbus.3.at="ahc2"
hint.scbus.3.bus="0"
hint.scbus.2.at="ahc2"
hint.scbus.2.bus="1"
hint.da.0.at="scbus0"
hint.da.0.target="0"
hint.da.0.unit="0"
hint.da.1.at="scbus3"
hint.da.1.target="1"
hint.da.2.at="scbus2"
hint.da.2.target="3"
hint.sa.1.at="scbus1"
hint.sa.1.target="6"

-- 
B.Walter <bernd@bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140304142513.GH15675>