diff options
Diffstat (limited to 'src/mainboard/lippert')
-rw-r--r-- | src/mainboard/lippert/frontrunner-af/romstage.c | 52 | ||||
-rw-r--r-- | src/mainboard/lippert/toucan-af/romstage.c | 52 |
2 files changed, 18 insertions, 86 deletions
diff --git a/src/mainboard/lippert/frontrunner-af/romstage.c b/src/mainboard/lippert/frontrunner-af/romstage.c index b65834e0ba..05c50193b9 100644 --- a/src/mainboard/lippert/frontrunner-af/romstage.c +++ b/src/mainboard/lippert/frontrunner-af/romstage.c @@ -32,6 +32,7 @@ #include <cpu/x86/mtrr.h> #include "cpu/amd/car.h" #include "agesawrapper.h" +#include <northbridge/amd/agesa/agesawrapper_call.h> #include "cpu/x86/bist.h" #include <superio/smsc/smscsuperio/smscsuperio.h> #include "cpu/x86/lapic.h" @@ -78,68 +79,33 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx) printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx); post_code(0x35); - printk(BIOS_DEBUG, "agesawrapper_amdinitmmio "); - val = agesawrapper_amdinitmmio(); - if (val) - printk(BIOS_DEBUG, "error level: %x \n", val); - else - printk(BIOS_DEBUG, "passed.\n"); + AGESAWRAPPER(amdinitmmio); post_code(0x37); - printk(BIOS_DEBUG, "agesawrapper_amdinitreset "); - val = agesawrapper_amdinitreset(); - if (val) - printk(BIOS_DEBUG, "error level: %x \n", val); - else - printk(BIOS_DEBUG, "passed.\n"); + AGESAWRAPPER(amdinitreset); post_code(0x39); - printk(BIOS_DEBUG, "agesawrapper_amdinitearly "); - val = agesawrapper_amdinitearly (); - if (val) - printk(BIOS_DEBUG, "error level: %x \n", val); - else - printk(BIOS_DEBUG, "passed.\n"); + AGESAWRAPPER(amdinitearly); int s3resume = acpi_is_wakeup_early() && acpi_s3_resume_allowed(); if (!s3resume) { post_code(0x40); - printk(BIOS_DEBUG, "agesawrapper_amdinitpost "); - val = agesawrapper_amdinitpost (); /* Reboots with outb(3,0x92), outb(4,0xcf9) or triple-fault all * hang, looks like DRAM re-init goes wrong, don't know why. */ + val = AGESAWRAPPER(amdinitpost); if (val == 7) /* fatal, amdinitenv below is going to hang */ outb(0x06, 0x0cf9); /* reset system harder instead */ - if (val) - printk(BIOS_DEBUG, "error level: %x \n", val); - else - printk(BIOS_DEBUG, "passed.\n"); post_code(0x42); - printk(BIOS_DEBUG, "agesawrapper_amdinitenv "); - val = agesawrapper_amdinitenv (); - if (val) - printk(BIOS_DEBUG, "error level: %x \n", val); - else - printk(BIOS_DEBUG, "passed.\n"); + AGESAWRAPPER(amdinitenv); } else { /* S3 detect */ printk(BIOS_INFO, "S3 detected\n"); post_code(0x60); - printk(BIOS_DEBUG, "agesawrapper_amdinitresume "); - val = agesawrapper_amdinitresume(); - if (val) - printk(BIOS_DEBUG, "error level: %x \n", val); - else - printk(BIOS_DEBUG, "passed.\n"); - - printk(BIOS_DEBUG, "agesawrapper_amds3laterestore "); - val = agesawrapper_amds3laterestore (); - if (val) - printk(BIOS_DEBUG, "error level: %x \n", val); - else - printk(BIOS_DEBUG, "passed.\n"); + AGESAWRAPPER(amdinitresume); + + AGESAWRAPPER(amds3laterestore); post_code(0x61); prepare_for_resume(); diff --git a/src/mainboard/lippert/toucan-af/romstage.c b/src/mainboard/lippert/toucan-af/romstage.c index ff2697b1fb..595faa0ff5 100644 --- a/src/mainboard/lippert/toucan-af/romstage.c +++ b/src/mainboard/lippert/toucan-af/romstage.c @@ -32,6 +32,7 @@ #include <cpu/x86/mtrr.h> #include "cpu/amd/car.h" #include "agesawrapper.h" +#include <northbridge/amd/agesa/agesawrapper_call.h> #include "cpu/x86/bist.h" #include <superio/winbond/common/winbond.h> #include <superio/winbond/w83627dhg/w83627dhg.h> @@ -79,68 +80,33 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx) printk(BIOS_DEBUG, "cpu_init_detectedx = %08lx \n", cpu_init_detectedx); post_code(0x35); - printk(BIOS_DEBUG, "agesawrapper_amdinitmmio "); - val = agesawrapper_amdinitmmio(); - if (val) - printk(BIOS_DEBUG, "error level: %x \n", val); - else - printk(BIOS_DEBUG, "passed.\n"); + AGESAWRAPPER(amdinitmmio); post_code(0x37); - printk(BIOS_DEBUG, "agesawrapper_amdinitreset "); - val = agesawrapper_amdinitreset(); - if (val) - printk(BIOS_DEBUG, "error level: %x \n", val); - else - printk(BIOS_DEBUG, "passed.\n"); + AGESAWRAPPER(amdinitreset); post_code(0x39); - printk(BIOS_DEBUG, "agesawrapper_amdinitearly "); - val = agesawrapper_amdinitearly (); - if (val) - printk(BIOS_DEBUG, "error level: %x \n", val); - else - printk(BIOS_DEBUG, "passed.\n"); + AGESAWRAPPER(amdinitearly); int s3resume = acpi_is_wakeup_early() && acpi_s3_resume_allowed(); if (!s3resume) { post_code(0x40); - printk(BIOS_DEBUG, "agesawrapper_amdinitpost "); - val = agesawrapper_amdinitpost (); /* Reboots with outb(3,0x92), outb(4,0xcf9) or triple-fault all * hang, looks like DRAM re-init goes wrong, don't know why. */ + val = AGESAWRAPPER(amdinitpost); if (val == 7) /* fatal, amdinitenv below is going to hang */ outb(0x06, 0x0cf9); /* reset system harder instead */ - if (val) - printk(BIOS_DEBUG, "error level: %x \n", val); - else - printk(BIOS_DEBUG, "passed.\n"); post_code(0x42); - printk(BIOS_DEBUG, "agesawrapper_amdinitenv "); - val = agesawrapper_amdinitenv (); - if (val) - printk(BIOS_DEBUG, "error level: %x \n", val); - else - printk(BIOS_DEBUG, "passed.\n"); + AGESAWRAPPER(amdinitenv); } else { /* S3 detect */ printk(BIOS_INFO, "S3 detected\n"); post_code(0x60); - printk(BIOS_DEBUG, "agesawrapper_amdinitresume "); - val = agesawrapper_amdinitresume(); - if (val) - printk(BIOS_DEBUG, "error level: %x \n", val); - else - printk(BIOS_DEBUG, "passed.\n"); - - printk(BIOS_DEBUG, "agesawrapper_amds3laterestore "); - val = agesawrapper_amds3laterestore (); - if (val) - printk(BIOS_DEBUG, "error level: %x \n", val); - else - printk(BIOS_DEBUG, "passed.\n"); + AGESAWRAPPER(amdinitresume); + + AGESAWRAPPER(amds3laterestore); post_code(0x61); prepare_for_resume(); |