On 17.08.2023 12:32, Oleksii wrote:
> On Wed, 2023-08-16 at 15:39 +0200, Jan Beulich wrote:
>> Plus the question remains of it necessarily being com1: Is there no
>> way with DT to have multiple serial ports (e.g. one for the console
>> and one for a debugger)? If there indeed isn't, then unconditionally
>> using opt_com1[] here is of course okay, but then opt_com2[]
>> is effectively a dead variable and recognizing "com2" on the command
>> line (rather than spitting out an error) is then also a mistake. IOW
>> in that case both would want keeping x86-only (with a new #ifdef, as
>> we certainly don't want to have com1 and com2 stuff in separate
>> places).
> Actually it can be even more serial ports. For example, I have a board
> with 3 UARTs ( serial ports ).
> In this case, it looks that I should have 3 variable of opt_com{1-3}[]?
Well, this suggests there's a general shortcoming of the DT part of the
code here. I'm afraid I have to refer you to the Arm folks for guidance.
Jan
> Taking into account that opt_com{1-2} variables are needed only for
> configuration of serial ports in X86 ( in DT-based architectures all
> configuration info is inside a node of UART ) then we can check only
> opt_com1[].
>
> ~ Oleksii