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

Simon Glass sjg at chromium.org
Wed Oct 29 20:28:42 CET 2014


Hi Ian,

On 29 October 2014 02:05, Ian Campbell <ijc at hellion.org.uk> wrote:
> On Mon, 2014-10-27 at 18:06 -0600, Simon Glass wrote:
>> Hi Ian,
>>
>> On 24 October 2014 03:42, Ian Campbell <ijc at hellion.org.uk> wrote:
>> > On Wed, 2014-10-22 at 22:02 -0600, Simon Glass wrote:
>> >> Add a driver for the designware serial UART used on sunxi. This just
>> >> redirects to the normal ns16550 driver.
>> >>
>> >> Add a stdout-path to the device tree so that the correct UART is chosen.
>> >>
>> >> Signed-off-by: Simon Glass <sjg at chromium.org>
>> >
>> > Should the UART related code in
>> > arch/arm/cpu/armv7/sunxi/board.c:gpio_init() be nobbled in this
>> > configuration?
>>
>> Yes I think that needs attention. Ideally we should be able to have
>> this handled by the serial driver (requesting the pinmux it needs) but
>> we don't have infrastructure for that as yet.
>
> Ah, I thought your earlier GPIO patches were that, but I suppose not.
>
>> Suggestions? What does the kernel do here?
>
> It has pinmux infra.
>
> 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. 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.

Regards,
Simon


More information about the U-Boot mailing list