serial: msm: Re-enable after resetting
The documentation for the UART controller in the APQ8016E specifies that both RESET and ENABLE commands must be issued to set up the receiver and transmitter, but at the moment we only issue RESET. This doesn't seem to cause issues in practice (looks like the reset already re-enables the receiver/transmitter), but let's add the two writes to RX_ENABLE/TX_ENABLE to better match the recommendations in the documentation. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Tested-by: Alexey Minnekhanov <alexeymin@minlexx.ru> Acked-by: Sumit Garg <sumit.garg@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250908-db410c-autoboot-fixes-v2-5-316ed98e0143@linaro.org Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
This commit is contained in:
committed by
Casey Connolly
parent
eac35b9027
commit
5b83a081a7
@@ -50,6 +50,8 @@
|
||||
#define UARTDM_SR_UART_OVERRUN (1 << 4) /* Receive overrun */
|
||||
|
||||
#define UARTDM_CR 0xA8 /* Command register */
|
||||
#define UARTDM_CR_RX_ENABLE (1 << 0) /* Enable receiver */
|
||||
#define UARTDM_CR_TX_ENABLE (1 << 2) /* Enable transmitter */
|
||||
#define UARTDM_CR_CMD_RESET_RX (1 << 4) /* Reset receiver */
|
||||
#define UARTDM_CR_CMD_RESET_TX (2 << 4) /* Reset transmitter */
|
||||
#define UARTDM_CR_CMD_RESET_ERR (3 << 4) /* Clear overrun error */
|
||||
@@ -225,6 +227,8 @@ static void uart_dm_init(struct msm_serial_data *priv)
|
||||
|
||||
writel(UARTDM_CR_CMD_RESET_RX, priv->base + UARTDM_CR);
|
||||
writel(UARTDM_CR_CMD_RESET_TX, priv->base + UARTDM_CR);
|
||||
writel(UARTDM_CR_RX_ENABLE, priv->base + UARTDM_CR);
|
||||
writel(UARTDM_CR_TX_ENABLE, priv->base + UARTDM_CR);
|
||||
}
|
||||
static int msm_serial_probe(struct udevice *dev)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user