Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34582 )
Change subject: soc/intel/common/block/uart: Update the UART PCI device reference ......................................................................
Patch Set 4:
(2 comments)
I don't understand how you decided when to use `const` and when `DEVTREE_CONST`. If you'd use the latter for uart_get_ device(), too, the acpi code wouldn't make you any trouble.
https://review.coreboot.org/c/coreboot/+/34582/1/src/soc/intel/cannonlake/ua... File src/soc/intel/cannonlake/uart.c:
https://review.coreboot.org/c/coreboot/+/34582/1/src/soc/intel/cannonlake/ua... PS1, Line 53: struct device *soc_uart_console_to_device(int uart_console)
Ok I have the common UART functions to return and accept const data. […]
See CB:34613. No update of callers necessary, an implicit conversion to `const` is always allowed.
https://review.coreboot.org/c/coreboot/+/34582/4/src/soc/intel/skylake/acpi.... File src/soc/intel/skylake/acpi.c:
https://review.coreboot.org/c/coreboot/+/34582/4/src/soc/intel/skylake/acpi.... PS4, Line 663: uart_get_device That we need uart_get_device() to get a valid pointer shows that this is the wrong place for this code. If it were in the uart driver, we'd only have to check if the passed `device` is the debug UART and don't add the table otherwise.
For another day.