[PATCH] uart: make *_UART_NR platform independent

Sylvain Munaut 246tnt at gmail.com
Sat May 7 10:04:25 CEST 2011


> The enums should never be changed; that is the meaning of it all. The idea
> is to have consistent ids for the type of uart across the whole tree and
> have it mapped to the correct uart only in the platform specific uart.c

But it is not "platform" specific, it is _board_ specific. So the same
driver uart.c must deal with several mapping.

IMHO drivers should get as parameter the index of the device you want
to address and not some global id and map it internally to the driver.

What if I want for debug to output something on UART3 or something,
adding something like uart_putc(3, 'b') is much easier than having to
go add a new value for the enum and its mapping ...

If something doesn't get recompiled when a header change or something,
you must fix the build system.
The current system of trying to build for all platforms at once is
unsustainable IMHO and we should just have something like
make TARGET=compal_e88  make TARGET=sciphone_g2 or something and if
the TARGET is != from the last built target, just assume everything is
dirty.


Cheers,

    Sylvain



More information about the baseband-devel mailing list