[U-Boot] [PATCH V2] ARM: fix s3c24x0 timer code

Andreas Bießmann andreas.devel at googlemail.com
Thu Dec 8 13:58:15 CET 2011


Dear David Müller,

Am 08.12.2011 13:23, schrieb David Müller:
> This patch fixes the s3c24x0 timer code to work with the ARM
> relocation feature.
> 
> Signed-off-by: David Mueller <d.mueller at elsoft.ch>
> 
> ---
>  arch/arm/cpu/arm920t/s3c24x0/timer.c |   40 +++++++++++++++------------------
>  arch/arm/include/asm/global_data.h   |    7 ++++++
>  2 files changed, 25 insertions(+), 22 deletions(-)
> 
> Changes for V2:
>  - rebase to master
> 

<snip>

> diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h
> index c3ff789..02420d8 100644
> --- a/arch/arm/include/asm/global_data.h
> +++ b/arch/arm/include/asm/global_data.h
> @@ -67,6 +67,13 @@ typedef	struct	global_data {
>  #ifdef CONFIG_IXP425
>  	unsigned long	timestamp;
>  #endif
> +#ifdef CONFIG_S3C24X0
> +	/* "static data" needed by s3c24x0 timer.c */
> +	unsigned long	timer_load_val;
> +	unsigned long	timer_clk;
> +	unsigned long	timestamp;
> +	unsigned long	lastdec;
> +#endif

I tend to NAK this. There are currently values defined ('#ifdef
CONFIG_ARM') which should work out for s3c24x0 timer too.
E.g. your 'lastdec' corresponds to the 'lastinc' there, timestamp could
be timer_reset_value (but maybe we should include the 'timestamp'
defined by CONFIG_IXP425 into the CONFIG_ARM?), timer_clk could be
timer_rate_hz ...
I guess the arm920t/at91 timer is not that much different to yours (by
means of logic), maybe have a look for that driver?

Albert, how do you think about this?

best regards

Andreas Bießmann


More information about the U-Boot mailing list