serial: 8250: of: Check for CONFIG_SERIAL_8250_BCM7271
PATCH 1/1 serial: 8250: of: Check for CONFIG_SERIAL_8250_BCM7271
From: Jim Quinlan <[email protected]>
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.
--- drivers/tty/serial/8250/8250_of.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/tty/serial/8250/8250_of.c +4 -0
@@ -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 ;
Signature · 1 line
2.17.1
Please ignore this patch, it was already submitted by Florian about an hour ago.
Thanks
Al
Quoted 34 lines · Al Cooper
From: Jim Quinlan <[email protected]>
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 the8250_bcm7271.cdriver returnsEPROBE_DEFER, we are not getting the UART registered via8250_of.c.Signed-off-by Jim Quinlan <[email protected]>Signed-off-by Florian Fainelli <[email protected]>Signed-off-by Al Cooper <[email protected]>--- drivers/tty/serial/8250/8250_of.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/tty/serial/8250/8250_of.c +4
-1@@ -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
Quoted 1 line · Alan Cooper
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.
Signature · 1 line
Florian