2019-05-19 13:07:45 +01:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2009-10-14 15:13:45 -07:00
|
|
|
config STMMAC_ETH
|
2019-07-02 11:12:10 +02:00
|
|
|
tristate "STMicroelectronics Multi-Gigabit Ethernet driver"
|
2013-05-09 11:04:46 +00:00
|
|
|
depends on HAS_IOMEM && HAS_DMA
|
ethernet: fix PTP_1588_CLOCK dependencies
The 'imply' keyword does not do what most people think it does, it only
politely asks Kconfig to turn on another symbol, but does not prevent
it from being disabled manually or built as a loadable module when the
user is built-in. In the ICE driver, the latter now causes a link failure:
aarch64-linux-ld: drivers/net/ethernet/intel/ice/ice_main.o: in function `ice_eth_ioctl':
ice_main.c:(.text+0x13b0): undefined reference to `ice_ptp_get_ts_config'
ice_main.c:(.text+0x13b0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ice_ptp_get_ts_config'
aarch64-linux-ld: ice_main.c:(.text+0x13bc): undefined reference to `ice_ptp_set_ts_config'
ice_main.c:(.text+0x13bc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ice_ptp_set_ts_config'
aarch64-linux-ld: drivers/net/ethernet/intel/ice/ice_main.o: in function `ice_prepare_for_reset':
ice_main.c:(.text+0x31fc): undefined reference to `ice_ptp_release'
ice_main.c:(.text+0x31fc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `ice_ptp_release'
aarch64-linux-ld: drivers/net/ethernet/intel/ice/ice_main.o: in function `ice_rebuild':
This is a recurring problem in many drivers, and we have discussed
it several times befores, without reaching a consensus. I'm providing
a link to the previous email thread for reference, which discusses
some related problems.
To solve the dependency issue better than the 'imply' keyword, introduce a
separate Kconfig symbol "CONFIG_PTP_1588_CLOCK_OPTIONAL" that any driver
can depend on if it is able to use PTP support when available, but works
fine without it. Whenever CONFIG_PTP_1588_CLOCK=m, those drivers are
then prevented from being built-in, the same way as with a 'depends on
PTP_1588_CLOCK || !PTP_1588_CLOCK' dependency that does the same trick,
but that can be rather confusing when you first see it.
Since this should cover the dependencies correctly, the IS_REACHABLE()
hack in the header is no longer needed now, and can be turned back
into a normal IS_ENABLED() check. Any driver that gets the dependency
wrong will now cause a link time failure rather than being unable to use
PTP support when that is in a loadable module.
However, the two recently added ptp_get_vclocks_index() and
ptp_convert_timestamp() interfaces are only called from builtin code with
ethtool and socket timestamps, so keep the current behavior by stubbing
those out completely when PTP is in a loadable module. This should be
addressed properly in a follow-up.
As Richard suggested, we may want to actually turn PTP support into a
'bool' option later on, preventing it from being a loadable module
altogether, which would be one way to solve the problem with the ethtool
interface.
Fixes: 06c16d89d2cb ("ice: register 1588 PTP clock device object for E810 devices")
Link: https://lore.kernel.org/netdev/20210804121318.337276-1-arnd@kernel.org/
Link: https://lore.kernel.org/netdev/CAK8P3a06enZOf=XyZ+zcAwBczv41UuCTz+=0FMf2gBz1_cOnZQ@mail.gmail.com/
Link: https://lore.kernel.org/netdev/CAK8P3a3=eOxE-K25754+fB_-i_0BZzf9a9RfPTX3ppSwu9WZXw@mail.gmail.com/
Link: https://lore.kernel.org/netdev/20210726084540.3282344-1-arnd@kernel.org/
Acked-by: Shannon Nelson <snelson@pensando.io>
Acked-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210812183509.1362782-1-arnd@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-08-12 20:33:58 +02:00
|
|
|
depends on PTP_1588_CLOCK_OPTIONAL
|
2009-10-14 15:13:45 -07:00
|
|
|
select MII
|
2020-08-27 04:00:28 +02:00
|
|
|
select PCS_XPCS
|
2019-07-09 10:03:00 +02:00
|
|
|
select PAGE_POOL
|
2019-06-11 17:18:46 +02:00
|
|
|
select PHYLINK
|
2010-03-31 21:44:03 +00:00
|
|
|
select CRC32
|
2014-01-17 21:24:41 +08:00
|
|
|
select RESET_CONTROLLER
|
2020-06-14 01:50:22 +09:00
|
|
|
help
|
2017-01-17 14:53:07 +00:00
|
|
|
This is the driver for the Ethernet IPs built around a
|
|
|
|
|
Synopsys IP Core.
|
2009-10-14 15:13:45 -07:00
|
|
|
|
|
|
|
|
if STMMAC_ETH
|
|
|
|
|
|
2019-05-24 10:20:19 +02:00
|
|
|
config STMMAC_SELFTESTS
|
|
|
|
|
bool "Support for STMMAC Selftests"
|
2019-05-28 17:10:40 +08:00
|
|
|
depends on INET
|
2019-05-24 10:20:19 +02:00
|
|
|
depends on STMMAC_ETH
|
|
|
|
|
default n
|
2020-06-14 01:50:22 +09:00
|
|
|
help
|
2019-05-24 10:20:19 +02:00
|
|
|
This adds support for STMMAC Selftests using ethtool. Enable this
|
|
|
|
|
feature if you are facing problems with your HW and submit the test
|
|
|
|
|
results to the netdev Mailing List.
|
|
|
|
|
|
2011-12-21 03:58:19 +00:00
|
|
|
config STMMAC_PLATFORM
|
2014-11-10 12:38:59 +02:00
|
|
|
tristate "STMMAC Platform bus support"
|
2011-12-21 03:58:19 +00:00
|
|
|
depends on STMMAC_ETH
|
2015-05-27 11:02:49 -07:00
|
|
|
select MFD_SYSCON
|
2012-06-07 19:25:07 +00:00
|
|
|
default y
|
2020-06-14 01:50:22 +09:00
|
|
|
help
|
2014-11-04 15:49:32 +01:00
|
|
|
This selects the platform specific bus support for the stmmac driver.
|
|
|
|
|
This is the driver used on several SoCs:
|
|
|
|
|
STi, Allwinner, Amlogic Meson, Altera SOCFPGA.
|
|
|
|
|
|
2011-12-21 03:58:19 +00:00
|
|
|
If you have a controller with this interface, say Y or M here.
|
|
|
|
|
|
|
|
|
|
If unsure, say N.
|
|
|
|
|
|
2015-05-14 12:10:59 +02:00
|
|
|
if STMMAC_PLATFORM
|
|
|
|
|
|
2017-01-09 12:35:10 +00:00
|
|
|
config DWMAC_DWC_QOS_ETH
|
|
|
|
|
tristate "Support for snps,dwc-qos-ethernet.txt DT binding."
|
|
|
|
|
select CRC32
|
|
|
|
|
select MII
|
2018-08-22 15:27:23 +02:00
|
|
|
depends on OF && HAS_DMA
|
2017-01-09 12:35:10 +00:00
|
|
|
help
|
|
|
|
|
Support for chips using the snps,dwc-qos-ethernet.txt DT binding.
|
|
|
|
|
|
2015-05-14 12:10:59 +02:00
|
|
|
config DWMAC_GENERIC
|
|
|
|
|
tristate "Generic driver for DWMAC"
|
|
|
|
|
default STMMAC_PLATFORM
|
2020-06-14 01:50:22 +09:00
|
|
|
help
|
2015-05-14 12:10:59 +02:00
|
|
|
Generic DWMAC driver for platforms that don't require any
|
|
|
|
|
platform specific code to function or is using platform
|
|
|
|
|
data for setup.
|
|
|
|
|
|
2017-08-04 13:08:51 -07:00
|
|
|
config DWMAC_ANARION
|
|
|
|
|
tristate "Adaptrum Anarion GMAC support"
|
|
|
|
|
default ARC
|
|
|
|
|
depends on OF && (ARC || COMPILE_TEST)
|
|
|
|
|
help
|
|
|
|
|
Support for Adaptrum Anarion GMAC Ethernet controller.
|
|
|
|
|
|
|
|
|
|
This selects the Anarion SoC glue layer support for the stmmac driver.
|
|
|
|
|
|
2021-06-15 01:15:37 +08:00
|
|
|
config DWMAC_INGENIC
|
|
|
|
|
tristate "Ingenic MAC support"
|
|
|
|
|
default MACH_INGENIC
|
|
|
|
|
depends on OF && HAS_IOMEM && (MACH_INGENIC || COMPILE_TEST)
|
|
|
|
|
select MFD_SYSCON
|
|
|
|
|
help
|
|
|
|
|
Support for ethernet controller on Ingenic SoCs.
|
|
|
|
|
|
|
|
|
|
This selects Ingenic SoCs glue layer support for the stmmac
|
|
|
|
|
device driver. This driver is used on for the Ingenic SoCs
|
|
|
|
|
MAC ethernet controller.
|
|
|
|
|
|
2015-05-27 11:02:49 -07:00
|
|
|
config DWMAC_IPQ806X
|
|
|
|
|
tristate "QCA IPQ806x DWMAC support"
|
|
|
|
|
default ARCH_QCOM
|
2018-08-22 15:27:23 +02:00
|
|
|
depends on OF && (ARCH_QCOM || COMPILE_TEST)
|
2015-05-27 11:02:49 -07:00
|
|
|
select MFD_SYSCON
|
|
|
|
|
help
|
|
|
|
|
Support for QCA IPQ806X DWMAC Ethernet.
|
|
|
|
|
|
|
|
|
|
This selects the IPQ806x SoC glue layer support for the stmmac
|
|
|
|
|
device driver. This driver does not use any of the hardware
|
|
|
|
|
acceleration features available on this SoC. Network devices
|
|
|
|
|
will behave like standard non-accelerated ethernet interfaces.
|
|
|
|
|
|
2015-05-14 12:11:00 +02:00
|
|
|
config DWMAC_LPC18XX
|
|
|
|
|
tristate "NXP LPC18xx/43xx DWMAC support"
|
|
|
|
|
default ARCH_LPC18XX
|
2016-06-01 13:28:58 +01:00
|
|
|
depends on OF && (ARCH_LPC18XX || COMPILE_TEST)
|
2015-05-14 12:11:00 +02:00
|
|
|
select MFD_SYSCON
|
2020-06-14 01:50:22 +09:00
|
|
|
help
|
2015-05-14 12:11:00 +02:00
|
|
|
Support for NXP LPC18xx/43xx DWMAC Ethernet.
|
|
|
|
|
|
2018-12-12 17:35:31 +08:00
|
|
|
config DWMAC_MEDIATEK
|
|
|
|
|
tristate "MediaTek MT27xx GMAC support"
|
|
|
|
|
depends on OF && (ARCH_MEDIATEK || COMPILE_TEST)
|
|
|
|
|
help
|
|
|
|
|
Support for MediaTek GMAC Ethernet controller.
|
|
|
|
|
|
|
|
|
|
This selects the MT2712 SoC support for the stmmac driver.
|
|
|
|
|
|
2015-05-14 12:11:01 +02:00
|
|
|
config DWMAC_MESON
|
|
|
|
|
tristate "Amlogic Meson dwmac support"
|
|
|
|
|
default ARCH_MESON
|
2016-09-06 23:38:46 +02:00
|
|
|
depends on OF && COMMON_CLK && (ARCH_MESON || COMPILE_TEST)
|
2015-05-14 12:11:01 +02:00
|
|
|
help
|
|
|
|
|
Support for Ethernet controller on Amlogic Meson SoCs.
|
|
|
|
|
|
|
|
|
|
This selects the Amlogic Meson SoC glue layer support for
|
2016-09-06 23:38:46 +02:00
|
|
|
the stmmac device driver. This driver is used for Meson6,
|
|
|
|
|
Meson8, Meson8b and GXBB SoCs.
|
2015-05-14 12:11:01 +02:00
|
|
|
|
2016-11-02 15:02:36 +01:00
|
|
|
config DWMAC_OXNAS
|
|
|
|
|
tristate "Oxford Semiconductor OXNAS dwmac support"
|
|
|
|
|
default ARCH_OXNAS
|
|
|
|
|
depends on OF && COMMON_CLK && (ARCH_OXNAS || COMPILE_TEST)
|
|
|
|
|
select MFD_SYSCON
|
|
|
|
|
help
|
|
|
|
|
Support for Ethernet controller on Oxford Semiconductor OXNAS SoCs.
|
|
|
|
|
|
|
|
|
|
This selects the Oxford Semiconductor OXNASSoC glue layer support for
|
|
|
|
|
the stmmac device driver. This driver is used for OX820.
|
|
|
|
|
|
2019-01-21 14:43:15 +05:30
|
|
|
config DWMAC_QCOM_ETHQOS
|
|
|
|
|
tristate "Qualcomm ETHQOS support"
|
|
|
|
|
default ARCH_QCOM
|
|
|
|
|
depends on OF && (ARCH_QCOM || COMPILE_TEST)
|
|
|
|
|
help
|
|
|
|
|
Support for the Qualcomm ETHQOS core.
|
|
|
|
|
|
|
|
|
|
This selects the Qualcomm ETHQOS glue layer support for the
|
|
|
|
|
stmmac device driver.
|
|
|
|
|
|
2015-05-14 12:11:02 +02:00
|
|
|
config DWMAC_ROCKCHIP
|
|
|
|
|
tristate "Rockchip dwmac support"
|
|
|
|
|
default ARCH_ROCKCHIP
|
2018-08-22 15:27:23 +02:00
|
|
|
depends on OF && (ARCH_ROCKCHIP || COMPILE_TEST)
|
2015-05-14 12:11:02 +02:00
|
|
|
select MFD_SYSCON
|
|
|
|
|
help
|
|
|
|
|
Support for Ethernet controller on Rockchip RK3288 SoC.
|
|
|
|
|
|
|
|
|
|
This selects the Rockchip RK3288 SoC glue layer support for
|
|
|
|
|
the stmmac device driver.
|
|
|
|
|
|
2015-05-14 12:11:03 +02:00
|
|
|
config DWMAC_SOCFPGA
|
|
|
|
|
tristate "SOCFPGA dwmac support"
|
2021-03-11 16:25:34 +01:00
|
|
|
default ARCH_INTEL_SOCFPGA
|
|
|
|
|
depends on OF && (ARCH_INTEL_SOCFPGA || COMPILE_TEST)
|
2015-05-14 12:11:03 +02:00
|
|
|
select MFD_SYSCON
|
|
|
|
|
help
|
|
|
|
|
Support for ethernet controller on Altera SOCFPGA
|
|
|
|
|
|
|
|
|
|
This selects the Altera SOCFPGA SoC glue layer support
|
|
|
|
|
for the stmmac device driver. This driver is used for
|
|
|
|
|
arria5 and cyclone5 FPGA SoCs.
|
|
|
|
|
|
2015-05-14 12:11:04 +02:00
|
|
|
config DWMAC_STI
|
|
|
|
|
tristate "STi GMAC support"
|
|
|
|
|
default ARCH_STI
|
2018-08-22 15:27:23 +02:00
|
|
|
depends on OF && (ARCH_STI || COMPILE_TEST)
|
2015-05-14 12:11:04 +02:00
|
|
|
select MFD_SYSCON
|
2020-06-14 01:50:22 +09:00
|
|
|
help
|
2015-05-14 12:11:04 +02:00
|
|
|
Support for ethernet controller on STi SOCs.
|
|
|
|
|
|
|
|
|
|
This selects STi SoC glue layer support for the stmmac
|
|
|
|
|
device driver. This driver is used on for the STi series
|
|
|
|
|
SOCs GMAC ethernet controller.
|
|
|
|
|
|
2016-08-29 18:23:38 +02:00
|
|
|
config DWMAC_STM32
|
|
|
|
|
tristate "STM32 DWMAC support"
|
|
|
|
|
default ARCH_STM32
|
2016-11-20 17:22:38 +00:00
|
|
|
depends on OF && HAS_IOMEM && (ARCH_STM32 || COMPILE_TEST)
|
2016-08-29 18:23:38 +02:00
|
|
|
select MFD_SYSCON
|
2020-06-14 01:50:22 +09:00
|
|
|
help
|
2016-08-29 18:23:38 +02:00
|
|
|
Support for ethernet controller on STM32 SOCs.
|
|
|
|
|
|
|
|
|
|
This selects STM32 SoC glue layer support for the stmmac
|
|
|
|
|
device driver. This driver is used on for the STM32 series
|
|
|
|
|
SOCs GMAC ethernet controller.
|
|
|
|
|
|
2015-05-14 12:11:05 +02:00
|
|
|
config DWMAC_SUNXI
|
|
|
|
|
tristate "Allwinner GMAC support"
|
|
|
|
|
default ARCH_SUNXI
|
2018-08-22 15:27:23 +02:00
|
|
|
depends on OF && (ARCH_SUNXI || COMPILE_TEST)
|
2020-06-14 01:50:22 +09:00
|
|
|
help
|
2015-05-14 12:11:05 +02:00
|
|
|
Support for Allwinner A20/A31 GMAC ethernet controllers.
|
|
|
|
|
|
|
|
|
|
This selects Allwinner SoC glue layer support for the
|
|
|
|
|
stmmac device driver. This driver is used for A20/A31
|
|
|
|
|
GMAC ethernet controller.
|
2017-05-31 09:18:36 +02:00
|
|
|
|
|
|
|
|
config DWMAC_SUN8I
|
|
|
|
|
tristate "Allwinner sun8i GMAC support"
|
|
|
|
|
default ARCH_SUNXI
|
|
|
|
|
depends on OF && (ARCH_SUNXI || COMPILE_TEST)
|
2017-10-24 19:57:13 +02:00
|
|
|
select MDIO_BUS_MUX
|
2020-06-14 01:50:22 +09:00
|
|
|
help
|
2017-05-31 09:18:36 +02:00
|
|
|
Support for Allwinner H3 A83T A64 EMAC ethernet controllers.
|
|
|
|
|
|
|
|
|
|
This selects Allwinner SoC glue layer support for the
|
|
|
|
|
stmmac device driver. This driver is used for H3/A83T/A64
|
|
|
|
|
EMAC ethernet controller.
|
2020-05-28 16:26:24 +08:00
|
|
|
|
|
|
|
|
config DWMAC_IMX8
|
|
|
|
|
tristate "NXP IMX8 DWMAC support"
|
|
|
|
|
default ARCH_MXC
|
|
|
|
|
depends on OF && (ARCH_MXC || COMPILE_TEST)
|
|
|
|
|
select MFD_SYSCON
|
2020-06-14 01:50:22 +09:00
|
|
|
help
|
2020-05-28 16:26:24 +08:00
|
|
|
Support for ethernet controller on NXP i.MX8 SOCs.
|
|
|
|
|
|
|
|
|
|
This selects NXP SoC glue layer support for the stmmac
|
|
|
|
|
device driver. This driver is used for i.MX8 series like
|
|
|
|
|
iMX8MP/iMX8DXL GMAC ethernet controller.
|
|
|
|
|
|
2020-08-26 12:33:42 +08:00
|
|
|
config DWMAC_INTEL_PLAT
|
|
|
|
|
tristate "Intel dwmac support"
|
|
|
|
|
depends on OF && COMMON_CLK
|
|
|
|
|
depends on STMMAC_ETH
|
|
|
|
|
help
|
|
|
|
|
Support for ethernet controllers on Intel SoCs
|
|
|
|
|
|
|
|
|
|
This selects the Intel platform specific glue layer support for
|
|
|
|
|
the stmmac device driver. This driver is used for the Intel Keem Bay
|
|
|
|
|
SoC.
|
2021-02-16 00:24:36 +09:00
|
|
|
|
|
|
|
|
config DWMAC_VISCONTI
|
|
|
|
|
tristate "Toshiba Visconti DWMAC support"
|
|
|
|
|
default ARCH_VISCONTI
|
|
|
|
|
depends on OF && COMMON_CLK && (ARCH_VISCONTI || COMPILE_TEST)
|
|
|
|
|
help
|
|
|
|
|
Support for ethernet controller on Visconti SoCs.
|
|
|
|
|
|
2015-05-14 12:10:59 +02:00
|
|
|
endif
|
|
|
|
|
|
2020-03-31 01:05:10 +08:00
|
|
|
config DWMAC_INTEL
|
|
|
|
|
tristate "Intel GMAC support"
|
|
|
|
|
default X86
|
|
|
|
|
depends on X86 && STMMAC_ETH && PCI
|
|
|
|
|
depends on COMMON_CLK
|
2020-06-14 01:50:22 +09:00
|
|
|
help
|
2020-03-31 01:05:10 +08:00
|
|
|
This selects the Intel platform specific bus support for the
|
|
|
|
|
stmmac driver. This driver is used for Intel Quark/EHL/TGL.
|
|
|
|
|
|
2021-06-18 10:53:34 +08:00
|
|
|
config DWMAC_LOONGSON
|
|
|
|
|
tristate "Loongson PCI DWMAC support"
|
|
|
|
|
default MACH_LOONGSON64
|
|
|
|
|
depends on STMMAC_ETH && PCI
|
|
|
|
|
depends on COMMON_CLK
|
|
|
|
|
help
|
|
|
|
|
This selects the LOONGSON PCI bus support for the stmmac driver,
|
|
|
|
|
Support for ethernet controller on Loongson-2K1000 SoC and LS7A1000 bridge.
|
|
|
|
|
|
2011-12-21 03:58:19 +00:00
|
|
|
config STMMAC_PCI
|
2014-11-10 12:38:59 +02:00
|
|
|
tristate "STMMAC PCI bus support"
|
2013-01-22 10:30:30 -08:00
|
|
|
depends on STMMAC_ETH && PCI
|
2019-08-30 14:34:05 -07:00
|
|
|
depends on COMMON_CLK
|
2020-06-14 01:50:22 +09:00
|
|
|
help
|
2017-01-17 14:53:07 +00:00
|
|
|
This selects the platform specific bus support for the stmmac driver.
|
|
|
|
|
This driver was tested on XLINX XC2V3000 FF1152AMT0221
|
|
|
|
|
D1215994A VIRTEX FPGA board and SNPS QoS IPK Prototyping Kit.
|
2011-12-21 03:58:19 +00:00
|
|
|
|
2017-01-17 14:53:07 +00:00
|
|
|
If you have a controller with this interface, say Y or M here.
|
2011-12-21 03:58:19 +00:00
|
|
|
|
|
|
|
|
If unsure, say N.
|
2009-10-14 15:13:45 -07:00
|
|
|
endif
|