diff options
author | Ye.Li <B37916@freescale.com> | 2015-02-01 23:08:16 +0800 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2016-03-09 14:42:08 +0100 |
commit | 9bed92b75d7f2330c16ee75d41b70ad4a089b351 (patch) | |
tree | 85e28f33220087f3c0a2a9a1b697a7f316dd233e /arch/arm/include | |
parent | 7dc005c14c660534a3a5eadd418df5e3de9ffc6c (diff) |
MLK-10176-7 imx: mx7: add system counter support
Generic timer is added to mx7d, so add support for this.
In uboot, only system counter is needed, the timer events are not needed.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 514a79581c6a46df445d69f1fcb2b3bff9584162)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/arch-mx7/timer.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-mx7/timer.h b/arch/arm/include/asm/arch-mx7/timer.h new file mode 100644 index 00000000000..0bb2ebe5824 --- /dev/null +++ b/arch/arm/include/asm/arch-mx7/timer.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2014-2015 Freescale Semiconductor, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef _ASM_ARCH_MX7_TIMER_H +#define _ASM_ARCH_MX7_TIMER_H + +/* System Counter */ +struct sctr_regs { + u32 cntcr; + u32 cntsr; + u32 cntcv1; + u32 cntcv2; + u32 resv1[4]; + u32 cntfid0; + u32 cntfid1; + u32 cntfid2; + u32 resv2[1001]; + u32 counterid[1]; +}; + +#define SC_CNTCR_ENABLE (1 << 0) +#define SC_CNTCR_HDBG (1 << 1) +#define SC_CNTCR_FREQ0 (1 << 8) +#define SC_CNTCR_FREQ1 (1 << 9) + +#endif |