summaryrefslogtreecommitdiff
path: root/cpu/mpc824x
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-03-31 18:32:53 +0200
committerWolfgang Denk <wd@pollux.denx.de>2006-03-31 18:32:53 +0200
commitd87080b721e4f8dca977af7571c5338ae7bb8db7 (patch)
tree514fc21eec39a2dd57f7aea516844a4400f8f140 /cpu/mpc824x
parentf6dbbe986481cff01334c64cacb971a5f237a9a9 (diff)
downloadu-boot-imx-d87080b721e4f8dca977af7571c5338ae7bb8db7.zip
u-boot-imx-d87080b721e4f8dca977af7571c5338ae7bb8db7.tar.gz
u-boot-imx-d87080b721e4f8dca977af7571c5338ae7bb8db7.tar.bz2
GCC-4.x fixes: clean up global data pointer initialization for all boards.
Diffstat (limited to 'cpu/mpc824x')
-rw-r--r--cpu/mpc824x/cpu.c4
-rw-r--r--cpu/mpc824x/speed.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/cpu/mpc824x/cpu.c b/cpu/mpc824x/cpu.c
index 312dfe2..0a45cc8 100644
--- a/cpu/mpc824x/cpu.c
+++ b/cpu/mpc824x/cpu.c
@@ -26,10 +26,10 @@
#include <common.h>
#include <command.h>
+DECLARE_GLOBAL_DATA_PTR;
+
int checkcpu (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
unsigned int pvr = get_pvr ();
unsigned int version = pvr >> 16;
unsigned char revision;
diff --git a/cpu/mpc824x/speed.c b/cpu/mpc824x/speed.c
index a37a087..fdcb972 100644
--- a/cpu/mpc824x/speed.c
+++ b/cpu/mpc824x/speed.c
@@ -29,6 +29,8 @@
#include <mpc824x.h>
#include <asm/processor.h>
+DECLARE_GLOBAL_DATA_PTR;
+
/* ------------------------------------------------------------------------- */
/* NOTE: This describes the proper use of this file.
*
@@ -107,8 +109,6 @@ short pllratio_to_factor[] = {
/* compute the CPU and memory bus clock frequencies */
int get_clocks (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
uint hid1 = mfspr(HID1);
hid1 = (hid1 >> (32-5)) & 0x1f;
gd->cpu_clk = (pllratio_to_factor[hid1] * get_bus_freq(0) + 5)