summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/armv7/mx5
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2011-01-21 21:16:15 +0100
committerAlbert Aribaud <albert.aribaud@free.fr>2011-02-02 00:54:43 +0100
commitdb106ef7ebf671b9ae15cfacbccdd485437440b0 (patch)
tree9c10e29967c56fb85c7859c6a056c647f3a73162 /arch/arm/cpu/armv7/mx5
parenteae4988b45e17054f27d58b6fe0b42e080951382 (diff)
downloadblackbird-obmc-uboot-db106ef7ebf671b9ae15cfacbccdd485437440b0.tar.gz
blackbird-obmc-uboot-db106ef7ebf671b9ae15cfacbccdd485437440b0.zip
MX5: Reuse the gd->tbl value for timestamp and add gd->lastinc for lastinc bss
The usage of bss values in drivers before initialisation of bss is forbidden. In that special case some data in .rel.dyn gets corrupted. This patch is the same as recently applied for arm926js architecture. Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'arch/arm/cpu/armv7/mx5')
-rw-r--r--arch/arm/cpu/armv7/mx5/timer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv7/mx5/timer.c b/arch/arm/cpu/armv7/mx5/timer.c
index 3044fcf1e9..1972f6437d 100644
--- a/arch/arm/cpu/armv7/mx5/timer.c
+++ b/arch/arm/cpu/armv7/mx5/timer.c
@@ -44,8 +44,10 @@ static struct mxc_gpt *cur_gpt = (struct mxc_gpt *)GPT1_BASE_ADDR;
#define GPTCR_CLKSOURCE_32 (4<<6) /* Clock source */
#define GPTCR_TEN (1) /* Timer enable */
-static ulong timestamp;
-static ulong lastinc;
+DECLARE_GLOBAL_DATA_PTR;
+
+#define timestamp (gd->tbl)
+#define lastinc (gd->lastinc)
int timer_init(void)
{
OpenPOWER on IntegriCloud