imx: move CONFIG_SYSCOUNTER_TIMER to Kconfig
Subsystems (3)
PATCH v2 1/3 imx: move CONFIG_SYSCOUNTER_TIMER to Kconfig
From: Stefan Agner <[email protected]>
---
Changes in v2: None
arch/arm/mach-imx/Kconfig | 3 +++ arch/arm/mach-imx/mx7/Kconfig | 1 + include/configs/mx7_common.h | 1 - scripts/config_whitelist.txt | 1 - 4 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/mach-imx/Kconfig +3 -0
@@ -7,6 +7,9 @@ config IMX_CONFIG config ROM_UNIFIED_SECTIONS bool +config SYSCOUNTER_TIMER + bool + config IMX_RDC bool "i.MX Resource domain controller driver" depends on ARCH_MX6 || ARCH_MX7
arch/arm/mach-imx/mx7/Kconfig +1 -0
@@ -3,6 +3,7 @@ if ARCH_MX7 config MX7 bool select ROM_UNIFIED_SECTIONS + select SYSCOUNTER_TIMER select CPU_V7_HAS_VIRT select CPU_V7_HAS_NONSEC select ARCH_SUPPORT_PSCI
include/configs/mx7_common.h +0 -1
@@ -19,7 +19,6 @@/* Timer settings */ #define CONFIG_MXC_GPT_HCLK -#define CONFIG_SYSCOUNTER_TIMER #define CONFIG_SC_TIMER_CLK 8000000/* 8Mhz */ #define COUNTER_FREQUENCY CONFIG_SC_TIMER_CLK#define CONFIG_SYS_FSL_CLK
scripts/config_whitelist.txt +0 -1
@@ -2219,7 +2219,6 @@ CONFIG_SUPPORT_RAW_INITRD CONFIG_SUPPORT_VFAT CONFIG_SUVD3 CONFIG_SXNI855T -CONFIG_SYSCOUNTER_TIMER CONFIG_SYSFLAGS_ADDR CONFIG_SYSFS CONFIG_SYSMGR_ISWGRP_HANDOFF
Signature · 1 line
2.15.1
PATCH v2 2/3 imx: introduce CONFIG_GPT_TIMER
From: Stefan Agner <[email protected]>
Introduce a new config symbol to select the i.MX
General Purpose Timer (GPT).
---
Changes in v2:
- Fix Kconfig for MX5
arch/arm/mach-imx/Kconfig | 3 +++ arch/arm/mach-imx/Makefile | 3 ++- arch/arm/mach-imx/mx5/Kconfig | 1 + arch/arm/mach-imx/mx6/Kconfig | 1 + 4 files changed, 7 insertions(+), 1 deletion(-)
arch/arm/mach-imx/Kconfig +3 -0
@@ -10,6 +10,9 @@ config ROM_UNIFIED_SECTIONS config SYSCOUNTER_TIMER bool +config GPT_TIMER + bool + config IMX_RDC bool "i.MX Resource domain controller driver" depends on ARCH_MX6 || ARCH_MX7
arch/arm/mach-imx/Makefile +2 -1
@@ -11,7 +11,8 @@ ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6 mx7 vf610)) obj-y = iomux-v3.o endif ifeq ($(SOC),$(filter $(SOC),mx5 mx6)) -obj-y += timer.o cpu.o speed.o +obj-y += cpu.o speed.o +obj-$(CONFIG_GPT_TIMER) += timer.o obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o endif ifeq ($(SOC),$(filter $(SOC),mx7 mx6 mxs))
arch/arm/mach-imx/mx5/Kconfig +1 -0
@@ -1,6 +1,7 @@ if ARCH_MX5 config MX5 + select GPT_TIMER bool default y
arch/arm/mach-imx/mx6/Kconfig +1 -0
@@ -9,6 +9,7 @@ config MX6_SMP config MX6 select ARM_ERRATA_743622 if !MX6UL && !MX6ULL + select GPT_TIMER bool default y imply CMD_FUSE
Signature · 1 line
2.15.1
PATCH v2 3/3 imx: initialize and use generic timer on i.MX 6UL/ULL
In reply to Stefan AgnerFrom: Stefan Agner <[email protected]>
The i.MX 6UL/ULL feature a Cortex-A7 CPU which suppor the ARM generic timer. This change makes use of the ARM generic timer in U-Boot.
This is crucial to make the ARM generic timers usable in Linux since timer_init() initalizes the system counter module, which is necessary to use the generic timers CP15 registers.
---
Changes in v2: None
arch/arm/include/asm/arch-mx6/imx-regs.h | 1 + arch/arm/mach-imx/Makefile | 2 +- arch/arm/mach-imx/mx6/Kconfig | 4 +++- include/configs/mx6_common.h | 5 ++++- 4 files changed, 9 insertions(+), 3 deletions(-)
arch/arm/include/asm/arch-mx6/imx-regs.h +1 -0
@@ -291,6 +291,7 @@#endif #define IP2APB_TZASC1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x50000)#if (defined(CONFIG_MX6UL ) || defined(CONFIG_MX6ULL )) +#define SCTR_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x5C000)#define QSPI0_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x60000)#define UART6_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x7C000)#elif defined(CONFIG_MX6SX )
arch/arm/mach-imx/Makefile +1 -1
@@ -22,7 +22,6 @@ endif ifeq ($(SOC),$(filter $(SOC),mx7)) obj-y += cpu.o obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o -obj-$(CONFIG_SYSCOUNTER_TIMER) += syscounter.o endif ifeq ($(SOC),$(filter $(SOC),mx6 mx7)) obj-y += cache.o init.o
@@ -31,6 +30,7 @@ obj-$(CONFIG_IMX_VIDEO_SKIP) += video.o obj-$(CONFIG_IMX_RDC) += rdc-sema.o obj-$(CONFIG_IMX_BOOTAUX) += imx_bootaux.o obj-$(CONFIG_SECURE_BOOT) += hab.o +obj-$(CONFIG_SYSCOUNTER_TIMER) += syscounter.o endif ifeq ($(SOC),$(filter $(SOC),mx7ulp)) obj-y += cache.o
arch/arm/mach-imx/mx6/Kconfig +3 -1
@@ -9,7 +9,7 @@ config MX6_SMP config MX6 select ARM_ERRATA_743622 if !MX6UL && !MX6ULL - select GPT_TIMER + select GPT_TIMER if !MX6UL && !MX6ULL bool default y imply CMD_FUSE
@@ -54,6 +54,7 @@ config MX6UL select HAS_CAAM select SYS_L2CACHE_OFF select ROM_UNIFIED_SECTIONS + select SYSCOUNTER_TIMER bool config MX6UL_LITESOM
@@ -76,6 +77,7 @@ config MX6UL_OPOS6UL config MX6ULL select SYS_L2CACHE_OFF select ROM_UNIFIED_SECTIONS + select SYSCOUNTER_TIMER bool config MX6_DDRCAL
include/configs/mx6_common.h +4 -1
@@ -7,7 +7,10 @@#ifndef __MX6_COMMON_H#define __MX6_COMMON_H -#if !(defined(CONFIG_MX6UL ) || defined(CONFIG_MX6ULL )) +#if (defined(CONFIG_MX6UL ) || defined(CONFIG_MX6ULL )) +#define CONFIG_SC_TIMER_CLK 8000000/* 8Mhz */ +#define COUNTER_FREQUENCY CONFIG_SC_TIMER_CLK +#else #ifndef CONFIG_SYS_L2CACHE_OFF #define CONFIG_SYS_L2_PL310 #define CONFIG_SYS_PL310_BASE L2_PL310_BASE
Signature · 1 line
2.15.1