* [PATCH] serial: mcfuart: fix uart port index
@ 2020-02-29 0:01 Angelo Dureghello
2020-03-13 17:24 ` Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Angelo Dureghello @ 2020-02-29 0:01 UTC (permalink / raw)
To: u-boot
From: Angelo Durgehello <angelo.dureghello@timesys.com>
Actually, using dev->seq value before probe to deduce the current
serial port index leads to reading an invalid seq value (-1).
So, getting dev->seq at probe time.
Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
---
drivers/serial/mcfuart.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/serial/mcfuart.c b/drivers/serial/mcfuart.c
index 066e5a18d8..b599064b48 100644
--- a/drivers/serial/mcfuart.c
+++ b/drivers/serial/mcfuart.c
@@ -85,6 +85,8 @@ static int coldfire_serial_probe(struct udevice *dev)
{
struct coldfire_serial_platdata *plat = dev->platdata;
+ plat->port = dev->seq;
+
return mcf_serial_init_common((uart_t *)plat->base,
plat->port, plat->baudrate);
}
@@ -148,8 +150,6 @@ static int coldfire_ofdata_to_platdata(struct udevice *dev)
return -ENODEV;
plat->base = (uint32_t)addr_base;
-
- plat->port = dev->seq;
plat->baudrate = gd->baudrate;
return 0;
--
2.25.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] serial: mcfuart: fix uart port index
2020-02-29 0:01 [PATCH] serial: mcfuart: fix uart port index Angelo Dureghello
@ 2020-03-13 17:24 ` Tom Rini
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2020-03-13 17:24 UTC (permalink / raw)
To: u-boot
On Sat, Feb 29, 2020 at 01:01:32AM +0100, Angelo Dureghello wrote:
> From: Angelo Durgehello <angelo.dureghello@timesys.com>
>
> Actually, using dev->seq value before probe to deduce the current
> serial port index leads to reading an invalid seq value (-1).
> So, getting dev->seq at probe time.
>
> Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200313/b0104a13/attachment.sig>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-13 17:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-29 0:01 [PATCH] serial: mcfuart: fix uart port index Angelo Dureghello
2020-03-13 17:24 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.