[U-Boot] [PATCH v2 6/6] dm: sunxi: Add support for serial using driver model

Ian Campbell ijc at hellion.org.uk
Thu Oct 30 10:08:28 CET 2014


On Wed, 2014-10-29 at 13:28 -0600, Simon Glass wrote:
> > In the meantime could we somehow replace/augment the #ifdef chain in
> > gpio_init with something keyed off the stdout alias perhaps?
> 
> Tegra has code to convert a device interrupt number (which uniquely
> identifies a peripheral in that SoC) to an internal peripheral ID,
> then these is a function which can enable a peripheral given the ID
> (funcmux). In some cases you could have multiple options for the
> funcmux, but there is no easy way to support this.

I think that although there are multiple options for some functions
(UARTs come to mind) we haven't yet found the need to make any dynamic
choices, so it's all static right now.

>  But this approach
> might be good enough for sunxi. We can easily write the function to
> enable the pins for a particular port, and this could go in
> arch/arm/...sunxi/ perhaps.

I'm ok with it so long as it isn't going to stand in the way of proper
dt based pinmux in the future.

One way to help with that might be to use the allwinner,function
property in DT as the funcmux name.

Hans, what do you think?

Ian.



More information about the U-Boot mailing list