[U-Boot] [PATCH 00/71] serial: Massive rework of the serial subsystem

Marek Vasut
2012-09-17T23:12:53Z

Dear Tom Rini,

> On Mon, Sep 17, 2012 at 01:20:25AM +0200, Marek Vasut wrote:
> > This patchset is a STAGE 1 of preparation of the stdio and serial subsys
> > for the driver model.
>
> [snip]
>
> > 6) Remove unused code used for the non-multi operation
> >
> > Remove code that was used when CONFIG_SERIAL_MULTI was not selected.
> > Also remove all occurances of CONFIG_SERIAL_MULTI throughout the
> > source tree. Some parts of the code must have been adjusted to cope
> > with this since they were initially only written for non-multi
> > operation. These were minor adjustments mostly in macros though.
>
> So we've simplified the code in that now we only have one way of talking
> with the serial ports. And the drivers are a bit more uniform as well.
> Making the difference between drivers be "here is how you poke the
> hardware" rather than "here is how I implemented a serial driver and oh,
> here is how you poke the hardware" is good.

Correct

> But what's the next step?

So...

2) Rework stdio, make the creation of struct stdio_dev static instead of dynamic
3) struct serial_device is superset of struct stdio_dev ... make use of it, make
stdio and serial subsystems closer
4) The massive list of callbacks in serial.c is stupid, pull out the linker
section maker thingie (thing used to make driver lists there, similar to command
lists from u-boot) from the DM tree and allow generation of list of serial
drivers automagically.
=======
5) Flip over to DM, it's only one step away

> Have you any thoughts on trying to be clever and in the case of only one
> port anyways getting the size back?

This has been on my mind for a while after seeing those extra 3k of code all
around. Yet, I'm afraid this won't play well with the DM's pile of pointers.

On the other hand, my stdio rework (step 2) managed to trim down the size a bit,
so that might be small compensation.

> Thanks!

Best regards,
Marek Vasut