2019-05-19 20:07:45 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2011-06-18 16:52:36 +08:00
|
|
|
#
|
2019-06-25 16:48:28 +08:00
|
|
|
# Cadence device configuration
|
2011-06-18 16:52:36 +08:00
|
|
|
#
|
|
|
|
|
2018-07-04 19:50:12 +08:00
|
|
|
config NET_VENDOR_CADENCE
|
2011-11-08 18:12:32 +08:00
|
|
|
bool "Cadence devices"
|
2015-03-03 22:43:00 +08:00
|
|
|
depends on HAS_IOMEM
|
2011-11-15 17:36:30 +08:00
|
|
|
default y
|
2011-06-18 16:52:36 +08:00
|
|
|
---help---
|
|
|
|
If you have a network (Ethernet) card belonging to this class, say Y.
|
|
|
|
|
|
|
|
If unsure, say Y.
|
|
|
|
|
|
|
|
Note that the answer to this question doesn't directly affect the
|
2019-06-25 16:48:28 +08:00
|
|
|
kernel: saying N will just cause the configurator to skip all the
|
|
|
|
remaining Cadence network card questions. If you say Y, you will be
|
2011-06-18 16:52:36 +08:00
|
|
|
asked for your specific card in the following questions.
|
|
|
|
|
2018-07-04 19:50:12 +08:00
|
|
|
if NET_VENDOR_CADENCE
|
2011-06-18 16:52:36 +08:00
|
|
|
|
|
|
|
config MACB
|
2011-11-08 18:12:32 +08:00
|
|
|
tristate "Cadence MACB/GEM support"
|
2019-06-25 16:48:27 +08:00
|
|
|
depends on HAS_DMA && COMMON_CLK
|
2019-11-13 17:00:06 +08:00
|
|
|
select PHYLINK
|
2011-06-18 16:52:36 +08:00
|
|
|
---help---
|
2011-11-08 18:12:32 +08:00
|
|
|
The Cadence MACB ethernet interface is found on many Atmel AT32 and
|
|
|
|
AT91 parts. This driver also supports the Cadence GEM (Gigabit
|
2014-12-05 21:03:53 +08:00
|
|
|
Ethernet MAC found in some ARM SoC devices). Say Y to include
|
|
|
|
support for the MACB/GEM chip.
|
2011-06-18 16:52:36 +08:00
|
|
|
|
|
|
|
To compile this driver as a module, choose M here: the module
|
2017-06-29 14:12:51 +08:00
|
|
|
will be macb.
|
|
|
|
|
|
|
|
config MACB_USE_HWSTAMP
|
|
|
|
bool "Use IEEE 1588 hwstamp"
|
|
|
|
depends on MACB
|
net: Make PTP-specific drivers depend on PTP_1588_CLOCK
Commit d1cbfd771ce8 ("ptp_clock: Allow for it to be optional") changed
all PTP-capable Ethernet drivers from `select PTP_1588_CLOCK` to `imply
PTP_1588_CLOCK`, "in order to break the hard dependency between the PTP
clock subsystem and ethernet drivers capable of being clock providers."
As a result it is possible to build PTP-capable Ethernet drivers without
the PTP subsystem by deselecting PTP_1588_CLOCK. Drivers are required to
handle the missing dependency gracefully.
Some PTP-capable Ethernet drivers (e.g., TI_CPSW) factor their PTP code
out into separate drivers (e.g., TI_CPTS_MOD). The above commit also
changed these PTP-specific drivers to `imply PTP_1588_CLOCK`, making it
possible to build them without the PTP subsystem. But as Grygorii
Strashko noted in [1]:
On Wed, Apr 22, 2020 at 02:16:11PM +0300, Grygorii Strashko wrote:
> Another question is that CPTS completely nonfunctional in this case and
> it was never expected that somebody will even try to use/run such
> configuration (except for random build purposes).
In my view, enabling a PTP-specific driver without the PTP subsystem is
a configuration error made possible by the above commit. Kconfig should
not allow users to create a configuration with missing dependencies that
results in "completely nonfunctional" drivers.
I audited all network drivers that call ptp_clock_register() but merely
`imply PTP_1588_CLOCK` and found five PTP-specific drivers that are
likely nonfunctional without PTP_1588_CLOCK:
NET_DSA_MV88E6XXX_PTP
NET_DSA_SJA1105_PTP
MACB_USE_HWSTAMP
CAVIUM_PTP
TI_CPTS_MOD
Note how these symbols all reference PTP or timestamping in their name;
this is a clue that they depend on PTP_1588_CLOCK.
Change them from `imply PTP_1588_CLOCK` [2] to `depends on PTP_1588_CLOCK`.
I'm not using `select PTP_1588_CLOCK` here because PTP_1588_CLOCK has
its own dependencies, which `select` would not transitively apply.
Additionally, remove the `select NET_PTP_CLASSIFY` from CPTS_TI_MOD;
PTP_1588_CLOCK already selects that.
[1]: https://lore.kernel.org/lkml/c04458ed-29ee-1797-3a11-7f3f560553e6@ti.com/
[2]: NET_DSA_SJA1105_PTP had never declared any type of dependency on
PTP_1588_CLOCK (`imply` or otherwise); adding a `depends on PTP_1588_CLOCK`
here seems appropriate.
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: d1cbfd771ce8 ("ptp_clock: Allow for it to be optional")
Signed-off-by: Clay McClure <clay@daemons.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-04-29 15:59:00 +08:00
|
|
|
depends on PTP_1588_CLOCK
|
2017-06-29 14:12:51 +08:00
|
|
|
default y
|
|
|
|
---help---
|
|
|
|
Enable IEEE 1588 Precision Time Protocol (PTP) support for MACB.
|
2011-06-18 16:52:36 +08:00
|
|
|
|
2016-12-14 14:39:15 +08:00
|
|
|
config MACB_PCI
|
|
|
|
tristate "Cadence PCI MACB/GEM support"
|
2019-06-25 16:48:27 +08:00
|
|
|
depends on MACB && PCI
|
2016-12-14 14:39:15 +08:00
|
|
|
---help---
|
|
|
|
This is PCI wrapper for MACB driver.
|
|
|
|
|
|
|
|
To compile this driver as a module, choose M here: the module
|
|
|
|
will be called macb_pci.
|
|
|
|
|
2018-07-04 19:50:12 +08:00
|
|
|
endif # NET_VENDOR_CADENCE
|