serial: msm-geni: correct oversampling value based on QUP hardware revision
authorVladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Fri, 21 Apr 2023 17:50:40 +0000 (20:50 +0300)
committerTom Rini <trini@konsulko.com>
Tue, 2 May 2023 18:23:59 +0000 (14:23 -0400)
commit10ea2a7a93ddec6fb424635f0fbd2e817254a26b
treeb2d16bbe9d1ee3f4430f744349e0e60a8152925b
parentaa539d89e18487ab5dc5feb3d8d8a3fca1a04b97
serial: msm-geni: correct oversampling value based on QUP hardware revision

Starting from QUP v2.5 the value of oversampling is changed from 32
to 16, keeping the old value on newer platforms results on wrong set
UART IP clock divider, thus the asked baudrate does not correspond to
the actually set with all the consequencies for a user.

The change links the driver to a new Qualcomm GENI SE QUP driver
to get its hardware version and update the oversampling value.

Deliberately the code under CONFIG_DEBUG_UART_MSM_GENI is not touched,
since a wanted baudrate can be controlled by setting a modified
CONFIG_DEBUG_UART_CLOCK build time variable.

Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
drivers/serial/Kconfig
drivers/serial/serial_msm_geni.c