[PATCH 2/2] Make clock shift and mask configurable based on the processor type.

Sascha Hauer s.hauer at pengutronix.de
Mon Jan 2 06:31:37 EST 2012


On Thu, Dec 29, 2011 at 11:13:31AM +0000, Renaud Barbier wrote:
> 
> Signed-off-by: Renaud Barbier <renaud.barbier at ge.com>
> ---
>  arch/ppc/lib/time.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/ppc/lib/time.c b/arch/ppc/lib/time.c
> index 04c71df..accc548 100644
> --- a/arch/ppc/lib/time.c
> +++ b/arch/ppc/lib/time.c
> @@ -55,9 +55,9 @@ uint64_t ppc_clocksource_read(void)
>  }
>  
>  static struct clocksource cs = {
> -	.read	= ppc_clocksource_read,
> -	.mask	= CLOCKSOURCE_MASK(32),
> -	.shift	= 15,
> +	.read = ppc_clocksource_read,
> +	.mask = CLOCKSOURCE_MASK(CONFIG_CLOCKSOURCE_MASK),
> +	.shift = CONFIG_CLOCKSOURCE_SHIFT,

We have clocks_calc_mult_shift to calculate both mult and shift. This
is currently unused, but it might be the moment to start using it.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list