int board_eth_init(bd_t *bis) { int rv, n = 0; const char *devname; struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE; rv = handle_mac_address(); if (rv) printf("No MAC address found!\n"); writel(RGMII_MODE_ENABLE | RGMII_INT_DELAY, &cdev->miisel); board_phy_init(); rv = cpsw_register(&cpsw_data); if (rv < 0) printf("Error %d registering CPSW switch\n", rv); else n += rv; /* * CPSW RGMII Internal Delay Mode is not supported in all PVT * operating points. So we must set the TX clock delay feature * in the AR8051 PHY. Since we only support a single ethernet * device, we only do this for the first instance. */ devname = miiphy_get_current_dev(); miiphy_write(devname, 0x0, AR8051_PHY_DEBUG_ADDR_REG, AR8051_DEBUG_RGMII_CLK_DLY_REG); miiphy_write(devname, 0x0, AR8051_PHY_DEBUG_DATA_REG, AR8051_RGMII_TX_CLK_DLY); return n; }
int board_eth_init(bd_t *bis) { int err; if (handle_mac_address("ethaddr", CONFIG_SYS_I2C_EEPROM_BUS)) printf(NO_MAC_ADDR, "primary NIC"); if (handle_mac_address("eth1addr", SB_FX6_I2C_EEPROM_BUS)) printf(NO_MAC_ADDR, "secondary NIC"); SETUP_IOMUX_PADS(enet_pads); /* phy reset */ err = gpio_request(CM_FX6_ENET_NRST, "enet_nrst"); if (err) printf("Etnernet NRST gpio request failed: %d\n", err); gpio_direction_output(CM_FX6_ENET_NRST, 0); udelay(500); gpio_set_value(CM_FX6_ENET_NRST, 1); enable_enet_clk(1); return cpu_eth_init(bis); }
int board_eth_init(bd_t *bis) { int res = handle_mac_address(); if (res) puts("No MAC address found\n"); SETUP_IOMUX_PADS(enet_pads); /* phy reset */ gpio_direction_output(CM_FX6_ENET_NRST, 0); udelay(500); gpio_set_value(CM_FX6_ENET_NRST, 1); enable_enet_clk(1); return cpu_eth_init(bis); }
int board_eth_init(bd_t *bis) { int err; err = handle_mac_address(); if (err) puts("No MAC address found\n"); SETUP_IOMUX_PADS(enet_pads); /* phy reset */ err = gpio_request(CM_FX6_ENET_NRST, "enet_nrst"); if (err) printf("Etnernet NRST gpio request failed: %d\n", err); gpio_direction_output(CM_FX6_ENET_NRST, 0); udelay(500); gpio_set_value(CM_FX6_ENET_NRST, 1); enable_enet_clk(1); return cpu_eth_init(bis); }
/* * Routine: board_eth_init * Description: initialize module and base-board Ethernet chips */ int board_eth_init(bd_t *bis) { int rc = 0, rc1 = 0; rc1 = handle_mac_address(); if (rc1) printf("No MAC address found! "); rc1 = cl_omap3_smc911x_init(0, 5, CM_T3X_SMC911X_BASE, cm_t3x_reset_net_chip, -EINVAL); if (rc1 > 0) rc++; rc1 = cl_omap3_smc911x_init(1, 4, SB_T35_SMC911X_BASE, NULL, -EINVAL); if (rc1 > 0) rc++; return rc; }
/* * Routine: board_eth_init * Description: initialize module and base-board Ethernet chips */ int board_eth_init(bd_t *bis) { int rc = 0, rc1 = 0; setup_net_chip_gmpc(); reset_net_chip(); rc1 = handle_mac_address(); if (rc1) printf("No MAC address found! "); rc1 = smc911x_initialize(0, CM_T3X_SMC911X_BASE); if (rc1 > 0) rc++; rc1 = smc911x_initialize(1, SB_T35_SMC911X_BASE); if (rc1 > 0) rc++; return rc; }
/* * Routine: board_eth_init * Description: initialize module and base-board Ethernet chips */ int board_eth_init(bd_t *bis) { int rc = 0, rc1 = 0; #ifdef CONFIG_SMC911X setup_net_chip_gmpc(); reset_net_chip(); rc1 = handle_mac_address(); if (rc1) printf("CM-T3x: No MAC address found\n"); rc1 = smc911x_initialize(0, CM_T3X_SMC911X_BASE); if (rc1 > 0) rc++; rc1 = smc911x_initialize(1, SB_T35_SMC911X_BASE); if (rc1 > 0) rc++; #endif return rc; }