Hi Florian, On Tue, Jul 28, 2009 at 11:00 PM, Florian Fainelli<florian@xxxxxxxxxxx> wrote: > --- a/arch/mips/alchemy/common/platform.c > +++ b/arch/mips/alchemy/common/platform.c > @@ -331,6 +331,61 @@ static struct platform_device pbdb_smbus_device = { > }; > #endif > > +/* All Alchemy board have at least one Ethernet MAC */ Au1200/1300 don't have a MAC (unfortunately, IMO). > static int __init au1xxx_platform_init(void) > { > unsigned int uartclk = get_au1x00_uart_baud_base() * 16; > - int i; > + int i, ni; > > /* Fill up uartclk. */ > for (i = 0; au1x00_uart_data[i].flags; i++) > au1x00_uart_data[i].uartclk = uartclk; > > + /* Register second MAC if enabled in pinfunc */ > +#ifndef CONFIG_SOC_AU1100 > + ni = (int)((au_readl(SYS_PINFUNC) & (u32)(SYS_PF_NI2)) >> 4); > + if (!(ni + 1)) > + platform_device_register(&au1xxx_eth1_device); > +#endif > + This won't work on Au1200/Au1300 since their SYS_PINFUNC register has a different bit layout. And you already know that I'm not very fond of alchemy/common/platform.c ;-) I still think you should add appropriate MAC platform information to the boards which actually use it. Manuel Lauss