Merge branch 'master' of rsync://rsync.denx.de/git/u-boot
[platform/kernel/u-boot.git] / board / MAI / AmigaOneG3SE / articiaS.c
index af85444..3901b80 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2002
- * Hyperion Entertainment, ThomasF@hyperion-entertainment.com 
+ * Hyperion Entertainment, ThomasF@hyperion-entertainment.com
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -29,6 +29,8 @@
 #include "smbus.h"
 #include "via686.h"
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #undef DEBUG
 
 struct dimm_bank {
@@ -83,7 +85,7 @@ static inline unsigned short NSto10PS (unsigned char spd_byte)
 long detect_sdram (uint8 * rom, int dimmNum, struct dimm_bank *banks)
 {
        int dimm_address = (dimmNum == 0) ? SM_DIMM0_ADDR : SM_DIMM1_ADDR;
-       uint32 busclock = get_bus_freq (0);
+       uint32 busclock = gd->bus_clk;
        uint32 memclock = busclock;
        uint32 tmemclock = 1000000000 / (memclock / 100);
        uint32 datawidth;
@@ -393,8 +395,6 @@ uint32 burst_to_len (uint32 support)
 
 long articiaS_ram_init (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        register uint32 i;
        register uint32 value1;
        register uint32 value2;
@@ -404,7 +404,7 @@ long articiaS_ram_init (void)
        uint32 total_ram = 0;
 
        struct dimm_bank banks[4];      /* FIXME: Move to initram */
-       uint32 busclock = get_bus_freq (0);
+       uint32 busclock = gd->bus_clk;
        uint32 memclock = busclock;
        uint32 reg32;
        uint32 refresh_clocks;
@@ -571,7 +571,7 @@ long articiaS_ram_init (void)
        if (banks[3].used)
                burst_support = banks[3].burst_len;
 
-       /* 
+       /*
           ** Mode register:
           ** Bits         Use
           ** 0-2          Burst len
@@ -674,7 +674,7 @@ static __inline__ void set_msr (unsigned long msr)
        asm volatile ("mtmsr %0"::"r" (msr));
 }
 
-int board_pre_init (void)
+int board_early_init_f (void)
 {
        unsigned char c_value = 0;
        unsigned long msr;