Skip to contentSkip to conversation

tty: serial: fsl_lpuart: fix the wrong mapbase value

PATCH Superseded Sherry Sun 1 participant 1 message Aug 19, 2021 TTY layer and serial drivers

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Sherry Sun

author
#0 lore raw

PATCH v2 1/1 tty: serial: fsl_lpuart: fix the wrong mapbase value

From: Andy Duan <[email protected]>

Register offset needs to be applied on mapbase also. dma_tx/rx_request use the physical address of UARTDATA. Register offset is currently only applied to membase (the corresponding virtual addr) but not on mapbase.

---
changes in V2:
Add author signed-off-by tag.

---
 drivers/tty/serial/fsl_lpuart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/fsl_lpuart.c +1 -1
index 31d715c4787a..117e011aff5f 100644
@@ -2615,7 +2615,7 @@ static int lpuart_probe(struct platform_device *pdev)
 		return PTR_ERR(sport->port.membase);
 
 	sport->port.membase += sdata->reg_off;
-	sport->port.mapbase = res->start;
+	sport->port.mapbase = res->start + sdata->reg_off;
 	sport->port.dev = &pdev->dev;
 	sport->port.type = PORT_LPUART;
 	sport->devtype = sdata->devtype;
Signature · 1 line
2.17.1