ptp: ixp46x: move adjacent to ethernet driver

The ixp46x ptp driver has a somewhat unusual setup, where the ptp
driver and the ethernet driver are in different directories but
access the same registers that are defined a platform specific
header file.

Moving everything into drivers/net/ makes it look more like most
other ptp drivers and allows compile-testing this driver on
other targets.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Arnd Bergmann 2020-01-12 13:04:44 +01:00 committed by Jakub Kicinski
parent c74f16b603
commit 2785543fbf
7 changed files with 21 additions and 19 deletions

View File

@ -27,4 +27,18 @@ config IXP4XX_ETH
Say Y here if you want to use built-in Ethernet ports Say Y here if you want to use built-in Ethernet ports
on IXP4xx processor. on IXP4xx processor.
config PTP_1588_CLOCK_IXP46X
tristate "Intel IXP46x as PTP clock"
depends on IXP4XX_ETH
depends on PTP_1588_CLOCK
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 endif # NET_VENDOR_XSCALE

View File

@ -3,4 +3,5 @@
# Makefile for the Intel XScale IXP device drivers. # Makefile for the Intel XScale IXP device drivers.
# #
obj-$(CONFIG_IXP4XX_ETH) += ixp4xx_eth.o obj-$(CONFIG_IXP4XX_ETH) += ixp4xx_eth.o
obj-$(CONFIG_PTP_1588_CLOCK_IXP46X) += ptp_ixp46x.o

View File

@ -33,10 +33,11 @@
#include <linux/ptp_classify.h> #include <linux/ptp_classify.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/module.h> #include <linux/module.h>
#include <mach/ixp46x_ts.h>
#include <linux/soc/ixp4xx/npe.h> #include <linux/soc/ixp4xx/npe.h>
#include <linux/soc/ixp4xx/qmgr.h> #include <linux/soc/ixp4xx/qmgr.h>
#include "ixp46x_ts.h"
#define DEBUG_DESC 0 #define DEBUG_DESC 0
#define DEBUG_RX 0 #define DEBUG_RX 0
#define DEBUG_TX 0 #define DEBUG_TX 0

View File

@ -15,7 +15,8 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/ptp_clock_kernel.h> #include <linux/ptp_clock_kernel.h>
#include <mach/ixp46x_ts.h>
#include "ixp46x_ts.h"
#define DRIVER "ptp_ixp46x" #define DRIVER "ptp_ixp46x"
#define N_EXT_TS 2 #define N_EXT_TS 2

View File

@ -56,20 +56,6 @@ config PTP_1588_CLOCK_QORIQ
To compile this driver as a module, choose M here: the module To compile this driver as a module, choose M here: the module
will be called ptp-qoriq. will be called ptp-qoriq.
config PTP_1588_CLOCK_IXP46X
tristate "Intel IXP46x as PTP clock"
depends on IXP4XX_ETH
depends on PTP_1588_CLOCK
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.
comment "Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks." comment "Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks."
depends on PHYLIB=n || NETWORK_PHY_TIMESTAMPING=n depends on PHYLIB=n || NETWORK_PHY_TIMESTAMPING=n

View File

@ -7,7 +7,6 @@ ptp-y := ptp_clock.o ptp_chardev.o ptp_sysfs.o
obj-$(CONFIG_PTP_1588_CLOCK) += ptp.o obj-$(CONFIG_PTP_1588_CLOCK) += ptp.o
obj-$(CONFIG_PTP_1588_CLOCK_DTE) += ptp_dte.o obj-$(CONFIG_PTP_1588_CLOCK_DTE) += ptp_dte.o
obj-$(CONFIG_PTP_1588_CLOCK_INES) += ptp_ines.o obj-$(CONFIG_PTP_1588_CLOCK_INES) += ptp_ines.o
obj-$(CONFIG_PTP_1588_CLOCK_IXP46X) += ptp_ixp46x.o
obj-$(CONFIG_PTP_1588_CLOCK_PCH) += ptp_pch.o obj-$(CONFIG_PTP_1588_CLOCK_PCH) += ptp_pch.o
obj-$(CONFIG_PTP_1588_CLOCK_KVM) += ptp_kvm.o obj-$(CONFIG_PTP_1588_CLOCK_KVM) += ptp_kvm.o
obj-$(CONFIG_PTP_1588_CLOCK_QORIQ) += ptp-qoriq.o obj-$(CONFIG_PTP_1588_CLOCK_QORIQ) += ptp-qoriq.o