diff options
Diffstat (limited to 'drivers/net/phy')
36 files changed, 9 insertions, 46 deletions
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 3d96938eaba..73064b2af68 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -23,6 +23,12 @@ config PHY_ADDR_ENABLE help Select this if you want to control which phy address is used +config PHY_ANEG_TIMEOUT + int "PHY auto-negotiation timeout" + default 4000 + help + Default PHY auto-negotiation timeout. + if PHY_ADDR_ENABLE config PHY_ADDR int "PHY address" diff --git a/drivers/net/phy/adin.c b/drivers/net/phy/adin.c index 0970449d0f9..ce448810ff6 100644 --- a/drivers/net/phy/adin.c +++ b/drivers/net/phy/adin.c @@ -6,7 +6,6 @@ * Copyright 2022 Variscite Ltd. * Copyright 2022 Josua Mayer <josua@solid-run.com> */ -#include <common.h> #include <phy.h> #include <linux/bitops.h> #include <linux/bitfield.h> diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c index a958e88d44f..d2db8d9f792 100644 --- a/drivers/net/phy/aquantia.c +++ b/drivers/net/phy/aquantia.c @@ -6,7 +6,6 @@ * Copyright 2018, 2021 NXP */ #include <config.h> -#include <common.h> #include <dm.h> #include <log.h> #include <net.h> @@ -567,9 +566,9 @@ int aquantia_startup(struct phy_device *phydev) if ((i++ % 500) == 0) printf("."); } while (!aquantia_link_is_up(phydev) && - i < (4 * PHY_ANEG_TIMEOUT)); + i < (4 * CONFIG_PHY_ANEG_TIMEOUT)); - if (i > PHY_ANEG_TIMEOUT) + if (i > CONFIG_PHY_ANEG_TIMEOUT) printf(" TIMEOUT !\n"); } diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c index abb7bdf537c..61525f68c35 100644 --- a/drivers/net/phy/atheros.c +++ b/drivers/net/phy/atheros.c @@ -6,7 +6,6 @@ * author Andy Fleming * Copyright (c) 2019 Michael Walle <michael@walle.cc> */ -#include <common.h> #include <phy.h> #include <dm/device_compat.h> #include <linux/bitfield.h> diff --git a/drivers/net/phy/b53.c b/drivers/net/phy/b53.c index 26e8e2fe64f..e95363067fe 100644 --- a/drivers/net/phy/b53.c +++ b/drivers/net/phy/b53.c @@ -22,7 +22,6 @@ * cover other switches would be trivial. */ -#include <common.h> #include <command.h> #include <linux/bitops.h> #include <linux/delay.h> diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c index ecccb7c3b54..0a49015eb89 100644 --- a/drivers/net/phy/broadcom.c +++ b/drivers/net/phy/broadcom.c @@ -5,7 +5,6 @@ * Copyright 2010-2011 Freescale Semiconductor, Inc. * author Andy Fleming */ -#include <common.h> #include <phy.h> #include <linux/delay.h> diff --git a/drivers/net/phy/ca_phy.c b/drivers/net/phy/ca_phy.c index edef21867b0..5b2c67d2fda 100644 --- a/drivers/net/phy/ca_phy.c +++ b/drivers/net/phy/ca_phy.c @@ -8,7 +8,6 @@ */ #include <config.h> -#include <common.h> #include <log.h> #include <malloc.h> #include <linux/ctype.h> diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c index 1cf8b28f582..d043e859bad 100644 --- a/drivers/net/phy/cortina.c +++ b/drivers/net/phy/cortina.c @@ -8,7 +8,6 @@ */ #include <config.h> -#include <common.h> #include <log.h> #include <malloc.h> #include <linux/ctype.h> diff --git a/drivers/net/phy/davicom.c b/drivers/net/phy/davicom.c index 31ffa1ac7a9..52c7189b904 100644 --- a/drivers/net/phy/davicom.c +++ b/drivers/net/phy/davicom.c @@ -5,7 +5,6 @@ * Copyright 2010-2011 Freescale Semiconductor, Inc. * author Andy Fleming */ -#include <common.h> #include <phy.h> #define MIIM_DM9161_SCR 0x10 @@ -22,7 +21,6 @@ #define MIIM_DM9161_10BTCSR 0x12 #define MIIM_DM9161_10BTCSR_INIT 0x7800 - /* Davicom DM9161E */ static int dm9161_config(struct phy_device *phydev) { diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index b6726031ebb..772cde1c520 100644 --- a/drivers/net/phy/dp83867.c +++ b/drivers/net/phy/dp83867.c @@ -3,7 +3,6 @@ * TI PHY drivers * */ -#include <common.h> #include <log.h> #include <phy.h> #include <dm/devres.h> diff --git a/drivers/net/phy/dp83869.c b/drivers/net/phy/dp83869.c index f9d4782580e..b6fb5adae1f 100644 --- a/drivers/net/phy/dp83869.c +++ b/drivers/net/phy/dp83869.c @@ -4,7 +4,6 @@ * */ -#include <common.h> #include <phy.h> #include <linux/compat.h> #include <malloc.h> diff --git a/drivers/net/phy/ethernet_id.c b/drivers/net/phy/ethernet_id.c index 4dfdee60dcc..2f8454ca27d 100644 --- a/drivers/net/phy/ethernet_id.c +++ b/drivers/net/phy/ethernet_id.c @@ -5,7 +5,6 @@ * Copyright (C) 2022 Xilinx, Inc. */ -#include <common.h> #include <dm/device_compat.h> #include <dm/device-internal.h> #include <dm/lists.h> diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c index 2f0823b8365..11d36164976 100644 --- a/drivers/net/phy/fixed.c +++ b/drivers/net/phy/fixed.c @@ -6,7 +6,6 @@ */ #include <config.h> -#include <common.h> #include <malloc.h> #include <phy.h> #include <dm.h> diff --git a/drivers/net/phy/generic_10g.c b/drivers/net/phy/generic_10g.c index 34ac51ea070..38dc9a88563 100644 --- a/drivers/net/phy/generic_10g.c +++ b/drivers/net/phy/generic_10g.c @@ -7,7 +7,6 @@ * * Based loosely off of Linux's PHY Lib */ -#include <common.h> #include <miiphy.h> #include <phy.h> diff --git a/drivers/net/phy/intel_xway.c b/drivers/net/phy/intel_xway.c index 9d1b97d349f..fe50eec011a 100644 --- a/drivers/net/phy/intel_xway.c +++ b/drivers/net/phy/intel_xway.c @@ -1,5 +1,4 @@ // SPDX-License-Identifier: GPL-2.0+ -#include <common.h> #include <phy.h> #include <linux/bitfield.h> diff --git a/drivers/net/phy/lxt.c b/drivers/net/phy/lxt.c index 20940033a38..60020508896 100644 --- a/drivers/net/phy/lxt.c +++ b/drivers/net/phy/lxt.c @@ -5,7 +5,6 @@ * Copyright 2010-2011 Freescale Semiconductor, Inc. * author Andy Fleming */ -#include <common.h> #include <phy.h> /* LXT971 Status 2 registers */ @@ -16,7 +15,6 @@ #define MIIM_LXT971_SR2_100HDX 0x4000 /* 100 Mbit half duplex selected */ #define MIIM_LXT971_SR2_100FDX 0x4200 /* 100 Mbit full duplex selected */ - /* LXT971 */ static int lxt971_parse_status(struct phy_device *phydev) { diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 0a90f710dfe..b0a0b7fcb38 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -5,7 +5,6 @@ * Copyright 2010-2011 Freescale Semiconductor, Inc. * author Andy Fleming */ -#include <common.h> #include <errno.h> #include <marvell_phy.h> #include <phy.h> diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c index 9e64672f5ca..8c95bcbb9ad 100644 --- a/drivers/net/phy/marvell10g.c +++ b/drivers/net/phy/marvell10g.c @@ -22,7 +22,6 @@ * If both the fiber and copper ports are connected, the first to gain * link takes priority and the other port is completely locked out. */ -#include <common.h> #include <console.h> #include <dm/device_compat.h> #include <dm/devres.h> diff --git a/drivers/net/phy/meson-gxl.c b/drivers/net/phy/meson-gxl.c index b49c9b5f495..d43b476b3c8 100644 --- a/drivers/net/phy/meson-gxl.c +++ b/drivers/net/phy/meson-gxl.c @@ -7,7 +7,6 @@ * Author: Neil Armstrong <narmstrong@baylibre.com> */ #include <config.h> -#include <common.h> #include <linux/bitops.h> #include <dm.h> #include <phy.h> diff --git a/drivers/net/phy/micrel_ksz8xxx.c b/drivers/net/phy/micrel_ksz8xxx.c index b0f3abcb037..a9a64466ac2 100644 --- a/drivers/net/phy/micrel_ksz8xxx.c +++ b/drivers/net/phy/micrel_ksz8xxx.c @@ -6,7 +6,6 @@ * author Andy Fleming * (C) 2012 NetModule AG, David Andrey, added KSZ9031 */ -#include <common.h> #include <dm.h> #include <errno.h> #include <fdtdec.h> diff --git a/drivers/net/phy/micrel_ksz90x1.c b/drivers/net/phy/micrel_ksz90x1.c index ffc3c987eaa..c48ae6e88f3 100644 --- a/drivers/net/phy/micrel_ksz90x1.c +++ b/drivers/net/phy/micrel_ksz90x1.c @@ -8,7 +8,6 @@ * (C) Copyright 2017 Adaptrum, Inc. * Written by Alexandru Gagniuc <alex.g@adaptrum.com> for Adaptrum, Inc. */ -#include <common.h> #include <dm.h> #include <env.h> #include <errno.h> @@ -229,7 +228,6 @@ int ksz9021_phy_extended_read(struct phy_device *phydev, int regnum) return phy_read(phydev, MDIO_DEVAD_NONE, MII_KSZ9021_EXTENDED_DATAR); } - static int ksz9021_phy_extread(struct phy_device *phydev, int addr, int devaddr, int regnum) { diff --git a/drivers/net/phy/miiphybb.c b/drivers/net/phy/miiphybb.c index cf71f7d4e7e..b143137893f 100644 --- a/drivers/net/phy/miiphybb.c +++ b/drivers/net/phy/miiphybb.c @@ -12,7 +12,6 @@ * channel. */ -#include <common.h> #include <ioports.h> #include <ppc_asm.tmpl> #include <miiphy.h> @@ -280,7 +279,6 @@ int bb_miiphy_read(struct mii_dev *miidev, int addr, int devad, int reg) return rdreg; } - /***************************************************************************** * * Write a MII PHY register. diff --git a/drivers/net/phy/motorcomm.c b/drivers/net/phy/motorcomm.c index a2c763c8791..a96430cec43 100644 --- a/drivers/net/phy/motorcomm.c +++ b/drivers/net/phy/motorcomm.c @@ -6,7 +6,6 @@ */ #include <config.h> -#include <common.h> #include <malloc.h> #include <phy.h> #include <linux/bitfield.h> diff --git a/drivers/net/phy/mv88e61xx.c b/drivers/net/phy/mv88e61xx.c index 85778106edd..ecc10f788af 100644 --- a/drivers/net/phy/mv88e61xx.c +++ b/drivers/net/phy/mv88e61xx.c @@ -29,7 +29,6 @@ * changes may be required. */ -#include <common.h> #include <log.h> #include <linux/bitops.h> #include <linux/delay.h> diff --git a/drivers/net/phy/mv88e6352.c b/drivers/net/phy/mv88e6352.c index 56060762d85..db4c91e34b4 100644 --- a/drivers/net/phy/mv88e6352.c +++ b/drivers/net/phy/mv88e6352.c @@ -4,7 +4,6 @@ * Valentin Lontgchamp, Keymile AG, valentin.longchamp@keymile.com */ -#include <common.h> #include <command.h> #include <log.h> #include <miiphy.h> @@ -263,7 +262,6 @@ int do_mvsw_reg_write(const char *name, int argc, char *const argv[]) return ret; } - int do_mvsw_reg(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { int ret; diff --git a/drivers/net/phy/natsemi.c b/drivers/net/phy/natsemi.c index 6b9e99ea115..1a65e55402b 100644 --- a/drivers/net/phy/natsemi.c +++ b/drivers/net/phy/natsemi.c @@ -5,7 +5,6 @@ * Copyright 2010-2011 Freescale Semiconductor, Inc. * author Andy Fleming */ -#include <common.h> #include <phy.h> /* NatSemi DP83630 */ @@ -43,7 +42,6 @@ U_BOOT_PHY_DRIVER(dp83630) = { .shutdown = &genphy_shutdown, }; - /* DP83865 Link and Auto-Neg Status Register */ #define MIIM_DP83865_LANR 0x11 #define MIIM_DP83865_SPD_MASK 0x0018 @@ -51,7 +49,6 @@ U_BOOT_PHY_DRIVER(dp83630) = { #define MIIM_DP83865_SPD_100 0x0008 #define MIIM_DP83865_DPX_FULL 0x0002 - /* NatSemi DP83865 */ static int dp838xx_config(struct phy_device *phydev) { @@ -102,7 +99,6 @@ static int dp83865_startup(struct phy_device *phydev) return dp83865_parse_status(phydev); } - U_BOOT_PHY_DRIVER(dp83865) = { .name = "NatSemi DP83865", .uid = 0x20005c70, diff --git a/drivers/net/phy/ncsi.c b/drivers/net/phy/ncsi.c index 2bca116a9d8..a1de438ffff 100644 --- a/drivers/net/phy/ncsi.c +++ b/drivers/net/phy/ncsi.c @@ -5,7 +5,6 @@ * Copyright (C) 2019, IBM Corporation. */ -#include <common.h> #include <log.h> #include <malloc.h> #include <phy.h> diff --git a/drivers/net/phy/nxp-c45-tja11xx.c b/drivers/net/phy/nxp-c45-tja11xx.c index f24fc5b2de6..a1e4c3d053b 100644 --- a/drivers/net/phy/nxp-c45-tja11xx.c +++ b/drivers/net/phy/nxp-c45-tja11xx.c @@ -5,7 +5,6 @@ * Copyright 2021 NXP * Author: Radu Pirea <radu-nicolae.pirea@oss.nxp.com> */ -#include <common.h> #include <dm.h> #include <dm/devres.h> #include <linux/delay.h> diff --git a/drivers/net/phy/nxp-tja11xx.c b/drivers/net/phy/nxp-tja11xx.c index 471b0e322b5..a61471f4277 100644 --- a/drivers/net/phy/nxp-tja11xx.c +++ b/drivers/net/phy/nxp-tja11xx.c @@ -6,7 +6,6 @@ * Copyright (C) 2018 Marek Vasut <marex@denx.de> */ -#include <common.h> #include <linux/bitops.h> #include <linux/delay.h> #include <linux/iopoll.h> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 270176cfe62..716a1d46111 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -7,7 +7,6 @@ * * Based loosely off of Linux's PHY Lib */ -#include <common.h> #include <console.h> #include <dm.h> #include <log.h> @@ -251,7 +250,7 @@ int genphy_update_link(struct phy_device *phydev) /* * Timeout reached ? */ - if (i > (PHY_ANEG_TIMEOUT / 50)) { + if (i > (CONFIG_PHY_ANEG_TIMEOUT / 50)) { printf(" TIMEOUT !\n"); phydev->link = 0; return -ETIMEDOUT; diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 7e1036b2271..30f35cced9d 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -6,7 +6,6 @@ * author Andy Fleming * Copyright 2016 Karsten Merker <merker@debian.org> */ -#include <common.h> #include <linux/bitops.h> #include <phy.h> #include <linux/delay.h> diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c index 056b607e0b8..0d823f5f2b1 100644 --- a/drivers/net/phy/smsc.c +++ b/drivers/net/phy/smsc.c @@ -9,7 +9,6 @@ * Some code copied from linux kernel * Copyright (c) 2006 Herbert Valerio Riedel <hvr@gnu.org> */ -#include <common.h> #include <miiphy.h> /* This code does not check the partner abilities. */ diff --git a/drivers/net/phy/teranetics.c b/drivers/net/phy/teranetics.c index 15f2c12ed83..b39311976d6 100644 --- a/drivers/net/phy/teranetics.c +++ b/drivers/net/phy/teranetics.c @@ -5,7 +5,6 @@ * Copyright 2010-2011 Freescale Semiconductor, Inc. * author Andy Fleming */ -#include <common.h> #include <phy.h> #include <linux/delay.h> diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c index c5cf0d7dfbd..4867d1931b4 100644 --- a/drivers/net/phy/vitesse.c +++ b/drivers/net/phy/vitesse.c @@ -6,7 +6,6 @@ * Original Author: Andy Fleming * Add vsc8662 phy support - Priyanka Jain */ -#include <common.h> #include <miiphy.h> /* Cicada Auxiliary Control/Status Register */ diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c index e2969bc4842..e44b7b75bd5 100644 --- a/drivers/net/phy/xilinx_gmii2rgmii.c +++ b/drivers/net/phy/xilinx_gmii2rgmii.c @@ -5,7 +5,6 @@ * Copyright (C) 2018 Xilinx, Inc. */ -#include <common.h> #include <dm.h> #include <log.h> #include <phy.h> diff --git a/drivers/net/phy/xilinx_phy.c b/drivers/net/phy/xilinx_phy.c index c07c780193f..a59e17d11e5 100644 --- a/drivers/net/phy/xilinx_phy.c +++ b/drivers/net/phy/xilinx_phy.c @@ -6,7 +6,6 @@ */ #include <config.h> -#include <common.h> #include <log.h> #include <phy.h> #include <dm.h> |