diff mbox series

tty: serial: fsl_lpuart: fix the wrong mapbase value

Message ID 20210817063058.4718-1-sherry.sun@nxp.com
State Superseded
Headers show
Series tty: serial: fsl_lpuart: fix the wrong mapbase value | expand

Commit Message

Sherry Sun Aug. 17, 2021, 6:30 a.m. UTC
From: Andy Duan <fugang.duan@nxp.com>

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.

Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Adriana Reus <adriana.reus@nxp.com>
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
---
 drivers/tty/serial/fsl_lpuart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Greg Kroah-Hartman Aug. 18, 2021, 2:05 p.m. UTC | #1
On Tue, Aug 17, 2021 at 02:30:58PM +0800, Sherry Sun wrote:
> From: Andy Duan <fugang.duan@nxp.com>

> 

> 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.

> 

> Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>

> Acked-by: Fugang Duan <fugang.duan@nxp.com>

> Signed-off-by: Adriana Reus <adriana.reus@nxp.com>

> Signed-off-by: Sherry Sun <sherry.sun@nxp.com>

> ---


Why is there no signed-off-by from the author?

Please fix up.

thanks,

greg k-h
Sherry Sun Aug. 19, 2021, 1:27 a.m. UTC | #2
Hi Greg,

> -----Original Message-----

> From: Greg KH <gregkh@linuxfoundation.org>

> Sent: 2021年8月18日 22:05

> To: Sherry Sun <sherry.sun@nxp.com>

> Cc: jirislaby@kernel.org; linux-serial@vger.kernel.org; linux-

> kernel@vger.kernel.org; dl-linux-imx <linux-imx@nxp.com>

> Subject: Re: [PATCH] tty: serial: fsl_lpuart: fix the wrong mapbase value

> 

> On Tue, Aug 17, 2021 at 02:30:58PM +0800, Sherry Sun wrote:

> > From: Andy Duan <fugang.duan@nxp.com>

> >

> > 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.

> >

> > Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>

> > Acked-by: Fugang Duan <fugang.duan@nxp.com>

> > Signed-off-by: Adriana Reus <adriana.reus@nxp.com>

> > Signed-off-by: Sherry Sun <sherry.sun@nxp.com>

> > ---

> 

> Why is there no signed-off-by from the author?

> 

> Please fix up.


Sure, will add it in V2, thanks!

> 

> thanks,

> 

> greg k-h
Fabio Estevam Aug. 19, 2021, 1:54 a.m. UTC | #3
Hi Sherry,

On Tue, Aug 17, 2021 at 3:32 AM Sherry Sun <sherry.sun@nxp.com> wrote:
>

> From: Andy Duan <fugang.duan@nxp.com>

>

> 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.

>

> Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>

> Acked-by: Fugang Duan <fugang.duan@nxp.com>

> Signed-off-by: Adriana Reus <adriana.reus@nxp.com>

> Signed-off-by: Sherry Sun <sherry.sun@nxp.com>


You probably should add a Fixes tag.
Sherry Sun Aug. 19, 2021, 2:03 a.m. UTC | #4
Hi Fabio,

> -----Original Message-----

> From: Fabio Estevam <festevam@gmail.com>

> Sent: 2021年8月19日 9:55

> To: Sherry Sun <sherry.sun@nxp.com>

> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Jiri Slaby

> <jirislaby@kernel.org>; linux-serial@vger.kernel.org; linux-kernel <linux-

> kernel@vger.kernel.org>; dl-linux-imx <linux-imx@nxp.com>

> Subject: Re: [PATCH] tty: serial: fsl_lpuart: fix the wrong mapbase value

> 

> Hi Sherry,

> 

> On Tue, Aug 17, 2021 at 3:32 AM Sherry Sun <sherry.sun@nxp.com> wrote:

> >

> > From: Andy Duan <fugang.duan@nxp.com>

> >

> > 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.

> >

> > Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>

> > Acked-by: Fugang Duan <fugang.duan@nxp.com>

> > Signed-off-by: Adriana Reus <adriana.reus@nxp.com>

> > Signed-off-by: Sherry Sun <sherry.sun@nxp.com>

> 

> You probably should add a Fixes tag.


That's reasonable, I will add it. Thanks!

Best regards
Sherry
diff mbox series

Patch

diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index f0e5da77ed6d..460e428b7592 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -2611,7 +2611,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;