Commit eccbf5fb authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

Merge branch 'clockevents/4.15' of...

Merge branch 'clockevents/4.15' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core

Pull clockevent updates from Daniel Lezcano:

 - Improve the generic clockevents dependency by factoring out the option
   in the Kconfig menu option (Arnd Bergmann)

 - Add missing "\n" in pr_err messages for fttmr010, owl and rockchip
   (Arvind Yadav)

 - Add missing timer_of_exit function to rollback timer_of_init (Benjamin
   Gaignard)

 - Fix path and add bindings to timers (Daniel Lezcano)

 - Cleanup and remove support for renesas,cmt-32* (Geert Uytterhoeven)

 - Add support for separate R-Car Gen2 (Magnus Damm)

 - Fix DEFINE_PER_CPU length definition to prevent warning at expansion
   time for the arm_arch_timer (Mark Rutland)

 - Remove pointless irq_save,restore in an already irq-disabled callback
   and add a shortcut optimization for the local cpu on mips-gic-timer
   (Matt Redfearn)
parents fb56d689 f48729a9
Loading
Loading
Loading
Loading
+12 −12
Original line number Original line Diff line number Diff line
@@ -20,16 +20,16 @@ Required Properties:
		(CMT1 on sh73a0 and r8a7740)
		(CMT1 on sh73a0 and r8a7740)
		This is a fallback for the above renesas,cmt-48-* entries.
		This is a fallback for the above renesas,cmt-48-* entries.


    - "renesas,cmt0-r8a73a4" for the 32-bit CMT0 device included in r8a73a4.
    - "renesas,r8a73a4-cmt0" for the 32-bit CMT0 device included in r8a73a4.
    - "renesas,cmt1-r8a73a4" for the 48-bit CMT1 device included in r8a73a4.
    - "renesas,r8a73a4-cmt1" for the 48-bit CMT1 device included in r8a73a4.
    - "renesas,cmt0-r8a7790" for the 32-bit CMT0 device included in r8a7790.
    - "renesas,r8a7790-cmt0" for the 32-bit CMT0 device included in r8a7790.
    - "renesas,cmt1-r8a7790" for the 48-bit CMT1 device included in r8a7790.
    - "renesas,r8a7790-cmt1" for the 48-bit CMT1 device included in r8a7790.
    - "renesas,cmt0-r8a7791" for the 32-bit CMT0 device included in r8a7791.
    - "renesas,r8a7791-cmt0" for the 32-bit CMT0 device included in r8a7791.
    - "renesas,cmt1-r8a7791" for the 48-bit CMT1 device included in r8a7791.
    - "renesas,r8a7791-cmt1" for the 48-bit CMT1 device included in r8a7791.
    - "renesas,cmt0-r8a7793" for the 32-bit CMT0 device included in r8a7793.
    - "renesas,r8a7793-cmt0" for the 32-bit CMT0 device included in r8a7793.
    - "renesas,cmt1-r8a7793" for the 48-bit CMT1 device included in r8a7793.
    - "renesas,r8a7793-cmt1" for the 48-bit CMT1 device included in r8a7793.
    - "renesas,cmt0-r8a7794" for the 32-bit CMT0 device included in r8a7794.
    - "renesas,r8a7794-cmt0" for the 32-bit CMT0 device included in r8a7794.
    - "renesas,cmt1-r8a7794" for the 48-bit CMT1 device included in r8a7794.
    - "renesas,r8a7794-cmt1" for the 48-bit CMT1 device included in r8a7794.


    - "renesas,rcar-gen2-cmt0" for 32-bit CMT0 devices included in R-Car Gen2.
    - "renesas,rcar-gen2-cmt0" for 32-bit CMT0 devices included in R-Car Gen2.
    - "renesas,rcar-gen2-cmt1" for 48-bit CMT1 devices included in R-Car Gen2.
    - "renesas,rcar-gen2-cmt1" for 48-bit CMT1 devices included in R-Car Gen2.
@@ -46,7 +46,7 @@ Required Properties:
Example: R8A7790 (R-Car H2) CMT0 and CMT1 nodes
Example: R8A7790 (R-Car H2) CMT0 and CMT1 nodes


	cmt0: timer@ffca0000 {
	cmt0: timer@ffca0000 {
		compatible = "renesas,cmt0-r8a7790", "renesas,rcar-gen2-cmt0";
		compatible = "renesas,r8a7790-cmt0", "renesas,rcar-gen2-cmt0";
		reg = <0 0xffca0000 0 0x1004>;
		reg = <0 0xffca0000 0 0x1004>;
		interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>,
		interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>,
			     <0 142 IRQ_TYPE_LEVEL_HIGH>;
			     <0 142 IRQ_TYPE_LEVEL_HIGH>;
@@ -55,7 +55,7 @@ Example: R8A7790 (R-Car H2) CMT0 and CMT1 nodes
	};
	};


	cmt1: timer@e6130000 {
	cmt1: timer@e6130000 {
		compatible = "renesas,cmt1-r8a7790", "renesas,rcar-gen2-cmt1";
		compatible = "renesas,r8a7790-cmt1", "renesas,rcar-gen2-cmt1";
		reg = <0 0xe6130000 0 0x1004>;
		reg = <0 0xe6130000 0 0x1004>;
		interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>,
		interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>,
			     <0 121 IRQ_TYPE_LEVEL_HIGH>,
			     <0 121 IRQ_TYPE_LEVEL_HIGH>,
+2 −1
Original line number Original line Diff line number Diff line
@@ -3444,7 +3444,8 @@ M: Thomas Gleixner <tglx@linutronix.de>
L:	linux-kernel@vger.kernel.org
L:	linux-kernel@vger.kernel.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
S:	Supported
S:	Supported
F:	drivers/clocksource
F:	drivers/clocksource/
F:	Documentation/devicetree/bindings/timer/


CMPC ACPI DRIVER
CMPC ACPI DRIVER
M:	Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
M:	Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
+9 −41
Original line number Original line Diff line number Diff line
menu "Clock Source drivers"
menu "Clock Source drivers"
	depends on !ARCH_USES_GETTIMEOFFSET
	depends on GENERIC_CLOCKEVENTS


config TIMER_OF
config TIMER_OF
	bool
	bool
	depends on GENERIC_CLOCKEVENTS
	select TIMER_PROBE
	select TIMER_PROBE


config TIMER_ACPI
config TIMER_ACPI
@@ -30,21 +29,18 @@ config CLKSRC_MMIO


config BCM2835_TIMER
config BCM2835_TIMER
	bool "BCM2835 timer driver" if COMPILE_TEST
	bool "BCM2835 timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	help
	help
	  Enables the support for the BCM2835 timer driver.
	  Enables the support for the BCM2835 timer driver.


config BCM_KONA_TIMER
config BCM_KONA_TIMER
	bool "BCM mobile timer driver" if COMPILE_TEST
	bool "BCM mobile timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	help
	help
	  Enables the support for the BCM Kona mobile timer driver.
	  Enables the support for the BCM Kona mobile timer driver.


config DIGICOLOR_TIMER
config DIGICOLOR_TIMER
	bool "Digicolor timer driver" if COMPILE_TEST
	bool "Digicolor timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	depends on HAS_IOMEM
	depends on HAS_IOMEM
	help
	help
@@ -52,7 +48,6 @@ config DIGICOLOR_TIMER


config DW_APB_TIMER
config DW_APB_TIMER
	bool "DW APB timer driver" if COMPILE_TEST
	bool "DW APB timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	help
	help
	  Enables the support for the dw_apb timer.
	  Enables the support for the dw_apb timer.


@@ -63,7 +58,6 @@ config DW_APB_TIMER_OF


config FTTMR010_TIMER
config FTTMR010_TIMER
	bool "Faraday Technology timer driver" if COMPILE_TEST
	bool "Faraday Technology timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	depends on HAS_IOMEM
	depends on HAS_IOMEM
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	select TIMER_OF
	select TIMER_OF
@@ -90,7 +84,6 @@ config ARMADA_370_XP_TIMER


config MESON6_TIMER
config MESON6_TIMER
	bool "Meson6 timer driver" if COMPILE_TEST
	bool "Meson6 timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	help
	help
	  Enables the support for the Meson6 timer driver.
	  Enables the support for the Meson6 timer driver.
@@ -105,14 +98,12 @@ config ORION_TIMER


config OWL_TIMER
config OWL_TIMER
	bool "Owl timer driver" if COMPILE_TEST
	bool "Owl timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	help
	help
	  Enables the support for the Actions Semi Owl timer driver.
	  Enables the support for the Actions Semi Owl timer driver.


config SUN4I_TIMER
config SUN4I_TIMER
	bool "Sun4i timer driver" if COMPILE_TEST
	bool "Sun4i timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	depends on HAS_IOMEM
	depends on HAS_IOMEM
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	select TIMER_OF
	select TIMER_OF
@@ -135,7 +126,6 @@ config TEGRA_TIMER


config VT8500_TIMER
config VT8500_TIMER
	bool "VT8500 timer driver" if COMPILE_TEST
	bool "VT8500 timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	depends on HAS_IOMEM
	depends on HAS_IOMEM
	help
	help
	  Enables support for the VT8500 driver.
	  Enables support for the VT8500 driver.
@@ -148,7 +138,6 @@ config CADENCE_TTC_TIMER


config ASM9260_TIMER
config ASM9260_TIMER
	bool "ASM9260 timer driver" if COMPILE_TEST
	bool "ASM9260 timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	select TIMER_OF
	select TIMER_OF
	help
	help
@@ -171,28 +160,24 @@ config CLKSRC_NOMADIK_MTU_SCHED_CLOCK


config CLKSRC_DBX500_PRCMU
config CLKSRC_DBX500_PRCMU
	bool "Clocksource PRCMU Timer" if COMPILE_TEST
	bool "Clocksource PRCMU Timer" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	depends on HAS_IOMEM
	depends on HAS_IOMEM
	help
	help
	  Use the always on PRCMU Timer as clocksource
	  Use the always on PRCMU Timer as clocksource


config CLPS711X_TIMER
config CLPS711X_TIMER
	bool "Cirrus logic timer driver" if COMPILE_TEST
	bool "Cirrus logic timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	help
	help
	  Enables support for the Cirrus Logic PS711 timer.
	  Enables support for the Cirrus Logic PS711 timer.


config ATLAS7_TIMER
config ATLAS7_TIMER
	bool "Atlas7 timer driver" if COMPILE_TEST
	bool "Atlas7 timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	help
	help
	  Enables support for the Atlas7 timer.
	  Enables support for the Atlas7 timer.


config MXS_TIMER
config MXS_TIMER
	bool "Mxs timer driver" if COMPILE_TEST
	bool "Mxs timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	select STMP_DEVICE
	select STMP_DEVICE
	help
	help
@@ -200,14 +185,12 @@ config MXS_TIMER


config PRIMA2_TIMER
config PRIMA2_TIMER
	bool "Prima2 timer driver" if COMPILE_TEST
	bool "Prima2 timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	help
	help
	  Enables support for the Prima2 timer.
	  Enables support for the Prima2 timer.


config U300_TIMER
config U300_TIMER
	bool "U300 timer driver" if COMPILE_TEST
	bool "U300 timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	depends on ARM
	depends on ARM
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	help
	help
@@ -215,14 +198,12 @@ config U300_TIMER


config NSPIRE_TIMER
config NSPIRE_TIMER
	bool "NSpire timer driver" if COMPILE_TEST
	bool "NSpire timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	help
	help
	  Enables support for the Nspire timer.
	  Enables support for the Nspire timer.


config KEYSTONE_TIMER
config KEYSTONE_TIMER
	bool "Keystone timer driver" if COMPILE_TEST
	bool "Keystone timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	depends on ARM || ARM64
	depends on ARM || ARM64
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	help
	help
@@ -230,7 +211,6 @@ config KEYSTONE_TIMER


config INTEGRATOR_AP_TIMER
config INTEGRATOR_AP_TIMER
	bool "Integrator-ap timer driver" if COMPILE_TEST
	bool "Integrator-ap timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	help
	help
	  Enables support for the Integrator-ap timer.
	  Enables support for the Integrator-ap timer.
@@ -253,7 +233,7 @@ config CLKSRC_EFM32


config CLKSRC_LPC32XX
config CLKSRC_LPC32XX
	bool "Clocksource for LPC32XX" if COMPILE_TEST
	bool "Clocksource for LPC32XX" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS && HAS_IOMEM
	depends on HAS_IOMEM
	depends on ARM
	depends on ARM
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	select TIMER_OF
	select TIMER_OF
@@ -262,7 +242,7 @@ config CLKSRC_LPC32XX


config CLKSRC_PISTACHIO
config CLKSRC_PISTACHIO
	bool "Clocksource for Pistachio SoC" if COMPILE_TEST
	bool "Clocksource for Pistachio SoC" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS && HAS_IOMEM
	depends on HAS_IOMEM
	select TIMER_OF
	select TIMER_OF
	help
	help
	  Enables the clocksource for the Pistachio SoC.
	  Enables the clocksource for the Pistachio SoC.
@@ -298,7 +278,6 @@ config CLKSRC_MPS2


config ARC_TIMERS
config ARC_TIMERS
	bool "Support for 32-bit TIMERn counters in ARC Cores" if COMPILE_TEST
	bool "Support for 32-bit TIMERn counters in ARC Cores" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	select TIMER_OF
	select TIMER_OF
	help
	help
	  These are legacy 32-bit TIMER0 and TIMER1 counters found on all ARC cores
	  These are legacy 32-bit TIMER0 and TIMER1 counters found on all ARC cores
@@ -307,7 +286,6 @@ config ARC_TIMERS


config ARC_TIMERS_64BIT
config ARC_TIMERS_64BIT
	bool "Support for 64-bit counters in ARC HS38 cores" if COMPILE_TEST
	bool "Support for 64-bit counters in ARC HS38 cores" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	depends on ARC_TIMERS
	depends on ARC_TIMERS
	select TIMER_OF
	select TIMER_OF
	help
	help
@@ -407,7 +385,6 @@ config ATMEL_PIT


config ATMEL_ST
config ATMEL_ST
	bool "Atmel ST timer support" if COMPILE_TEST
	bool "Atmel ST timer support" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	select TIMER_OF
	select TIMER_OF
	select MFD_SYSCON
	select MFD_SYSCON
	help
	help
@@ -426,7 +403,6 @@ config CLKSRC_EXYNOS_MCT


config CLKSRC_SAMSUNG_PWM
config CLKSRC_SAMSUNG_PWM
	bool "PWM timer driver for Samsung S3C, S5P" if COMPILE_TEST
	bool "PWM timer driver for Samsung S3C, S5P" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	depends on HAS_IOMEM
	depends on HAS_IOMEM
	help
	help
	  This is a new clocksource driver for the PWM timer found in
	  This is a new clocksource driver for the PWM timer found in
@@ -436,7 +412,6 @@ config CLKSRC_SAMSUNG_PWM


config FSL_FTM_TIMER
config FSL_FTM_TIMER
	bool "Freescale FlexTimer Module driver" if COMPILE_TEST
	bool "Freescale FlexTimer Module driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	depends on HAS_IOMEM
	depends on HAS_IOMEM
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	help
	help
@@ -450,7 +425,6 @@ config VF_PIT_TIMER


config OXNAS_RPS_TIMER
config OXNAS_RPS_TIMER
	bool "Oxford Semiconductor OXNAS RPS Timers driver" if COMPILE_TEST
	bool "Oxford Semiconductor OXNAS RPS Timers driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	select TIMER_OF
	select TIMER_OF
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	help
	help
@@ -461,7 +435,7 @@ config SYS_SUPPORTS_SH_CMT


config MTK_TIMER
config MTK_TIMER
	bool "Mediatek timer driver" if COMPILE_TEST
	bool "Mediatek timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS && HAS_IOMEM
	depends on HAS_IOMEM
	select TIMER_OF
	select TIMER_OF
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	help
	help
@@ -479,7 +453,6 @@ config SYS_SUPPORTS_EM_STI
config CLKSRC_JCORE_PIT
config CLKSRC_JCORE_PIT
	bool "J-Core PIT timer driver" if COMPILE_TEST
	bool "J-Core PIT timer driver" if COMPILE_TEST
	depends on OF
	depends on OF
	depends on GENERIC_CLOCKEVENTS
	depends on HAS_IOMEM
	depends on HAS_IOMEM
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	help
	help
@@ -488,7 +461,6 @@ config CLKSRC_JCORE_PIT


config SH_TIMER_CMT
config SH_TIMER_CMT
	bool "Renesas CMT timer driver" if COMPILE_TEST
	bool "Renesas CMT timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	depends on HAS_IOMEM
	depends on HAS_IOMEM
	default SYS_SUPPORTS_SH_CMT
	default SYS_SUPPORTS_SH_CMT
	help
	help
@@ -498,7 +470,6 @@ config SH_TIMER_CMT


config SH_TIMER_MTU2
config SH_TIMER_MTU2
	bool "Renesas MTU2 timer driver" if COMPILE_TEST
	bool "Renesas MTU2 timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	depends on HAS_IOMEM
	depends on HAS_IOMEM
	default SYS_SUPPORTS_SH_MTU2
	default SYS_SUPPORTS_SH_MTU2
	help
	help
@@ -508,14 +479,12 @@ config SH_TIMER_MTU2


config RENESAS_OSTM
config RENESAS_OSTM
	bool "Renesas OSTM timer driver" if COMPILE_TEST
	bool "Renesas OSTM timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	help
	help
	  Enables the support for the Renesas OSTM.
	  Enables the support for the Renesas OSTM.


config SH_TIMER_TMU
config SH_TIMER_TMU
	bool "Renesas TMU timer driver" if COMPILE_TEST
	bool "Renesas TMU timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	depends on HAS_IOMEM
	depends on HAS_IOMEM
	default SYS_SUPPORTS_SH_TMU
	default SYS_SUPPORTS_SH_TMU
	help
	help
@@ -525,7 +494,7 @@ config SH_TIMER_TMU


config EM_TIMER_STI
config EM_TIMER_STI
	bool "Renesas STI timer driver" if COMPILE_TEST
	bool "Renesas STI timer driver" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS && HAS_IOMEM
	depends on HAS_IOMEM
	default SYS_SUPPORTS_EM_STI
	default SYS_SUPPORTS_EM_STI
	help
	help
	  This enables build of a clocksource and clockevent driver for
	  This enables build of a clocksource and clockevent driver for
@@ -566,7 +535,6 @@ config CLKSRC_TANGO_XTAL


config CLKSRC_PXA
config CLKSRC_PXA
	bool "Clocksource for PXA or SA-11x0 platform" if COMPILE_TEST
	bool "Clocksource for PXA or SA-11x0 platform" if COMPILE_TEST
	depends on GENERIC_CLOCKEVENTS
	depends on HAS_IOMEM
	depends on HAS_IOMEM
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	help
	help
@@ -575,20 +543,20 @@ config CLKSRC_PXA


config H8300_TMR8
config H8300_TMR8
        bool "Clockevent timer for the H8300 platform" if COMPILE_TEST
        bool "Clockevent timer for the H8300 platform" if COMPILE_TEST
        depends on GENERIC_CLOCKEVENTS && HAS_IOMEM
        depends on HAS_IOMEM
	help
	help
	  This enables the 8 bits timer for the H8300 platform.
	  This enables the 8 bits timer for the H8300 platform.


config H8300_TMR16
config H8300_TMR16
        bool "Clockevent timer for the H83069 platform" if COMPILE_TEST
        bool "Clockevent timer for the H83069 platform" if COMPILE_TEST
        depends on GENERIC_CLOCKEVENTS && HAS_IOMEM
        depends on HAS_IOMEM
	help
	help
	  This enables the 16 bits timer for the H8300 platform with the
	  This enables the 16 bits timer for the H8300 platform with the
	  H83069 cpu.
	  H83069 cpu.


config H8300_TPU
config H8300_TPU
        bool "Clocksource for the H8300 platform" if COMPILE_TEST
        bool "Clocksource for the H8300 platform" if COMPILE_TEST
        depends on GENERIC_CLOCKEVENTS && HAS_IOMEM
        depends on HAS_IOMEM
	help
	help
	  This enables the clocksource for the H8300 platform with the
	  This enables the clocksource for the H8300 platform with the
	  H8S2678 cpu.
	  H8S2678 cpu.
@@ -600,7 +568,7 @@ config CLKSRC_IMX_GPT


config CLKSRC_IMX_TPM
config CLKSRC_IMX_TPM
	bool "Clocksource using i.MX TPM" if COMPILE_TEST
	bool "Clocksource using i.MX TPM" if COMPILE_TEST
	depends on ARM && CLKDEV_LOOKUP && GENERIC_CLOCKEVENTS
	depends on ARM && CLKDEV_LOOKUP
	select CLKSRC_MMIO
	select CLKSRC_MMIO
	help
	help
	  Enable this option to use IMX Timer/PWM Module (TPM) timer as
	  Enable this option to use IMX Timer/PWM Module (TPM) timer as
+22 −19
Original line number Original line Diff line number Diff line
@@ -299,8 +299,7 @@ static u64 notrace arm64_858921_read_cntvct_el0(void)
#endif
#endif


#ifdef CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND
#ifdef CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND
DEFINE_PER_CPU(const struct arch_timer_erratum_workaround *,
DEFINE_PER_CPU(const struct arch_timer_erratum_workaround *, timer_unstable_counter_workaround);
	       timer_unstable_counter_workaround);
EXPORT_SYMBOL_GPL(timer_unstable_counter_workaround);
EXPORT_SYMBOL_GPL(timer_unstable_counter_workaround);


DEFINE_STATIC_KEY_FALSE(arch_timer_read_ool_enabled);
DEFINE_STATIC_KEY_FALSE(arch_timer_read_ool_enabled);
@@ -1268,10 +1267,6 @@ arch_timer_mem_find_best_frame(struct arch_timer_mem *timer_mem)


	iounmap(cntctlbase);
	iounmap(cntctlbase);


	if (!best_frame)
		pr_err("Unable to find a suitable frame in timer @ %pa\n",
			&timer_mem->cntctlbase);

	return best_frame;
	return best_frame;
}
}


@@ -1372,6 +1367,8 @@ static int __init arch_timer_mem_of_init(struct device_node *np)


	frame = arch_timer_mem_find_best_frame(timer_mem);
	frame = arch_timer_mem_find_best_frame(timer_mem);
	if (!frame) {
	if (!frame) {
		pr_err("Unable to find a suitable frame in timer @ %pa\n",
			&timer_mem->cntctlbase);
		ret = -EINVAL;
		ret = -EINVAL;
		goto out;
		goto out;
	}
	}
@@ -1420,7 +1417,7 @@ arch_timer_mem_verify_cntfrq(struct arch_timer_mem *timer_mem)
static int __init arch_timer_mem_acpi_init(int platform_timer_count)
static int __init arch_timer_mem_acpi_init(int platform_timer_count)
{
{
	struct arch_timer_mem *timers, *timer;
	struct arch_timer_mem *timers, *timer;
	struct arch_timer_mem_frame *frame;
	struct arch_timer_mem_frame *frame, *best_frame = NULL;
	int timer_count, i, ret = 0;
	int timer_count, i, ret = 0;


	timers = kcalloc(platform_timer_count, sizeof(*timers),
	timers = kcalloc(platform_timer_count, sizeof(*timers),
@@ -1432,14 +1429,6 @@ static int __init arch_timer_mem_acpi_init(int platform_timer_count)
	if (ret || !timer_count)
	if (ret || !timer_count)
		goto out;
		goto out;


	for (i = 0; i < timer_count; i++) {
		ret = arch_timer_mem_verify_cntfrq(&timers[i]);
		if (ret) {
			pr_err("Disabling MMIO timers due to CNTFRQ mismatch\n");
			goto out;
		}
	}

	/*
	/*
	 * While unlikely, it's theoretically possible that none of the frames
	 * While unlikely, it's theoretically possible that none of the frames
	 * in a timer expose the combination of feature we want.
	 * in a timer expose the combination of feature we want.
@@ -1448,12 +1437,26 @@ static int __init arch_timer_mem_acpi_init(int platform_timer_count)
		timer = &timers[i];
		timer = &timers[i];


		frame = arch_timer_mem_find_best_frame(timer);
		frame = arch_timer_mem_find_best_frame(timer);
		if (frame)
		if (!best_frame)
			break;
			best_frame = frame;

		ret = arch_timer_mem_verify_cntfrq(timer);
		if (ret) {
			pr_err("Disabling MMIO timers due to CNTFRQ mismatch\n");
			goto out;
		}
		}


	if (frame)
		if (!best_frame) /* implies !frame */
		ret = arch_timer_mem_frame_register(frame);
			/*
			 * Only complain about missing suitable frames if we
			 * haven't already found one in a previous iteration.
			 */
			pr_err("Unable to find a suitable frame in timer @ %pa\n",
				&timer->cntctlbase);
	}

	if (best_frame)
		ret = arch_timer_mem_frame_register(best_frame);
out:
out:
	kfree(timers);
	kfree(timers);
	return ret;
	return ret;
+7 −5
Original line number Original line Diff line number Diff line
@@ -39,16 +39,18 @@ static u64 notrace gic_read_count(void)


static int gic_next_event(unsigned long delta, struct clock_event_device *evt)
static int gic_next_event(unsigned long delta, struct clock_event_device *evt)
{
{
	unsigned long flags;
	int cpu = cpumask_first(evt->cpumask);
	u64 cnt;
	u64 cnt;
	int res;
	int res;


	cnt = gic_read_count();
	cnt = gic_read_count();
	cnt += (u64)delta;
	cnt += (u64)delta;
	local_irq_save(flags);
	if (cpu == raw_smp_processor_id()) {
	write_gic_vl_other(mips_cm_vp_id(cpumask_first(evt->cpumask)));
		write_gic_vl_compare(cnt);
	} else {
		write_gic_vl_other(mips_cm_vp_id(cpu));
		write_gic_vo_compare(cnt);
		write_gic_vo_compare(cnt);
	local_irq_restore(flags);
	}
	res = ((int)(gic_read_count() - cnt) >= 0) ? -ETIME : 0;
	res = ((int)(gic_read_count() - cnt) >= 0) ? -ETIME : 0;
	return res;
	return res;
}
}
Loading