]> git.sur5r.net Git - u-boot/blobdiff - board/gth2/gth2.c
[MIPS] Move gth2_config from ARM section to MIPS
[u-boot] / board / gth2 / gth2.c
index 77fc5b469e733e8ee114f56c7e9a0790d74c8078..6da80dc758dc851e6cd13497a11b0ef266ae6688 100644 (file)
 #include <asm/au1x00.h>
 #include <asm/addrspace.h>
 #include <asm/mipsregs.h>
+#include <asm/io.h>
 #include <watchdog.h>
 
 #include "ee_access.h"
 
 static int wdi_status = 0;
 
-unsigned long mips_io_port_base = 0;
-
 #define SDRAM_SIZE ((64*1024*1024)-(12*4096))
 
 
@@ -61,13 +60,13 @@ void init_log_serial(void){
        u32 *serial_log_offsetp = (u32*)SERIAL_LOG_BUFFER;
 
        /* Copy buffer from last run */
-       memcpy(serial_log_buffer + 4096, 
-              serial_log_buffer, 
+       memcpy(serial_log_buffer + 4096,
+              serial_log_buffer,
               4096);
 
        memset(serial_log_buffer, 0, 4096);
 
-       *serial_log_offsetp = 4;        
+       *serial_log_offsetp = 4;
 }
 
 
@@ -118,7 +117,7 @@ void set_ledcard(u32 value){
                udelay(1);
                *sys_outputclr = GPIO_LEDCLK;
                udelay(1);
-               
+
                value<<=1;
        }
        /* Data is enable output */
@@ -147,6 +146,9 @@ int checkboard (void)
        default:
                printf ("Unsupported cpu %d, proc_id=0x%x\n", proc_id >> 24, proc_id);
        }
+
+       set_io_port_base(0);
+
 #ifdef CONFIG_IDE_PCMCIA
        /* PCMCIA is on a 36 bit physical address.
           We need to map it into a 32 bit addresses */
@@ -228,7 +230,7 @@ static void write_bootdata (volatile u16 * addr, u8 System, u8 Count)
                printf ("Invalid boot count %u, setting 1\n", Count);
                Count = 1;
        }
-       
+
        printf ("Boot attempt %d\n", Count);
 
        data = (System << 8) | Count;
@@ -241,9 +243,9 @@ static void write_bootdata (volatile u16 * addr, u8 System, u8 Count)
 }
 
 static int random_system(void){
-       /* EEPROM read failed. Just try to choose one 
+       /* EEPROM read failed. Just try to choose one
           system release and hope it works */
-       
+
        /* FIXME */
        return(SYSTEM_BOOT);
 }
@@ -320,8 +322,8 @@ static void check_boot_tries (void)
                        data = *addr;
                        system = data >> 8;
                        count = data & 0xFF;
-                       if ((system != SYSTEM_BOOT) & 
-                           (system != SYSTEM2_BOOT) & 
+                       if ((system != SYSTEM_BOOT) &
+                           (system != SYSTEM2_BOOT) &
                            (system != FAILSAFE_BOOT)) {
                                printf ("*** Wrong system %d\n", system);
                                system = FAILSAFE_BOOT;
@@ -429,7 +431,7 @@ int misc_init_r(void){
            (Rx[8] != ':') | (Rx[11] != ':') | (Rx[14] != ':')) {
                printf ("*** ethernet addr invalid, using default ***\n");
        } else {
-               setenv ("ethaddr", Rx);
+               setenv ("ethaddr", (char *)Rx);
        }
        return (0);
 }