Merge with /home/m8/git/u-boot
[platform/kernel/u-boot.git] / cpu / mpc83xx / speed.c
index 5964260..ad6b3f6 100644 (file)
@@ -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;
@@ -132,7 +133,7 @@ int get_clocks (void)
 
        /* PCI Host Mode */
        if (!(im->reset.rcwh & RCWH_PCIHOST)) {
-               /* though RCWH_PCIHOST is defined in CFG_HRCW_HIGH 
+               /* though RCWH_PCIHOST is defined in CFG_HRCW_HIGH
                 * the im->reset.rcwhr PCI Host Mode is disabled
                 * FIXME: findout if there is a way to issue some warning */
                return -2;
@@ -156,7 +157,7 @@ int get_clocks (void)
 
        /* PCI Agent Mode */
        if (im->reset.rcwh & RCWH_PCIHOST) {
-               /* though RCWH_PCIHOST is not defined in CFG_HRCW_HIGH 
+               /* though RCWH_PCIHOST is not defined in CFG_HRCW_HIGH
                 * the im->reset.rcwhr PCI Host Mode is enabled */
                return -3;
        }
@@ -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);