/* Detect and register the correct Ethernet device. RealView/EB rev D platforms use the newer SMSC LAN9118 Ethernet chip  */
static int eth_device_register(void)
/* Detect and register the correct Ethernet device. RealView/EB rev D platforms use the newer SMSC LAN9118 Ethernet chip  */
static int eth_device_register(void)
{
	void __iomem *eth_addr = ioremap(REALVIEW_EB_ETH_BASE, SZ_4K);
	const char *name = NULL;
	u32 idrev;
	if (!eth_addr)
		return -ENOMEM;
	idrev = readl(eth_addr + 0x50);
	if ((idrev & 0xFFFF0000) != 0x01180000)
		name = "smc91x";
	iounmap(eth_addr);
	return realview_eth_register(name, realview_eb_eth_resources);
}