diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/fm/memac.c | 3 | ||||
-rw-r--r-- | drivers/net/ldpaa_eth/lx2160a.c | 4 | ||||
-rw-r--r-- | drivers/net/pfe_eth/pfe_eth.c | 22 | ||||
-rw-r--r-- | drivers/net/pfe_eth/pfe_firmware.c | 18 | ||||
-rw-r--r-- | drivers/net/phy/aquantia.c | 15 |
5 files changed, 36 insertions, 26 deletions
diff --git a/drivers/net/fm/memac.c b/drivers/net/fm/memac.c index 0f0f7b0732..36f50d2782 100644 --- a/drivers/net/fm/memac.c +++ b/drivers/net/fm/memac.c @@ -98,6 +98,7 @@ static void memac_set_interface_mode(struct fsl_enet_mac *mac, if_mode &= ~IF_MODE_MASK; if_mode |= (IF_MODE_GMII); break; + case PHY_INTERFACE_MODE_XFI: case PHY_INTERFACE_MODE_XGMII: if_mode &= ~IF_MODE_MASK; if_mode |= IF_MODE_XGMII; @@ -106,7 +107,7 @@ static void memac_set_interface_mode(struct fsl_enet_mac *mac, break; } /* Enable automatic speed selection for Non-XGMII */ - if (type != PHY_INTERFACE_MODE_XGMII) + if (type != PHY_INTERFACE_MODE_XGMII && type != PHY_INTERFACE_MODE_XFI) if_mode |= IF_MODE_EN_AUTO; if (type == PHY_INTERFACE_MODE_RGMII || diff --git a/drivers/net/ldpaa_eth/lx2160a.c b/drivers/net/ldpaa_eth/lx2160a.c index 9432b6eb85..1e62c64203 100644 --- a/drivers/net/ldpaa_eth/lx2160a.c +++ b/drivers/net/ldpaa_eth/lx2160a.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2018 NXP + * Copyright 2018, 2020 NXP */ #include <common.h> #include <phy.h> @@ -57,7 +57,7 @@ phy_interface_t wriop_dpmac_enet_if(int dpmac_id, int lane_prtcl) { enum srds_prtcl; - if (is_device_disabled(dpmac_id + 1)) + if (is_device_disabled(dpmac_id)) return PHY_INTERFACE_MODE_NONE; if (lane_prtcl >= SGMII1 && lane_prtcl <= SGMII18) diff --git a/drivers/net/pfe_eth/pfe_eth.c b/drivers/net/pfe_eth/pfe_eth.c index e49bf4a6f3..3b4ca0393c 100644 --- a/drivers/net/pfe_eth/pfe_eth.c +++ b/drivers/net/pfe_eth/pfe_eth.c @@ -176,9 +176,10 @@ static int pfe_eth_send(struct udevice *dev, void *packet, int length) udelay(100); i++; - if (i == 30000) + if (i == 30000) { printf("Tx timeout, send failed\n"); - break; + break; + } } return 0; @@ -213,27 +214,22 @@ static int pfe_eth_recv(struct udevice *dev, int flags, uchar **packetp) static int pfe_eth_probe(struct udevice *dev) { struct pfe_eth_dev *priv = dev_get_priv(dev); - struct pfe_ddr_address *pfe_addr; + struct pfe_ddr_address pfe_addr; struct pfe_eth_pdata *pdata = dev_get_platdata(dev); int ret = 0; static int init_done; if (!init_done) { - pfe_addr = (struct pfe_ddr_address *)malloc(sizeof - (struct pfe_ddr_address)); - if (!pfe_addr) - return -ENOMEM; - - pfe_addr->ddr_pfe_baseaddr = + pfe_addr.ddr_pfe_baseaddr = (void *)pdata->pfe_ddr_addr.ddr_pfe_baseaddr; - pfe_addr->ddr_pfe_phys_baseaddr = + pfe_addr.ddr_pfe_phys_baseaddr = (unsigned long)pdata->pfe_ddr_addr.ddr_pfe_phys_baseaddr; debug("ddr_pfe_baseaddr: %p, ddr_pfe_phys_baseaddr: %08x\n", - pfe_addr->ddr_pfe_baseaddr, - (u32)pfe_addr->ddr_pfe_phys_baseaddr); + pfe_addr.ddr_pfe_baseaddr, + (u32)pfe_addr.ddr_pfe_phys_baseaddr); - ret = pfe_drv_init(pfe_addr); + ret = pfe_drv_init(&pfe_addr); if (ret) return ret; diff --git a/drivers/net/pfe_eth/pfe_firmware.c b/drivers/net/pfe_eth/pfe_firmware.c index 55e661c0e1..d414c750d4 100644 --- a/drivers/net/pfe_eth/pfe_firmware.c +++ b/drivers/net/pfe_eth/pfe_firmware.c @@ -167,25 +167,23 @@ static int pfe_fit_check(void) int pfe_spi_flash_init(void) { struct spi_flash *pfe_flash; + struct udevice *new; int ret = 0; void *addr = malloc(CONFIG_SYS_QE_FMAN_FW_LENGTH); -#ifdef CONFIG_DM_SPI_FLASH - struct udevice *new; + if (!addr) + return -ENOMEM; - /* speed and mode will be read from DT */ ret = spi_flash_probe_bus_cs(CONFIG_ENV_SPI_BUS, - CONFIG_ENV_SPI_CS, 0, 0, &new); + CONFIG_ENV_SPI_CS, + CONFIG_ENV_SPI_MAX_HZ, + CONFIG_ENV_SPI_MODE, + &new); pfe_flash = dev_get_uclass_priv(new); -#else - pfe_flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, - CONFIG_ENV_SPI_CS, - CONFIG_ENV_SPI_MAX_HZ, - CONFIG_ENV_SPI_MODE); -#endif if (!pfe_flash) { printf("SF: probe for pfe failed\n"); + free(addr); return -ENODEV; } diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c index 68cd3d03fd..9061afa620 100644 --- a/drivers/net/phy/aquantia.c +++ b/drivers/net/phy/aquantia.c @@ -680,6 +680,20 @@ struct phy_driver aqr112_driver = { .data = AQUANTIA_GEN3, }; +struct phy_driver aqr113c_driver = { + .name = "Aquantia AQR113C", + .uid = 0x31c31c12, + .mask = 0xfffffff0, + .features = PHY_10G_FEATURES, + .mmds = (MDIO_MMD_PMAPMD | MDIO_MMD_PCS | + MDIO_MMD_PHYXS | MDIO_MMD_AN | + MDIO_MMD_VEND1), + .config = &aquantia_config, + .startup = &aquantia_startup, + .shutdown = &gen10g_shutdown, + .data = AQUANTIA_GEN3, +}; + struct phy_driver aqr405_driver = { .name = "Aquantia AQR405", .uid = 0x3a1b4b2, @@ -716,6 +730,7 @@ int phy_aquantia_init(void) phy_register(&aqr106_driver); phy_register(&aqr107_driver); phy_register(&aqr112_driver); + phy_register(&aqr113c_driver); phy_register(&aqr405_driver); phy_register(&aqr412_driver); |