printk_foo -> printk(BIOS_FOO, ...)
[coreboot.git] / src / mainboard / tyan / s2735 / romstage.c
index 5e2678a047b70701adbbdae296156b1cc9c13e0b..c4450ebb386cd8bab71a5cf850bdfa4e722ec54b 100644 (file)
@@ -80,53 +80,7 @@ static inline int spd_read_byte(unsigned device, unsigned address)
 
 #include "cpu/x86/car/copy_and_run.c"
 
-#if CONFIG_USE_FALLBACK_IMAGE == 1
-
-#include "southbridge/intel/i82801ex/cmos_failover.c"
-
-void real_main(unsigned long bist);
-
 void amd64_main(unsigned long bist)
-{
-        /* Is this a deliberate reset by the bios */
-//        post_code(0x22);
-        if (bios_reset_detected() && last_boot_normal()) {
-                goto normal_image;
-        }
-        /* This is the primary cpu how should I boot? */
-        else {
-               check_cmos_failed();
-               if (do_normal_boot()) {
-                       goto normal_image;
-               }
-               else {
-                       goto fallback_image;
-               }
-       }
- normal_image:
-//        post_code(0x23);
-        __asm__ volatile ("jmp __normal_image"
-                : /* outputs */
-                : "a" (bist) /* inputs */
-                );
- cpu_reset:
-//        post_code(0x24);
-#if 0
-        //CPU reset will reset memtroller ???
-        asm volatile ("jmp __cpu_reset" 
-                : /* outputs */ 
-                : "a"(bist) /* inputs */
-                );
-#endif
-
- fallback_image:
-//        post_code(0x25);
-        real_main(bist);
-}
-void real_main(unsigned long bist)
-#else
-void amd64_main(unsigned long bist)
-#endif
 {
        static const struct mem_controller memctrl[] = {
                 {
@@ -191,7 +145,7 @@ void amd64_main(unsigned long bist)
                        : "=a" (v_esp)
                );
 #if CONFIG_USE_INIT
-               printk_debug("v_esp=%08x\r\n", v_esp);
+               printk(BIOS_DEBUG, "v_esp=%08x\r\n", v_esp);
 #else
                print_debug("v_esp="); print_debug_hex32(v_esp); print_debug("\r\n");
 #endif
@@ -203,7 +157,7 @@ void amd64_main(unsigned long bist)
 cpu_reset_x:
 
 #if CONFIG_USE_INIT
-        printk_debug("cpu_reset = %08x\r\n",cpu_reset);
+        printk(BIOS_DEBUG, "cpu_reset = %08x\r\n",cpu_reset);
 #else
         print_debug("cpu_reset = "); print_debug_hex32(cpu_reset); print_debug("\r\n");
 #endif
@@ -252,7 +206,7 @@ cpu_reset_x:
                         print_debug("Use Ram as Stack now - \r\n");
                 }
 #if CONFIG_USE_INIT
-                printk_debug("new_cpu_reset = %08x\r\n", new_cpu_reset);
+                printk(BIOS_DEBUG, "new_cpu_reset = %08x\r\n", new_cpu_reset);
 #else
                 print_debug("new_cpu_reset = "); print_debug_hex32(new_cpu_reset); print_debug("\r\n");
 #endif