Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd8957a9 authored by Russell King's avatar Russell King
Browse files

Merge branch 'for-rmk/arch-timer-cleanups' of git://linux-arm.org/linux-mr into devel-stable

Please pull these arch_timer cleanups I've been holding onto for a while.
They're the same as my last posting [1], but have been rebased to v3.10-rc3.

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-May/170602.html
-- Mark Rutland
parents 3fbd55ec 3f71be23
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -80,15 +80,6 @@ static inline u32 arch_timer_get_cntfrq(void)
	return val;
}

static inline u64 arch_counter_get_cntpct(void)
{
	u64 cval;

	isb();
	asm volatile("mrrc p15, 0, %Q0, %R0, c14" : "=r" (cval));
	return cval;
}

static inline u64 arch_counter_get_cntvct(void)
{
	u64 cval;
+7 −0
Original line number Diff line number Diff line
@@ -153,6 +153,13 @@ THUMB( orr r7, #(1 << 30) ) @ HSCTLR.TE
	mrc	p15, 4, r7, c14, c1, 0	@ CNTHCTL
	orr	r7, r7, #3		@ PL1PCEN | PL1PCTEN
	mcr	p15, 4, r7, c14, c1, 0	@ CNTHCTL
	mov	r7, #0
	mcrr	p15, 4, r7, r7, c14	@ CNTVOFF

	@ Disable virtual timer in case it was counting
	mrc	p15, 0, r7, c14, c3, 1	@ CNTV_CTL
	bic	r7, #1			@ Clear ENABLE
	mcr	p15, 0, r7, c14, c3, 1	@ CNTV_CTL
1:
#endif

+4 −0
Original line number Diff line number Diff line
@@ -497,6 +497,10 @@ vcpu .req r0 @ vcpu pointer always in r0
	add	r5, vcpu, r4
	strd	r2, r3, [r5]

	@ Ensure host CNTVCT == CNTPCT
	mov	r2, #0
	mcrr	p15, 4, r2, r2, c14	@ CNTVOFF

1:
#endif
	@ Allow physical timer/counter access for the host
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ config SOC_EXYNOS5440
	default y
	depends on ARCH_EXYNOS5
	select ARCH_HAS_OPP
	select ARM_ARCH_TIMER
	select HAVE_ARM_ARCH_TIMER
	select AUTO_ZRELADDR
	select PINCTRL
	select PINCTRL_EXYNOS5440
+2 −2
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ config ARCH_R8A73A4
	select ARCH_WANT_OPTIONAL_GPIOLIB
	select ARM_GIC
	select CPU_V7
	select ARM_ARCH_TIMER
	select HAVE_ARM_ARCH_TIMER
	select SH_CLK_CPG
	select RENESAS_IRQC

@@ -56,7 +56,7 @@ config ARCH_R8A7790
	select ARCH_WANT_OPTIONAL_GPIOLIB
	select ARM_GIC
	select CPU_V7
	select ARM_ARCH_TIMER
	select HAVE_ARM_ARCH_TIMER
	select SH_CLK_CPG
	select RENESAS_IRQC

Loading