[PATCH v2] arm: Configure reference clock for Versatile Express timers

Russell King - ARM Linux linux at arm.linux.org.uk
Mon Jan 24 09:47:53 EST 2011


On Tue, Jan 18, 2011 at 06:04:43PM +0000, Pawel Moll wrote:
>  static void __init v2m_timer_init(void)
>  {
> +	u32 scctrl;
> +
>  	versatile_sched_clock_init(MMIO_P2V(V2M_SYS_24MHZ), 24000000);
>  
> -	writel(0, MMIO_P2V(V2M_TIMER0) + TIMER_CTRL);
> -	writel(0, MMIO_P2V(V2M_TIMER1) + TIMER_CTRL);
> +	/* Select 1MHz TIMCLK as the reference clock for SP804 timers */
> +	scctrl = readl(MMIO_P2V(V2M_SYSCTL + SCCTRL));
> +	scctrl |= SCCTRL_TIMEREN0SEL_TIMCLK;
> +	scctrl |= SCCTRL_TIMEREN1SEL_TIMCLK;
> +	writel(scctrl, MMIO_P2V(V2M_SYSCTL + SCCTRL));

BTW, why are you removing the initialization of TIMER_CTRL ?  You don't
describe why you do this in the commit log so I suspect it's a mistake.



More information about the linux-arm-kernel mailing list