static int board_eth_init(void) { void __iomem *gur = IOMEM(MPC85xx_GUTS_ADDR); struct ge_product_data product; int st; /* Toggle eth0 reset pin */ gpio_set_value(4, 0); udelay(5); gpio_set_value(4, 1); /* Disable eTSEC3 */ out_be32(gur + MPC85xx_DEVDISR_OFFSET, in_be32(gur + MPC85xx_DEVDISR_OFFSET) & ~MPC85xx_DEVDISR_TSEC3); st = ge_get_product_data(&product); if (((product.v2.mac.count > 0) && (product.v2.mac.count <= MAX_MAC)) && (st == 0)) eth_register_ethaddr(0, (const char *)&product.v2.mac.mac[0]); fsl_eth_init(1, &gfar_info[0]); return 0; }
static int devices_init(void) { add_cfi_flash_device(DEVICE_ID_DYNAMIC, CFG_FLASH_BASE, 16 << 20, 0); add_generic_device("i2c-fsl", 0, NULL, I2C1_BASE_ADDR, 0x100, IORESOURCE_MEM, &i2cplat); add_generic_device("i2c-fsl", 1, NULL, I2C2_BASE_ADDR, 0x100, IORESOURCE_MEM, &i2cplat); fsl_eth_init(2, &gfar_info[0]); fsl_eth_init(3, &gfar_info[1]); devfs_add_partition("nor0", 0xf80000, 0x80000, DEVFS_PARTITION_FIXED, "self0"); return 0; }
static void board_eth_init(void) { fsl_eth_init(1, &gfar_info[0]); fsl_eth_init(2, &gfar_info[1]); fsl_eth_init(3, &gfar_info[2]); }