* [PATCH] serial/bcm63xx_uart: use correct alias naming
@ 2016-06-08 10:08 ` Jonas Gorski
0 siblings, 0 replies; 4+ messages in thread
From: Jonas Gorski @ 2016-06-08 10:08 UTC (permalink / raw)
To: linux-serial
Cc: Greg Kroah-Hartman, Jiri Slaby, Álvaro Fernández Rojas,
Florian Fainelli, Simon Arlott, devicetree, linux-mips
The bcm63xx_uart driver uses the of alias for determing its id. Recent
changes in dts files changed the expected 'uartX' to the recommended
'serialX', breaking serial output. Fix this by checking for a 'serialX'
alias as well.
Fixes: e3b992d028f8 ("MIPS: BMIPS: Improve BCM6328 device tree")
Fixes: 2d52ee82b475 ("MIPS: BMIPS: Improve BCM6368 device tree")
Fixes: 7537d273e2f3 ("MIPS: BMIPS: Add device tree example for BCM6358")
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
---
Based on 4.7-rc2, which is the current head of tty-next.
drivers/tty/serial/bcm63xx_uart.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c
index c28e5c24..5108fab 100644
--- a/drivers/tty/serial/bcm63xx_uart.c
+++ b/drivers/tty/serial/bcm63xx_uart.c
@@ -813,8 +813,12 @@ static int bcm_uart_probe(struct platform_device *pdev)
struct clk *clk;
int ret;
- if (pdev->dev.of_node)
- pdev->id = of_alias_get_id(pdev->dev.of_node, "uart");
+ if (pdev->dev.of_node) {
+ pdev->id = of_alias_get_id(pdev->dev.of_node, "serial");
+
+ if (pdev->id < 0)
+ pdev->id = of_alias_get_id(pdev->dev.of_node, "uart");
+ }
if (pdev->id < 0 || pdev->id >= BCM63XX_NR_UARTS)
return -EINVAL;
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] serial/bcm63xx_uart: use correct alias naming
@ 2016-06-08 10:08 ` Jonas Gorski
0 siblings, 0 replies; 4+ messages in thread
From: Jonas Gorski @ 2016-06-08 10:08 UTC (permalink / raw)
To: linux-serial-u79uwXL29TY76Z2rM5mHXA
Cc: Greg Kroah-Hartman, Jiri Slaby, Álvaro Fernández Rojas,
Florian Fainelli, Simon Arlott, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-mips-6z/3iImG2C8G8FEW9MqTrA
The bcm63xx_uart driver uses the of alias for determing its id. Recent
changes in dts files changed the expected 'uartX' to the recommended
'serialX', breaking serial output. Fix this by checking for a 'serialX'
alias as well.
Fixes: e3b992d028f8 ("MIPS: BMIPS: Improve BCM6328 device tree")
Fixes: 2d52ee82b475 ("MIPS: BMIPS: Improve BCM6368 device tree")
Fixes: 7537d273e2f3 ("MIPS: BMIPS: Add device tree example for BCM6358")
Signed-off-by: Jonas Gorski <jogo-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
---
Based on 4.7-rc2, which is the current head of tty-next.
drivers/tty/serial/bcm63xx_uart.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c
index c28e5c24..5108fab 100644
--- a/drivers/tty/serial/bcm63xx_uart.c
+++ b/drivers/tty/serial/bcm63xx_uart.c
@@ -813,8 +813,12 @@ static int bcm_uart_probe(struct platform_device *pdev)
struct clk *clk;
int ret;
- if (pdev->dev.of_node)
- pdev->id = of_alias_get_id(pdev->dev.of_node, "uart");
+ if (pdev->dev.of_node) {
+ pdev->id = of_alias_get_id(pdev->dev.of_node, "serial");
+
+ if (pdev->id < 0)
+ pdev->id = of_alias_get_id(pdev->dev.of_node, "uart");
+ }
if (pdev->id < 0 || pdev->id >= BCM63XX_NR_UARTS)
return -EINVAL;
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] serial/bcm63xx_uart: use correct alias naming
@ 2016-06-10 20:48 ` Florian Fainelli
0 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2016-06-10 20:48 UTC (permalink / raw)
To: Jonas Gorski, linux-serial
Cc: Greg Kroah-Hartman, Jiri Slaby, Álvaro Fernández Rojas,
Simon Arlott, devicetree, linux-mips
On 06/08/2016 03:08 AM, Jonas Gorski wrote:
> The bcm63xx_uart driver uses the of alias for determing its id. Recent
> changes in dts files changed the expected 'uartX' to the recommended
> 'serialX', breaking serial output. Fix this by checking for a 'serialX'
> alias as well.
>
> Fixes: e3b992d028f8 ("MIPS: BMIPS: Improve BCM6328 device tree")
> Fixes: 2d52ee82b475 ("MIPS: BMIPS: Improve BCM6368 device tree")
> Fixes: 7537d273e2f3 ("MIPS: BMIPS: Add device tree example for BCM6358")
> Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
A future improvement could be to completely get rid of the id and
instead just dynamically allocate the ports structure.
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] serial/bcm63xx_uart: use correct alias naming
@ 2016-06-10 20:48 ` Florian Fainelli
0 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2016-06-10 20:48 UTC (permalink / raw)
To: Jonas Gorski, linux-serial-u79uwXL29TY76Z2rM5mHXA
Cc: Greg Kroah-Hartman, Jiri Slaby, Álvaro Fernández Rojas,
Simon Arlott, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-mips-6z/3iImG2C8G8FEW9MqTrA
On 06/08/2016 03:08 AM, Jonas Gorski wrote:
> The bcm63xx_uart driver uses the of alias for determing its id. Recent
> changes in dts files changed the expected 'uartX' to the recommended
> 'serialX', breaking serial output. Fix this by checking for a 'serialX'
> alias as well.
>
> Fixes: e3b992d028f8 ("MIPS: BMIPS: Improve BCM6328 device tree")
> Fixes: 2d52ee82b475 ("MIPS: BMIPS: Improve BCM6368 device tree")
> Fixes: 7537d273e2f3 ("MIPS: BMIPS: Add device tree example for BCM6358")
> Signed-off-by: Jonas Gorski <jogo-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
Acked-by: Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
A future improvement could be to completely get rid of the id and
instead just dynamically allocate the ports structure.
--
Florian
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-10 20:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-08 10:08 [PATCH] serial/bcm63xx_uart: use correct alias naming Jonas Gorski
2016-06-08 10:08 ` Jonas Gorski
2016-06-10 20:48 ` Florian Fainelli
2016-06-10 20:48 ` Florian Fainelli
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.