85xx: Add eSDHC support for 8536 DS
[oweals/u-boot.git] / lib_ppc / board.c
index ce07c4ed86ace5a92be5792af4114836dcbd6291..3bcfb45319a94a2b19ddff9f8bf1fd699a13776a 100644 (file)
@@ -38,9 +38,6 @@
 #if defined(CONFIG_CMD_IDE)
 #include <ide.h>
 #endif
-#if defined(CONFIG_CMD_SATA)
-#include <sata.h>
-#endif
 #if defined(CONFIG_CMD_SCSI)
 #include <scsi.h>
 #endif
@@ -51,6 +48,9 @@
 #include <status_led.h>
 #endif
 #include <net.h>
+#ifdef CONFIG_GENERIC_MMC
+#include <mmc.h>
+#endif
 #include <serial.h>
 #ifdef CONFIG_SYS_ALLOC_DPRAM
 #if !defined(CONFIG_CPM2)
 #include <keyboard.h>
 #endif
 
+#ifdef CONFIG_ADDR_MAP
+#include <asm/mmu.h>
+#endif
+
 #ifdef CONFIG_SYS_UPDATE_FLASH_SIZE
 extern int update_flash_size (int flash_size);
 #endif
@@ -351,9 +355,6 @@ init_fnc_t *init_sequence[] = {
        NULL,                   /* Terminate this list */
 };
 
-#ifndef CONFIG_MAX_MEM_MAPPED
-#define CONFIG_MAX_MEM_MAPPED (256 << 20)
-#endif
 ulong get_effective_memsize(void)
 {
 #ifndef        CONFIG_VERY_BIG_RAM
@@ -635,16 +636,6 @@ void board_init_f (ulong bootflag)
        /* NOTREACHED - relocate_code() does not return */
 }
 
-int __is_sata_supported(void)
-{
-       /* For some boards, when sata disabled by the switch, and the
-        * driver still access the sata registers, the cpu will hangup.
-        * please define platform specific is_sata_supported() if your
-        * board have such issue.*/
-       return 1;
-}
-int is_sata_supported(void) __attribute__((weak, alias("__is_sata_supported")));
-
 /************************************************************************
  *
  * This is the next part if the initialization sequence: we are now
@@ -689,6 +680,15 @@ void board_init_r (gd_t *id, ulong dest_addr)
 
        WATCHDOG_RESET ();
 
+       /*
+        * Setup trap handlers
+        */
+       trap_init (dest_addr);
+
+#ifdef CONFIG_ADDR_MAP
+       init_addr_map();
+#endif
+
 #if defined(CONFIG_BOARD_EARLY_INIT_R)
        board_early_init_r ();
 #endif
@@ -765,11 +765,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
 
        asm ("sync ; isync");
 
-       /*
-        * Setup trap handlers
-        */
-       trap_init (dest_addr);
-
 #if !defined(CONFIG_SYS_NO_FLASH)
        puts ("FLASH: ");
 
@@ -1083,6 +1078,12 @@ void board_init_r (gd_t *id, ulong dest_addr)
        scsi_init ();
 #endif
 
+#ifdef CONFIG_GENERIC_MMC
+       WATCHDOG_RESET ();
+       puts ("MMC:  ");
+       mmc_initialize (bd);
+#endif
+
 #if defined(CONFIG_CMD_DOC)
        WATCHDOG_RESET ();
        puts ("DOC:   ");
@@ -1144,13 +1145,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
 #endif
 #endif
 
-#if defined(CONFIG_CMD_SATA)
-       if (is_sata_supported()) {
-               puts("SATA:  ");
-               sata_initialize();
-       }
-#endif
-
 #ifdef CONFIG_LAST_STAGE_INIT
        WATCHDOG_RESET ();
        /*