Re: [PATCH] serial: 8250_mtk: Add ACPI support

From: Yenchia Chen
Date: Wed Jan 15 2025 - 22:53:57 EST


> Wait, ::set_termios() is NOT optional.

Got it, will put it back in next version.

> This is a magic constant. Define a macro for this. Hint: 26 * HZ_PER_MHZ.
> Is it not/cannot it be part of the acpi table? What does MTKI0511 look like?

Currently clock settings are not included in ACPI table, so using fixed clock here.

We'd like to change the flow as shown below to remove the dependency on the ACPI device:

uart.port.set_termios = mtk8250_set_termios;
uart.port.uartclk = clk_get_rate(data->uart_clk);
+ if (!uart.port.uartclk)
+ uart.port.uartclk = 26 * HZ_PER_MZ;

> Why is this only for non-ACPI devices?

In ACPI devices, these registers are inaccessible due to some related settings not being configured.