summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/timer-fsl-ftm.c
diff options
context:
space:
mode:
authorPatrick Havelange <patrick.havelange@essensium.com>2019-04-02 08:30:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-25 21:33:41 +0200
commitd4c5c46206699d5a34542e96f90cee68f3dcd2b4 (patch)
tree84f01b419d55785726022ef6a247e9e3daa62f35 /drivers/clocksource/timer-fsl-ftm.c
parentdrivers/pwm: pwm-fsl-ftm: use common header for FlexTimer #defines (diff)
downloadlinux-d4c5c46206699d5a34542e96f90cee68f3dcd2b4.tar.xz
linux-d4c5c46206699d5a34542e96f90cee68f3dcd2b4.zip
drivers/clocksource: timer-fsl-ftm: use common header for FlexTimer #defines
Common #defines have been moved to "linux/fsl/ftm.h". Thus making use of this file. Also FTM_SC_CLK_SHIFT has been renamed to FTM_SC_CLK_MASK_SHIFT. Reviewed-by: Esben Haabendal <esben@haabendal.dk> Signed-off-by: Patrick Havelange <patrick.havelange@essensium.com> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/clocksource/timer-fsl-ftm.c')
-rw-r--r--drivers/clocksource/timer-fsl-ftm.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/clocksource/timer-fsl-ftm.c b/drivers/clocksource/timer-fsl-ftm.c
index 846d18daf893..e1c34b2f53a5 100644
--- a/drivers/clocksource/timer-fsl-ftm.c
+++ b/drivers/clocksource/timer-fsl-ftm.c
@@ -19,20 +19,9 @@
#include <linux/of_irq.h>
#include <linux/sched_clock.h>
#include <linux/slab.h>
+#include <linux/fsl/ftm.h>
-#define FTM_SC 0x00
-#define FTM_SC_CLK_SHIFT 3
-#define FTM_SC_CLK_MASK (0x3 << FTM_SC_CLK_SHIFT)
-#define FTM_SC_CLK(c) ((c) << FTM_SC_CLK_SHIFT)
-#define FTM_SC_PS_MASK 0x7
-#define FTM_SC_TOIE BIT(6)
-#define FTM_SC_TOF BIT(7)
-
-#define FTM_CNT 0x04
-#define FTM_MOD 0x08
-#define FTM_CNTIN 0x4C
-
-#define FTM_PS_MAX 7
+#define FTM_SC_CLK(c) ((c) << FTM_SC_CLK_MASK_SHIFT)
struct ftm_clock_device {
void __iomem *clksrc_base;