/* Setup the base address and interrupt of the Au1xxx ethernet macs based on cpu type and whether the interface is enabled in sys_pinfunc register. The last interface is enabled if SYS_PF_NI2 (bit 4) is 0.  */
static int __init au1000_init_module(void)
/* Setup the base address and interrupt of the Au1xxx ethernet macs based on cpu type and whether the interface is enabled in sys_pinfunc register. The last interface is enabled if SYS_PF_NI2 (bit 4) is 0.  */
static int __init au1000_init_module(void)
{
	int ni = (int)((au_readl(SYS_PINFUNC) & (u32)(SYS_PF_NI2)) >> 4);
	struct net_device *dev;
	int i, found_one = 0;
	num_ifs = NUM_ETH_INTERFACES - ni;
	for(i = 0; i < num_ifs; i++) {
		dev = au1000_probe(i);
		iflist[i].dev = dev;
		if (dev)
			found_one++;
	}
	if (!found_one)
		return -ENODEV;
	return 0;
}