mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
![Arnd Bergmann](/assets/img/avatar_default.png)
After the recent ixp4xx cleanups, the ptp driver has gained a
build failure in some configurations:
drivers/net/ethernet/xscale/ptp_ixp46x.c: In function 'ptp_ixp_init':
drivers/net/ethernet/xscale/ptp_ixp46x.c:290:51: error: 'IXP4XX_TIMESYNC_BASE_VIRT' undeclared (first use in this function)
Avoid the last bit of hardcoded constants from platform headers
by turning the ptp driver bit into a platform driver and passing
the IRQ and MMIO address as resources.
This is a bit tricky:
- The interface between the two drivers is now the new
ixp46x_ptp_find() function, replacing the global
ixp46x_phc_index variable. The call is done as late
as possible, in hwtstamp_set(), to ensure that the
ptp device is fully probed.
- As the ptp driver is now called by the network driver, the
link dependency is reversed, which in turn requires a small
Makefile hack
- The GPIO number is still left hardcoded. This is clearly not
great, but it can be addressed later. Note that commit 98ac0cc270
("ARM: ixp4xx: Convert to MULTI_IRQ_HANDLER") changed the
IRQ number to something meaningless. Passing the correct IRQ
in a resource fixes this.
- When the PTP driver is disabled, ethtool .get_ts_info()
now correctly lists only software timestamping regardless
of the hardware.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[Fix a missing include]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
45 lines
1.3 KiB
Text
45 lines
1.3 KiB
Text
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# Intel XScale IXP device configuration
|
|
#
|
|
|
|
config NET_VENDOR_XSCALE
|
|
bool "Intel XScale IXP devices"
|
|
default y
|
|
depends on NET_VENDOR_INTEL && (ARM && ARCH_IXP4XX && \
|
|
IXP4XX_NPE && IXP4XX_QMGR)
|
|
help
|
|
If you have a network (Ethernet) card belonging to this class, say Y.
|
|
|
|
Note that the answer to this question does not directly affect the
|
|
kernel: saying N will just cause the configurator to skip all
|
|
the questions about XScale IXP devices. If you say Y, you will be
|
|
asked for your specific card in the following questions.
|
|
|
|
if NET_VENDOR_XSCALE
|
|
|
|
config IXP4XX_ETH
|
|
tristate "Intel IXP4xx Ethernet support"
|
|
depends on ARM && ARCH_IXP4XX && IXP4XX_NPE && IXP4XX_QMGR
|
|
select PHYLIB
|
|
select OF_MDIO if OF
|
|
select NET_PTP_CLASSIFY
|
|
help
|
|
Say Y here if you want to use built-in Ethernet ports
|
|
on IXP4xx processor.
|
|
|
|
config PTP_1588_CLOCK_IXP46X
|
|
bool "Intel IXP46x as PTP clock"
|
|
depends on IXP4XX_ETH
|
|
depends on PTP_1588_CLOCK=y || PTP_1588_CLOCK=IXP4XX_ETH
|
|
default y
|
|
help
|
|
This driver adds support for using the IXP46X as a PTP
|
|
clock. This clock is only useful if your PTP programs are
|
|
getting hardware time stamps on the PTP Ethernet packets
|
|
using the SO_TIMESTAMPING API.
|
|
|
|
To compile this driver as a module, choose M here: the module
|
|
will be called ptp_ixp46x.
|
|
|
|
endif # NET_VENDOR_XSCALE
|