MIPS: Alchemy: Define eth platform devices in the correct order
Currently, the eth devices are probed in the inverse order, first au1xxx_eth1_device and then au1xxx_eth0_device. On the GPR board, this makes trouble: # ifconfig|grep HWaddr eth0 Link encap:Ethernet HWaddr 00:50:C2:0C:30:01 eth1 Link encap:Ethernet HWaddr 66:22:01:80:38:10 A bogous ethernet hwaddr is assigned to the first device and au1xxx_eth0_device is mapped to eth1, which even does not work properly. With this patch, the problems are gone: # ifconfig|grep HWaddr eth0 Link encap:Ethernet HWaddr 66:22:11:32:38:10 eth1 Link encap:Ethernet HWaddr 66:22:11:32:38:11 Signed-off-by: Wolfgang Grandegger <wg@denx.de> To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/1473/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
Родитель
7f13f65e61
Коммит
0d5977d652
|
@ -435,20 +435,21 @@ static struct platform_device *au1xxx_platform_devices[] __initdata = {
|
||||||
static int __init au1xxx_platform_init(void)
|
static int __init au1xxx_platform_init(void)
|
||||||
{
|
{
|
||||||
unsigned int uartclk = get_au1x00_uart_baud_base() * 16;
|
unsigned int uartclk = get_au1x00_uart_baud_base() * 16;
|
||||||
int i;
|
int err, i;
|
||||||
|
|
||||||
/* Fill up uartclk. */
|
/* Fill up uartclk. */
|
||||||
for (i = 0; au1x00_uart_data[i].flags; i++)
|
for (i = 0; au1x00_uart_data[i].flags; i++)
|
||||||
au1x00_uart_data[i].uartclk = uartclk;
|
au1x00_uart_data[i].uartclk = uartclk;
|
||||||
|
|
||||||
|
err = platform_add_devices(au1xxx_platform_devices,
|
||||||
|
ARRAY_SIZE(au1xxx_platform_devices));
|
||||||
#ifndef CONFIG_SOC_AU1100
|
#ifndef CONFIG_SOC_AU1100
|
||||||
/* Register second MAC if enabled in pinfunc */
|
/* Register second MAC if enabled in pinfunc */
|
||||||
if (!(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2))
|
if (!err && !(au_readl(SYS_PINFUNC) & (u32)SYS_PF_NI2))
|
||||||
platform_device_register(&au1xxx_eth1_device);
|
platform_device_register(&au1xxx_eth1_device);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return platform_add_devices(au1xxx_platform_devices,
|
return err;
|
||||||
ARRAY_SIZE(au1xxx_platform_devices));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
arch_initcall(au1xxx_platform_init);
|
arch_initcall(au1xxx_platform_init);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче