diff options
author | Patrick Georgi <patrick@georgi-clan.de> | 2011-05-10 21:53:13 +0000 |
---|---|---|
committer | Patrick Georgi <patrick.georgi@coresystems.de> | 2011-05-10 21:53:13 +0000 |
commit | b251753b4fae1e827f5398daf679773eba643dce (patch) | |
tree | 3e5f0b12e9a036f36c7c8bdffab8845637748453 /src/northbridge/amd/amdk8/raminit_f.c | |
parent | 6649d9740d79b8c52d40218d78393547aaad7548 (diff) |
Change read_option() to a macro that wraps some API uglyness
Simplify
read_option(CMOS_VSTART_foo, CMOS_VLEN_foo, somedefault)
to
read_option(foo, somedefault)
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6565 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge/amd/amdk8/raminit_f.c')
-rw-r--r-- | src/northbridge/amd/amdk8/raminit_f.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/northbridge/amd/amdk8/raminit_f.c b/src/northbridge/amd/amdk8/raminit_f.c index 9ccc56b2b2..3e6118dcd8 100644 --- a/src/northbridge/amd/amdk8/raminit_f.c +++ b/src/northbridge/amd/amdk8/raminit_f.c @@ -1108,7 +1108,7 @@ static unsigned long interleave_chip_selects(const struct mem_controller *ctrl, * and if so count them. */ #if defined(CMOS_VSTART_interleave_chip_selects) - if (read_option(CMOS_VSTART_interleave_chip_selects, CMOS_VLEN_interleave_chip_selects, 1) == 0) + if (read_option(interleave_chip_selects, 1) == 0) return 0; #else #if !CONFIG_INTERLEAVE_CHIP_SELECTS @@ -1806,7 +1806,7 @@ static struct spd_set_memclk_result spd_set_memclk(const struct mem_controller * min_cycle_time = min_cycle_times[(value >> NBCAP_MEMCLK_SHIFT) & NBCAP_MEMCLK_MASK]; bios_cycle_time = min_cycle_times[ #ifdef CMOS_VSTART_max_mem_clock - read_option(CMOS_VSTART_max_mem_clock, CMOS_VLEN_max_mem_clock, 0) + read_option(max_mem_clock, 0) #else #if defined(CONFIG_MAX_MEM_CLOCK) CONFIG_MAX_MEM_CLOCK @@ -2375,7 +2375,7 @@ static void set_ecc(const struct mem_controller *ctrl, dcl |= DCL_DimmEccEn; } #ifdef CMOS_VSTART_ECC_memory - if (read_option(CMOS_VSTART_ECC_memory, CMOS_VLEN_ECC_memory, 1) == 0) { + if (read_option(ECC_memory, 1) == 0) { dcl &= ~DCL_DimmEccEn; } #else // CMOS_VSTART_ECC_memory not defined |