serial: ns16550: Handle -ENOENT when requesting clock
PATCH 1/1 serial: ns16550: Handle -ENOENT when requesting clock
When calling clk_get_by_index(), fall back to the legacy method of getting the clock if -ENOENT is returned.
--- drivers/serial/ns16550.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/serial/ns16550.c +1 -1
@@ -408,7 +408,7 @@ int ns16550_serial_ofdata_to_platdata(struct udevice *dev) err =clk_get_rate (&clk);if (!IS_ERR_VALUE (err)) plat->clock = err; - }else if (err != -ENODEV && err != -ENOSYS ) { + }else if (err != -ENOENT && err != -ENODEV && err != -ENOSYS ) {debug ("ns16550 failed to get clock\n" );return err; }
Signature · 1 line
2.10.0
PATCH 1/1 serial: ns16550: Handle -ENOENT when requesting clock
Quoted 2 lines · Alexandre Courbot
When calling
clk_get_by_index(), fall back to the legacy method of getting the clock if-ENOENTis returned.
Withdrawing this patch as Thierry sent a better version of it.
PATCH 1/1 serial: ns16550: Handle -ENOENT when requesting clock
In reply to Alexandre CourbotQuoted 2 lines · Alexandre Courbot
When calling
clk_get_by_index(), fall back to the legacy method of getting the clock if-ENOENTis returned.
PATCH 1/1 serial: ns16550: Handle -ENOENT when requesting clock
Quoted 5 lines · Stephen Warren
Quoted 2 lines · Alexandre Courbot
When calling
clk_get_by_index(), fall back to the legacy method of getting the clock if-ENOENTis returned.Tested-by Stephen Warren <[email protected]>
Agreed, this looks like the more correct fix in retrospect.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161004/38ceb2d4/attachment.sig>
Quoted 6 lines · Alexandre Courbot
When calling
clk_get_by_index(), fall back to the legacy method of getting the clock if-ENOENTis returned.Signed-off-by Alexandre Courbot <[email protected]>Tested-by Stephen Warren <[email protected]>Acked-by Thierry Reding <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161006/87b6abb9/attachment.sig>