From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Mon, 19 Dec 2011 09:54:28 +0100 Subject: [U-Boot] [PATCH V2] ARM: fix s3c24x0 timer code In-Reply-To: <4EE0B467.5070806@gmail.com> References: <4CB2F602.30103@elsoft.ch> <1323347003-7711-1-git-send-email-d.mueller@elsoft.ch> <4EE0B467.5070806@gmail.com> Message-ID: <4EEEFBC4.1020409@aribaud.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Andreas, Le 08/12/2011 13:58, Andreas Bie?mann a ?crit : > 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 >> >> --- >> 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 >> > > > >> 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? Sorry for being late. Yes, I would tend to favor as common a timer code as possible. > best regards > > Andreas Bie?mann Amicalement, -- Albert.