Commit 57a10d8c authored by Min Li's avatar Min Li Committed by David S. Miller
Browse files

ptp: Add a ptp clock driver for IDT 82P33 SMU.



The IDT 82P33 Synchronization Management Unit (SMU) family provides
tools to manage timing references, clock sources and
timing paths for IEEE 1588 / Precision Time Protocol (PTP) and
Synchronous Ethernet (SyncE) based clocks. The device supports up
to three independent timing paths that control: PTP clock synthesis;
SyncE clock generation; and general purpose frequency translation.
The device supports physical layer timing with Digital PLLs (DPLLs)
and it supports packet based timing with Digitally Controlled
Oscillators (DCOs). This patch adds support for ptp clock based on
the device.

Changes since v1:
 - As suggested by Richard Cochran:
   1. Replace _mask_bit_count with the existing hweight8
   2. Prefix all functions with idt82p33
   3. Fix white space issues in Kconfig and Makefile
   4. Remove forward declaration
   5. Use adjfine instead of adjfreq for better resolution

 - As suggested by David Miller:
   1. Replace CHAN_INIT macro with a static function
      idt82p33_channel_init
   2. Employ reverse christmas tree ordering for local
      variables
   3. Fix indentation problem by appropriate number of
      TAB then SPACE character

Signed-off-by: default avatarMin Li <min.li.xe@renesas.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 04eed745
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -115,6 +115,18 @@ config PTP_1588_CLOCK_KVM
	  To compile this driver as a module, choose M here: the module
	  will be called ptp_kvm.

config PTP_1588_CLOCK_IDT82P33
	tristate "IDT 82P33xxx PTP clock"
	depends on PTP_1588_CLOCK && I2C
	default n
	help
	  This driver adds support for using the IDT 82P33xxx as a PTP
	  clock. This clock is only useful if your time stamping MAC
	  is connected to the IDT chip.

	  To compile this driver as a module, choose M here: the module
	  will be called ptp_idt82p33.

config PTP_1588_CLOCK_IDTCM
	tristate "IDT CLOCKMATRIX as PTP clock"
	depends on PTP_1588_CLOCK && I2C
+1 −0
Original line number Diff line number Diff line
@@ -13,3 +13,4 @@ obj-$(CONFIG_PTP_1588_CLOCK_QORIQ) += ptp-qoriq.o
ptp-qoriq-y				+= ptp_qoriq.o
ptp-qoriq-$(CONFIG_DEBUG_FS)		+= ptp_qoriq_debugfs.o
obj-$(CONFIG_PTP_1588_CLOCK_IDTCM)	+= ptp_clockmatrix.o
obj-$(CONFIG_PTP_1588_CLOCK_IDT82P33)	+= ptp_idt82p33.o
+1008 −0

File added.

Preview size limit exceeded, changes collapsed.

+171 −0

File added.

Preview size limit exceeded, changes collapsed.