From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] OMAP-common/timer: Fix bss usage
Date: Mon, 29 Nov 2010 18:25:31 +0100 [thread overview]
Message-ID: <4CF3E20B.1090705@denx.de> (raw)
In-Reply-To: <1291046912-15167-1-git-send-email-weber@corscience.de>
Hello Thomas,
Thomas Weber wrote:
> This patch fixes the bss usage in ARMv7/omap-common/timer.c
>
> The .bss section cannot be used before the relocation, because this
> section is overlayed with .rel.dyn section.
>
> Suggested-by: Andreas Biessmann <andreas.devel@gmail.com>
> Signed-off-by: Thomas Weber <weber@corscience.de>
> ---
> arch/arm/cpu/armv7/omap-common/timer.c | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/omap-common/timer.c b/arch/arm/cpu/armv7/omap-common/timer.c
> index 6b8cf7b..b649b93 100644
> --- a/arch/arm/cpu/armv7/omap-common/timer.c
> +++ b/arch/arm/cpu/armv7/omap-common/timer.c
> @@ -35,8 +35,8 @@
> #include <common.h>
> #include <asm/io.h>
>
> -static ulong timestamp;
> -static ulong lastinc;
> +static ulong timestamp = 0;
> +static ulong lastinc = 0;
> static struct gptimer *timer_base = (struct gptimer *)CONFIG_SYS_TIMERBASE;
>
> /*
> @@ -54,8 +54,6 @@ int timer_init(void)
> writel((CONFIG_SYS_PTV << 2) | TCLR_PRE | TCLR_AR | TCLR_ST,
> &timer_base->tclr);
>
> - reset_timer_masked(); /* init the timestamp and lastinc value */
> -
> return 0;
> }
Is this Ok? In actual reset_timer_masked() lastinc gets initialized with:
lastinc = readl(&timer_base->tcrr) / (TIMER_CLOCK / CONFIG_SYS_HZ);
and your patch changes that to lastinc = 0 ...
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2010-11-29 17:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-29 12:48 [U-Boot] v2010-rc2: OMAP3 broken Wolfgang Denk
2010-11-29 13:19 ` Hiremath, Vaibhav
2010-11-29 13:23 ` Hiremath, Vaibhav
2010-11-29 14:42 ` Albert ARIBAUD
2010-11-29 15:04 ` Heiko Schocher
2010-11-29 15:13 ` Andreas Bießmann
2010-11-29 17:22 ` Heiko Schocher
2010-11-29 15:19 ` Albert ARIBAUD
2010-11-29 15:32 ` Andreas Bießmann
2010-11-29 17:22 ` Heiko Schocher
2010-11-29 15:23 ` Premi, Sanjeev
2010-11-29 14:48 ` Andreas Bießmann
2010-11-29 16:08 ` [U-Boot] [PATCH] OMAP-common/timer: Fix bss usage Thomas Weber
2010-11-29 17:25 ` Heiko Schocher [this message]
2010-11-29 17:55 ` Thomas Weber
2010-11-29 19:40 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CF3E20B.1090705@denx.de \
--to=hs@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.