Moved initialization of GT6426x Ethernet controller to board_eth_init()
[oweals/u-boot.git] / board / incaip / incaip.c
index dbf0ecc5af3d1d56bfbd9b16c18a2ea27c16ce94..ac7ad8f292e438b00aa36607c8054d40a64cf373 100644 (file)
 #include <asm/addrspace.h>
 #include <asm/inca-ip.h>
 #include <asm/io.h>
+#include <asm/reboot.h>
 
 extern uint incaip_get_cpuclk(void);
 
+void _machine_restart(void)
+{
+       *INCA_IP_WDT_RST_REQ = 0x3f;
+}
+
 static ulong max_sdram_size(void)
 {
        /* The only supported SDRAM data width is 16bit.
@@ -47,7 +53,7 @@ static ulong max_sdram_size(void)
        return size;
 }
 
-long int initdram(int board_type)
+phys_size_t initdram(int board_type)
 {
        int   rows, cols, best_val = *INCA_IP_SDRAM_MC_CFGPB0;
        ulong size, max_size       = 0;
@@ -57,7 +63,7 @@ long int initdram(int board_type)
 
                /* Can't probe for RAM size unless we are running from Flash.
                 */
-       if (PHYSADDR(our_address) < PHYSADDR(PHYS_FLASH_1))
+       if (CPHYSADDR(our_address) < CPHYSADDR(PHYS_FLASH_1))
        {
                return max_sdram_size();
        }