Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a263f99c authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'Add-ENETC-PTP-clock-driver'



Yangbo Lu says:

====================
Add ENETC PTP clock driver

There is same QorIQ 1588 timer IP block on the new ENETC Ethernet
controller with eTSEC/DPAA Ethernet controllers. However it's
different endianness (little-endian) and using PCI driver.

To support ENETC PTP driver, ptp_qoriq driver needed to be
reworked to make functions global for reusing, to add little-
endian support, to add ENETC memory map support, and to add
ENETC dependency for ptp_qoriq driver.

In addition, although ENETC PTP driver is a PCI driver, the dts
node still could be used. Currently the ls1028a dtsi which is
the only platform by now using ENETC is not complete, so there
is still dependency for ENETC PTP node upstreaming. This will
be done in the near future. The hardware timestamping support
for ENETC is done but needs to be reworked with new method in
internal git tree, and will be sent out soon.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 4ea7b0cf 74abc07d
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -19,6 +19,9 @@ Clock Properties:
  - fsl,max-adj      Maximum frequency adjustment in parts per billion.
  - fsl,max-adj      Maximum frequency adjustment in parts per billion.
  - fsl,extts-fifo   The presence of this property indicates hardware
  - fsl,extts-fifo   The presence of this property indicates hardware
		     support for the external trigger stamp FIFO.
		     support for the external trigger stamp FIFO.
  - little-endian    The presence of this property indicates the 1588 timer
		     IP block is little-endian mode. The default endian mode
		     is big-endian.


  These properties set the operational parameters for the PTP
  These properties set the operational parameters for the PTP
  clock. You must choose these carefully for the clock to work right.
  clock. You must choose these carefully for the clock to work right.
+1 −0
Original line number Original line Diff line number Diff line
@@ -6104,6 +6104,7 @@ FREESCALE QORIQ PTP CLOCK DRIVER
M:	Yangbo Lu <yangbo.lu@nxp.com>
M:	Yangbo Lu <yangbo.lu@nxp.com>
L:	netdev@vger.kernel.org
L:	netdev@vger.kernel.org
S:	Maintained
S:	Maintained
F:	drivers/net/ethernet/freescale/enetc/enetc_ptp.c
F:	drivers/ptp/ptp_qoriq.c
F:	drivers/ptp/ptp_qoriq.c
F:	drivers/ptp/ptp_qoriq_debugfs.c
F:	drivers/ptp/ptp_qoriq_debugfs.c
F:	include/linux/fsl/ptp_qoriq.h
F:	include/linux/fsl/ptp_qoriq.h
+1 −1
Original line number Original line Diff line number Diff line
@@ -501,7 +501,7 @@ static int dpaa_get_ts_info(struct net_device *net_dev,
	struct device_node *mac_node = dev->of_node;
	struct device_node *mac_node = dev->of_node;
	struct device_node *fman_node = NULL, *ptp_node = NULL;
	struct device_node *fman_node = NULL, *ptp_node = NULL;
	struct platform_device *ptp_dev = NULL;
	struct platform_device *ptp_dev = NULL;
	struct qoriq_ptp *ptp = NULL;
	struct ptp_qoriq *ptp = NULL;


	info->phc_index = -1;
	info->phc_index = -1;


+12 −0
Original line number Original line Diff line number Diff line
@@ -17,3 +17,15 @@ config FSL_ENETC_VF
	  virtual function (VF) devices enabled by the ENETC PF driver.
	  virtual function (VF) devices enabled by the ENETC PF driver.


	  If compiled as module (M), the module name is fsl-enetc-vf.
	  If compiled as module (M), the module name is fsl-enetc-vf.

config FSL_ENETC_PTP_CLOCK
	tristate "ENETC PTP clock driver"
	depends on PTP_1588_CLOCK_QORIQ && (FSL_ENETC || FSL_ENETC_VF)
	default y
	help
	  This driver adds support for using the ENETC 1588 timer
	  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.

	  If compiled as module (M), the module name is fsl-enetc-ptp.
+3 −0
Original line number Original line Diff line number Diff line
@@ -13,3 +13,6 @@ fsl-enetc-vf-$(CONFIG_FSL_ENETC_VF) += enetc.o enetc_cbdr.o \
				       enetc_ethtool.o
				       enetc_ethtool.o
fsl-enetc-vf-objs := enetc_vf.o $(fsl-enetc-vf-y)
fsl-enetc-vf-objs := enetc_vf.o $(fsl-enetc-vf-y)
endif
endif

obj-$(CONFIG_FSL_ENETC_PTP_CLOCK) += fsl-enetc-ptp.o
fsl-enetc-ptp-$(CONFIG_FSL_ENETC_PTP_CLOCK) += enetc_ptp.o
Loading