>> I don't think we should initialize all 5 UARTs of SoC and let the user
>> define
>> all the expected devices on the command. Unless we want to do something like
>> 'macs_mask' ? but at the SoC level. It might be overkill for the need.
>
> I'm not sure I'm following what you are suggesting. If we are talking
> about QEMU device initialization, QEMU must initialize all devices
> on the board, regardless the guest code uses them or not.
The console is UART5 by default for all Aspeed boards and the SoC model
choose not to initialize UARTs [1-4] to simplify the command line and
avoid :
-serial null -serial null -serial null -serial null -serial stdio
This new fuji board uses a firmware which enables UART1 for the console.
So we have to change which UART is initialized. The simplest way is
to tell the SoC through a property and change appropriately :
serial_mm_init(get_system_memory(), sc->memmap[ASPEED_DEV_UART5], 2,
aspeed_soc_get_irq(s, ASPEED_DEV_UART5), 38400,
serial_hd(0), DEVICE_LITTLE_ENDIAN);
The above is doing the shortcut : serial0 <-> UART5.
Cheers,
C.