[PATCH] Use MMIO clocksource for 32kHz counter

Tony Lindgren tony at atomide.com
Mon Jun 27 08:37:55 EDT 2011


* Russell King - ARM Linux <linux at arm.linux.org.uk> [110627 05:28]:
> --- a/arch/arm/plat-omap/counter_32k.c
> +++ b/arch/arm/plat-omap/counter_32k.c
> +#ifdef CONFIG_ARCH_OMAP16XX
> +		else if (cpu_is_omap16xx())
> +			base = OMAP2_L4_IO_ADDRESS(OMAP16XX_TIMER_32K_SYNCHRONIZED);
> +#endif
> +#ifdef CONFIG_SOC_OMAP2420
>  		else if (cpu_is_omap2420())
> -			clocksource_32k.read = omap2420_32k_read;
> +			base = OMAP2_L4_IO_ADDRESS(OMAP2420_32KSYNCT_BASE + 0x10);
> +#endif
> +#ifdef CONFIG_SOC_OMAP2430
>  		else if (cpu_is_omap2430())
> -			clocksource_32k.read = omap2430_32k_read;
> +			base = OMAP2_L4_IO_ADDRESS(OMAP2430_32KSYNCT_BASE + 0x10);
> +#endif
> +#ifdef CONFIG_ARCH_OMAP3
>  		else if (cpu_is_omap34xx())
> -			clocksource_32k.read = omap34xx_32k_read;
> +			base = OMAP2_L4_IO_ADDRESS(OMAP3430_32KSYNCT_BASE + 0x10);
> +#endif
> +#ifdef CONFIG_ARCH_OMAP4
>  		else if (cpu_is_omap44xx())
> -			clocksource_32k.read = omap44xx_32k_read;
> +			base = OMAP2_L4_IO_ADDRESS(OMAP4430_32KSYNCT_BASE + 0x10);
> +#endif
>  		else
>  			return -ENODEV;
>  

You should be able to replace the above with just ioremap as we now
have the static mappings.

Tony



More information about the linux-arm-kernel mailing list