mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] serial: amba-pl011: set fwnode from parent device
@ 2023-10-13 15:47 Emil Kronborg Andersen
  2023-10-13 21:28 ` Saravana Kannan
  0 siblings, 1 reply; 3+ messages in thread
From: Emil Kronborg Andersen @ 2023-10-13 15:47 UTC (permalink / raw)
  To: linux; +Cc: emkan, gregkh, jirislaby, linux-kernel, linux-serial, saravanak

After commit 3fb16866b51d ("driver core: fw_devlink: Make cycle
detection more robust"), consumer devices without their fwnode set
printed errors like the one below:

[    0.261887] uart-pl011 3f201000.serial: Failed to create device link (0x180) with soc:firmware:gpio

To fix this, set the fwnode so fw_devlink can find and handle it
properly.

Fixes: 3fb16866b51d ("driver core: fw_devlink: Make cycle detection more robust")
Signed-off-by: Emil Kronborg Andersen <emkan@prevas.dk>
---
 drivers/tty/serial/amba-pl011.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 3dc9b0fcab1c..29cef84b71c0 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -2798,6 +2798,8 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
 	int portnr, ret;
 	u32 val;
 
+	device_set_node(&dev->dev, dev_fwnode(dev->dev.parent));
+
 	portnr = pl011_find_free_port();
 	if (portnr < 0)
 		return portnr;
-- 
2.41.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] serial: amba-pl011: set fwnode from parent device
  2023-10-13 15:47 [PATCH] serial: amba-pl011: set fwnode from parent device Emil Kronborg Andersen
@ 2023-10-13 21:28 ` Saravana Kannan
  2023-10-16 10:04   ` Emil Kronborg
  0 siblings, 1 reply; 3+ messages in thread
From: Saravana Kannan @ 2023-10-13 21:28 UTC (permalink / raw)
  To: Emil Kronborg Andersen
  Cc: linux, gregkh, jirislaby, linux-kernel, linux-serial

On Fri, Oct 13, 2023 at 8:48 AM Emil Kronborg Andersen <emkan@prevas.dk> wrote:
>
> After commit 3fb16866b51d ("driver core: fw_devlink: Make cycle
> detection more robust"), consumer devices without their fwnode set
> printed errors like the one below:
>
> [    0.261887] uart-pl011 3f201000.serial: Failed to create device link (0x180) with soc:firmware:gpio
>
> To fix this, set the fwnode so fw_devlink can find and handle it
> properly.
>
> Fixes: 3fb16866b51d ("driver core: fw_devlink: Make cycle detection more robust")
> Signed-off-by: Emil Kronborg Andersen <emkan@prevas.dk>
> ---
>  drivers/tty/serial/amba-pl011.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> index 3dc9b0fcab1c..29cef84b71c0 100644
> --- a/drivers/tty/serial/amba-pl011.c
> +++ b/drivers/tty/serial/amba-pl011.c
> @@ -2798,6 +2798,8 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
>         int portnr, ret;
>         u32 val;
>
> +       device_set_node(&dev->dev, dev_fwnode(dev->dev.parent));
> +

Can we do this at a tty/serial framework level instead of just this
driver? Also, this is the latest kernel? I feel like I fixed exactly
this (but at a framework level) several months ago.

-Saravana

>         portnr = pl011_find_free_port();
>         if (portnr < 0)
>                 return portnr;
> --
> 2.41.0
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] serial: amba-pl011: set fwnode from parent device
  2023-10-13 21:28 ` Saravana Kannan
@ 2023-10-16 10:04   ` Emil Kronborg
  0 siblings, 0 replies; 3+ messages in thread
From: Emil Kronborg @ 2023-10-16 10:04 UTC (permalink / raw)
  To: Saravana Kannan; +Cc: linux, gregkh, jirislaby, linux-kernel, linux-serial

On Fri, Oct 13, 2023 at 14:28 -0700, Saravana Kannan wrote:
>
> On Fri, Oct 13, 2023 at 8:48 AM Emil Kronborg Andersen <emkan@prevas.dk> wrote:
> Can we do this at a tty/serial framework level instead of just this
> driver? Also, this is the latest kernel? I feel like I fixed exactly
> this (but at a framework level) several months ago.
> 
> -Saravana
> 

You are right about about having fixed it. I mistakenly mixed up two
boards and thus tested my patch with a wrong kernel version. I apologize
for that. Commit 1a5ecc73b2bf ("serdev: Set fwnode for serdev devices")
resolved the issue at tty/serial framework level.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-16 10:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-13 15:47 [PATCH] serial: amba-pl011: set fwnode from parent device Emil Kronborg Andersen
2023-10-13 21:28 ` Saravana Kannan
2023-10-16 10:04   ` Emil Kronborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®