summaryrefslogtreecommitdiff
path: root/cpu/mpc83xx
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2006-04-20 12:25:10 -0500
committerKumar Gala <galak@kernel.crashing.org>2006-04-20 12:25:10 -0500
commitb86d7622b33892b1dafe761a7a9eaeeab9f3816b (patch)
tree56b1b6fc978166abce4afa8e9dee0af94bfc3cd6 /cpu/mpc83xx
parentf8edca2e9a128f526b1fe6f997f7adb852cf5b3c (diff)
parent56a4a63c106cc317fc0fe42686a99416fc469f5b (diff)
downloadu-boot-imx-b86d7622b33892b1dafe761a7a9eaeeab9f3816b.zip
u-boot-imx-b86d7622b33892b1dafe761a7a9eaeeab9f3816b.tar.gz
u-boot-imx-b86d7622b33892b1dafe761a7a9eaeeab9f3816b.tar.bz2
Merge branch 'master' of rsync://rsync.denx.de/git/u-boot
Diffstat (limited to 'cpu/mpc83xx')
-rw-r--r--cpu/mpc83xx/cpu.c7
-rw-r--r--cpu/mpc83xx/cpu_init.c4
-rw-r--r--cpu/mpc83xx/interrupts.c4
-rw-r--r--cpu/mpc83xx/spd_sdram.c4
-rw-r--r--cpu/mpc83xx/speed.c6
-rw-r--r--cpu/mpc83xx/traps.c3
6 files changed, 13 insertions, 15 deletions
diff --git a/cpu/mpc83xx/cpu.c b/cpu/mpc83xx/cpu.c
index f24d3a4..20bba6c 100644
--- a/cpu/mpc83xx/cpu.c
+++ b/cpu/mpc83xx/cpu.c
@@ -38,10 +38,11 @@
#include <ft_build.h>
#include <asm/processor.h>
+DECLARE_GLOBAL_DATA_PTR;
+
int checkcpu(void)
{
- DECLARE_GLOBAL_DATA_PTR;
ulong clock = gd->cpu_clk;
u32 pvr = get_pvr();
char buf[32];
@@ -138,8 +139,6 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
unsigned long get_tbclk(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
ulong tbclk;
tbclk = (gd->bus_clk + 3L) / 4L;
@@ -261,7 +260,7 @@ int dma_xfer(void *dest, u32 count, void *src)
dmamr0 = (DMA_CHANNEL_TRANSFER_MODE_DIRECT |
DMA_CHANNEL_SOURCE_ADDRESS_HOLD_8B |
DMA_CHANNEL_SOURCE_ADRESSS_HOLD_EN);
-
+
dma->dmamr0 = swab32(dmamr0);
__asm__ __volatile__ ("sync");
diff --git a/cpu/mpc83xx/cpu_init.c b/cpu/mpc83xx/cpu_init.c
index acf6862..6ed0992 100644
--- a/cpu/mpc83xx/cpu_init.c
+++ b/cpu/mpc83xx/cpu_init.c
@@ -29,6 +29,8 @@
#include <mpc83xx.h>
#include <ioports.h>
+DECLARE_GLOBAL_DATA_PTR;
+
/*
* Breathe some life into the CPU...
*
@@ -38,8 +40,6 @@
*/
void cpu_init_f (volatile immap_t * im)
{
- DECLARE_GLOBAL_DATA_PTR;
-
/* Pointer is writable since we allocated a register for it */
gd = (gd_t *) (CFG_INIT_RAM_ADDR + CFG_GBL_DATA_OFFSET);
diff --git a/cpu/mpc83xx/interrupts.c b/cpu/mpc83xx/interrupts.c
index dfd51c1..5a0babf 100644
--- a/cpu/mpc83xx/interrupts.c
+++ b/cpu/mpc83xx/interrupts.c
@@ -35,6 +35,8 @@
#include <mpc83xx.h>
#include <asm/processor.h>
+DECLARE_GLOBAL_DATA_PTR;
+
struct irq_action {
interrupt_handler_t *handler;
void *arg;
@@ -43,8 +45,6 @@ struct irq_action {
int interrupt_init_cpu (unsigned *decrementer_count)
{
- DECLARE_GLOBAL_DATA_PTR;
-
volatile immap_t *immr = (immap_t *) CFG_IMMRBAR;
*decrementer_count = (gd->bus_clk / 4) / CFG_HZ;
diff --git a/cpu/mpc83xx/spd_sdram.c b/cpu/mpc83xx/spd_sdram.c
index b4012a8..48624fe 100644
--- a/cpu/mpc83xx/spd_sdram.c
+++ b/cpu/mpc83xx/spd_sdram.c
@@ -1,7 +1,7 @@
/*
* (C) Copyright 2006
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
+ *
* Copyright 2004 Freescale Semiconductor.
* (C) Copyright 2003 Motorola Inc.
* Xianghua Xiao (X.Xiao@motorola.com)
@@ -426,7 +426,7 @@ static __inline__ unsigned long get_tbms (void)
/*
* Initialize all of memory for ECC, then enable errors.
*/
-//#define CONFIG_DDR_ECC_INIT_VIA_DMA
+/* #define CONFIG_DDR_ECC_INIT_VIA_DMA */
void ddr_enable_ecc(unsigned int dram_size)
{
uint *p;
diff --git a/cpu/mpc83xx/speed.c b/cpu/mpc83xx/speed.c
index 1368fc3..ad6b3f6 100644
--- a/cpu/mpc83xx/speed.c
+++ b/cpu/mpc83xx/speed.c
@@ -32,6 +32,8 @@
#include <mpc83xx.h>
#include <asm/processor.h>
+DECLARE_GLOBAL_DATA_PTR;
+
/* ----------------------------------------------------------------- */
typedef enum {
@@ -92,7 +94,6 @@ corecnf_t corecnf_tab[] = {
*/
int get_clocks (void)
{
- DECLARE_GLOBAL_DATA_PTR;
volatile immap_t *im = (immap_t *)CFG_IMMRBAR;
u32 pci_sync_in;
u8 spmf;
@@ -342,14 +343,11 @@ int get_clocks (void)
*********************************************/
ulong get_bus_freq (ulong dummy)
{
- DECLARE_GLOBAL_DATA_PTR;
return gd->csb_clk;
}
int print_clock_conf (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
printf("Clock configuration:\n");
printf(" Coherent System Bus: %4d MHz\n",gd->csb_clk/1000000);
printf(" Core: %4d MHz\n",gd->core_clk/1000000);
diff --git a/cpu/mpc83xx/traps.c b/cpu/mpc83xx/traps.c
index c7a5638..44345af 100644
--- a/cpu/mpc83xx/traps.c
+++ b/cpu/mpc83xx/traps.c
@@ -40,6 +40,8 @@
#include <asm/processor.h>
#include <asm/mpc8349_pci.h>
+DECLARE_GLOBAL_DATA_PTR;
+
/* Returns 0 if exception not found and fixup otherwise. */
extern unsigned long search_exception_table(unsigned long);
@@ -52,7 +54,6 @@ extern unsigned long search_exception_table(unsigned long);
void
print_backtrace(unsigned long *sp)
{
- DECLARE_GLOBAL_DATA_PTR;
int cnt = 0;
unsigned long i;