[U-Boot] WIP for SPI

Simon Glass sjg at chromium.org
Wed Jul 23 12:50:41 CEST 2014


Hi Jon,


On 21 July 2014 07:11, Jon Loeliger <loeliger at gmail.com> wrote:
>>> And I think I am saying that we already *have* it generalized for
>>> the GPIOs but only if we remove that renumbering function!
>>>
>>> Consider again that the U_CLASS lookup of a GPIO simply matches
>>> versus the range in each uclass data (gpio base and count).  That search
>>> doesn't care about their order within the UCLASS_GPIO list.
>>>
>>> (Never mind that the renumbering breaks the association of the device
>>> base register and pin ranges as set up by the bind/probe code!)
>>
>> I wonder if we could do something similar then, where there is a
>> default numbering if none is provided, but the GPIO devices are able
>> to 'request' particular number ranges?
>
> I think we are talking past each other now.  Isn't that already in place?
> One can already register a device with a range in the UCLASS so
> that the lookup happens and matches to a particular device instance.
> (But only assuming they are NOT renumbered.)
>
> What am I missing here?

For GPIOs at present, we don't use the sequence numbering side - the
GPIO uclass numbers everything itself and does not permit boards to
specify numbering (other than by ordering in the device tree /
platform data).

For sequences we support specifying number by alias as well. I'm just
saying that for GPIOs we could (in future) enhance it to make the
numbering more flexible. If we can do this in a way that is general to
all devices (e.g. using sequenced) then that might be nice.

Regards,
Simon


More information about the U-Boot mailing list