summaryrefslogtreecommitdiff
path: root/include/linux/fsl
diff options
context:
space:
mode:
authorYangbo Lu <yangbo.lu@nxp.com>2018-08-01 18:05:54 +0800
committerDavid S. Miller <davem@davemloft.net>2018-08-05 17:11:49 -0700
commit91305f2812624c0cf7ccbb44133b66d3b24676e4 (patch)
treefb898baeeacc4684606dbaae27a53d0446ff20f8 /include/linux/fsl
parenta16b5da54d1f3a06df642b866779358fc64d00e2 (diff)
downloadlwn-91305f2812624c0cf7ccbb44133b66d3b24676e4.tar.gz
lwn-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.h6
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;