serial/bcm63xx_uart: use correct alias naming

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: e3b992d028 ("MIPS: BMIPS: Improve BCM6328 device tree")
Fixes: 2d52ee82b4 ("MIPS: BMIPS: Improve BCM6368 device tree")
Fixes: 7537d273e2 ("MIPS: BMIPS: Add device tree example for BCM6358")
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jonas Gorski 2016-06-08 12:08:43 +02:00 коммит произвёл Greg Kroah-Hartman
Родитель a10aebe2cd
Коммит a59388668d
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -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;