diff options
author | 2018-08-01 18:05:54 +0800 | |
---|---|---|
committer | 2018-08-05 17:11:49 -0700 | |
commit | 91305f2812624c0cf7ccbb44133b66d3b24676e4 (patch) | |
tree | fb898baeeacc4684606dbaae27a53d0446ff20f8 /include/linux/fsl | |
parent | powerpc/mpc85xx: add clocks property for fman ptp timer node (diff) | |
download | linux-91305f2812624c0cf7ccbb44133b66d3b24676e4.tar.gz linux-91305f2812624c0cf7ccbb44133b66d3b24676e4.tar.bz2 linux-91305f2812624c0cf7ccbb44133b66d3b24676e4.zip |
ptp_qoriq: support automatic configuration for ptp timer
This patch is to support automatic configuration for ptp timer.
If required ptp dts properties are not provided, driver could
try to calculate a set of default configurations to initialize
the ptp timer. This makes the driver work for many boards which
don't have the required ptp dts properties in current kernel.
Also the users could set dts properties by themselves according
to their requirement.
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/fsl')
-rw-r--r-- | include/linux/fsl/ptp_qoriq.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/fsl/ptp_qoriq.h b/include/linux/fsl/ptp_qoriq.h index dc3dac40f069..c1f003aadcce 100644 --- a/include/linux/fsl/ptp_qoriq.h +++ b/include/linux/fsl/ptp_qoriq.h @@ -127,9 +127,13 @@ struct qoriq_ptp_registers { #define DRIVER "ptp_qoriq" -#define DEFAULT_CKSEL 1 #define N_EXT_TS 2 +#define DEFAULT_CKSEL 1 +#define DEFAULT_TMR_PRSC 2 +#define DEFAULT_FIPER1_PERIOD 1000000000 +#define DEFAULT_FIPER2_PERIOD 100000 + struct qoriq_ptp { void __iomem *base; struct qoriq_ptp_registers regs; |