mbox series

[0/2] serial: msm-geni: rework oversampling and fix clk API bug

Message ID 20231114-b4-geni-uart-v1-0-48c8ba9dda36@linaro.org
Headers show
Series serial: msm-geni: rework oversampling and fix clk API bug | expand

Message

Caleb Connolly Nov. 14, 2023, 12:51 p.m. UTC
These patches improve GENI UART support during init by implementing the
parent property read directly rather than via a misc device, and fixing
the error path when the clock can't be found.

In my testing, the first few lines of UART output on platforms with
non-default oversampling values is often garbled, this is because the
parent misc device hasn't yet probed and so the clock rate is incorrect.

It is simpler to just access the geni-se parent device directly rather
than via a misc device, especially as we only need to read a single
register for now.

Additionally, this series makes it a hard requirement that the GENI UART
node is a child of the generic geni-se controller. This allows us to
print a useful error if DTS is incorrect rather than attempting to
continue without reading the oversampling value could result in a lot of
confusion during platform bringup.

---
Caleb Connolly (2):
      serial: msm-geni: don't rely on parent misc device
      serial: msm-geni: handle devm_clk_get() errors

 drivers/misc/Kconfig             |  7 -------
 drivers/misc/Makefile            |  1 -
 drivers/misc/qcom-geni-se.c      | 41 ----------------------------------------
 drivers/serial/Kconfig           |  2 --
 drivers/serial/serial_msm_geni.c | 40 ++++++++++++++++++++++++++-------------
 5 files changed, 27 insertions(+), 64 deletions(-)
---
base-commit: f3fc930d775ef5c1b7b74b1427491a17680e66ae

// Caleb (they/them)

Comments

Caleb Connolly Dec. 4, 2023, 3:53 p.m. UTC | #1
On Tue, 14 Nov 2023 12:51:10 +0000, Caleb Connolly wrote:
> These patches improve GENI UART support during init by implementing the
> parent property read directly rather than via a misc device, and fixing
> the error path when the clock can't be found.
> 
> In my testing, the first few lines of UART output on platforms with
> non-default oversampling values is often garbled, this is because the
> parent misc device hasn't yet probed and so the clock rate is incorrect.
> 
> [...]

Applied, thanks!

[1/2] serial: msm-geni: don't rely on parent misc device
      commit: 393825c304411c6483dbfbc45ea09c577365ddb9
[2/2] serial: msm-geni: handle devm_clk_get() errors
      commit: afd9dcf23cb232dd5f352336c6b389691682be47

Best regards,