Re: [RFD] Functional dependencies between devices
From: Mark Brown
Date: Sat Nov 21 2015 - 08:27:44 EST
On Thu, Nov 19, 2015 at 02:18:59PM +0100, Thierry Reding wrote:
> On Tue, Nov 17, 2015 at 01:55:49PM +0000, Mark Brown wrote:
> > On Tue, Nov 17, 2015 at 01:49:17PM +0100, Andrzej Hajda wrote:
> > > On 10/27/2015 04:24 PM, Rafael J. Wysocki wrote:
> > > this scenario:
> > > - many clock providers, irq domains are not provided by devices,
> > That seems like something we can and possibly should change if we want.
> It's not very trivial, unfortunately. I had a crack at that a long time
> ago, but the problem is that these devices all need to be available very
> early during boot, at which point devices aren't registered yet. With
> all the progress on probe deferral and the on-demand probing work this
> might be less of an issue nowadays, I haven't looked at it for quite a
> while.
I believe it's a lot easier to do that now but ICBW. We've started
needing to put these things into firmware so that we can refer to them
from clients so we pretty much have to deal with it. I've not had to
worry about it too much directly myself recently though.
> That said, one technique I've occasionally resorted to is to have some
> early code, be it one of the OF table things or an initcall, set up a
> basic environment, typically using global variables (yuck!), but then
> provide a proper driver that knows how to take these things over when
> its time comes. That's not a perfect solution, but at least it gives you
> a proper struct device to work with.
Indeed, that's also how things like the console work.
Attachment:
signature.asc
Description: PGP signature