On 11/18/22 1:27 PM, Nishanth Menon wrote:
On 12:15-20221118, Andrew Davis wrote:
I don't see either of those addressed in that thread, only that
the aliases should go in the .dts files and be trimmed, nothing
Key is trimmed to what the system and ecosystem needs.
stops us from:
chosen {
stdout-path = "serial10:115200n8";
};
aliases {
serial10 = &main_uart8;
};
Do we need 10 serial aliases? There are'nt 10 serial ports exposed in
j782s2. ok - lets say we do this, then: [1] is needed to boot? but why
do we need to do that for all armv8 platforms when aliases allows us
Why do we need SERIAL_8250_NR_UARTS at all, might be a better question.
These should be dynamically allocated if the number goes over the
default count imposed by the TTY framework. Maybe folks are still a
bit too afraid to touch the TTY subsystem core, I don't blame them..
to trim it to just the 3 or 4 serial ports the platform really needs
That + being able to use the convention that serial2 is always linux
console, is'nt that a good thing? Hence recommending to just expose the
serialports as aliases to exactly what we need while keeping serial2 as
the linux console (which in this case happens to be main_uart8 - example
as j721s2 does).
"serial2 as the linux console" is *not* a convention, we just don't want to
fix up our bootloader/userspace to actually reason about what serial ports to
put logins on. Why not make ttyS10 the default, or ttyS666, it doesn't solve
your multi-distro issue either way since they usually only start a login on
ttyS0, console=, and/or the first virtual tty. Never on ttyS2. So you are
hacking up DT for a solution that doesn't do what you want in the end.
Andrew
[1] https://lore.kernel.org/lkml/3ab9addf-7938-fcf3-6147-15a998e37d2d@xxxxxx/