linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: 8250: of: Check for CONFIG_SERIAL_8250_BCM7271
@ 2021-04-23 19:19 Al Cooper
  2021-04-23 19:25 ` Alan Cooper
  0 siblings, 1 reply; 3+ messages in thread
From: Al Cooper @ 2021-04-23 19:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jim Quinlan, Florian Fainelli, Al Cooper, Greg Kroah-Hartman,
	Jiri Slaby, linux-serial

From: Jim Quinlan <jim2101024@gmail.com>

This commit has of_platform_serial_probe() check specifically for the
"brcm,bcm7271-uart" and whether its companion driver is enabled. If it
is the case, and the clock provider is not ready, we want to make sure
that when the 8250_bcm7271.c driver returns EPROBE_DEFER, we are not
getting the UART registered via 8250_of.c.

Signed-off-by: Jim Quinlan <jim2101024@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Al Cooper <alcooperx@gmail.com>
---
 drivers/tty/serial/8250/8250_of.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/tty/serial/8250/8250_of.c b/drivers/tty/serial/8250/8250_of.c
index 65e9045dafe6..aa458f3c6644 100644
--- a/drivers/tty/serial/8250/8250_of.c
+++ b/drivers/tty/serial/8250/8250_of.c
@@ -192,6 +192,10 @@ static int of_platform_serial_probe(struct platform_device *ofdev)
 	u32 tx_threshold;
 	int ret;
 
+	if (IS_ENABLED(CONFIG_SERIAL_8250_BCM7271) &&
+	    of_device_is_compatible(ofdev->dev.of_node, "brcm,bcm7271-uart"))
+		return -ENODEV;
+
 	port_type = (unsigned long)of_device_get_match_data(&ofdev->dev);
 	if (port_type == PORT_UNKNOWN)
 		return -EINVAL;
-- 
2.17.1


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

* Re: [PATCH] serial: 8250: of: Check for CONFIG_SERIAL_8250_BCM7271
  2021-04-23 19:19 [PATCH] serial: 8250: of: Check for CONFIG_SERIAL_8250_BCM7271 Al Cooper
@ 2021-04-23 19:25 ` Alan Cooper
  2021-04-23 19:48   ` Florian Fainelli
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Cooper @ 2021-04-23 19:25 UTC (permalink / raw)
  To: : Linux Kernel Mailing List
  Cc: Jim Quinlan, Florian Fainelli, Greg Kroah-Hartman, Jiri Slaby,
	linux-serial

Please ignore this patch, it was already submitted by Florian about an hour ago.

Thanks
Al

On Fri, Apr 23, 2021 at 3:20 PM Al Cooper <alcooperx@gmail.com> wrote:
>
> From: Jim Quinlan <jim2101024@gmail.com>
>
> This commit has of_platform_serial_probe() check specifically for the
> "brcm,bcm7271-uart" and whether its companion driver is enabled. If it
> is the case, and the clock provider is not ready, we want to make sure
> that when the 8250_bcm7271.c driver returns EPROBE_DEFER, we are not
> getting the UART registered via 8250_of.c.
>
> Signed-off-by: Jim Quinlan <jim2101024@gmail.com>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> Signed-off-by: Al Cooper <alcooperx@gmail.com>
> ---
>  drivers/tty/serial/8250/8250_of.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/tty/serial/8250/8250_of.c b/drivers/tty/serial/8250/8250_of.c
> index 65e9045dafe6..aa458f3c6644 100644
> --- a/drivers/tty/serial/8250/8250_of.c
> +++ b/drivers/tty/serial/8250/8250_of.c
> @@ -192,6 +192,10 @@ static int of_platform_serial_probe(struct platform_device *ofdev)
>         u32 tx_threshold;
>         int ret;
>
> +       if (IS_ENABLED(CONFIG_SERIAL_8250_BCM7271) &&
> +           of_device_is_compatible(ofdev->dev.of_node, "brcm,bcm7271-uart"))
> +               return -ENODEV;
> +
>         port_type = (unsigned long)of_device_get_match_data(&ofdev->dev);
>         if (port_type == PORT_UNKNOWN)
>                 return -EINVAL;
> --
> 2.17.1
>

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

* Re: [PATCH] serial: 8250: of: Check for CONFIG_SERIAL_8250_BCM7271
  2021-04-23 19:25 ` Alan Cooper
@ 2021-04-23 19:48   ` Florian Fainelli
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2021-04-23 19:48 UTC (permalink / raw)
  To: Alan Cooper, : Linux Kernel Mailing List
  Cc: Jim Quinlan, Greg Kroah-Hartman, Jiri Slaby, linux-serial



On 4/23/2021 12:25 PM, Alan Cooper wrote:
> Please ignore this patch, it was already submitted by Florian about an hour ago.

Sorry for the lack of coordination, was about to ask you if you wanted
to send it.
-- 
Florian

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

end of thread, other threads:[~2021-04-23 19:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23 19:19 [PATCH] serial: 8250: of: Check for CONFIG_SERIAL_8250_BCM7271 Al Cooper
2021-04-23 19:25 ` Alan Cooper
2021-04-23 19:48   ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).