diff options
author | Alexandru Gagniuc <mr.nuke.me@gmail.com> | 2013-06-10 15:47:25 -0500 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2013-06-10 23:11:48 +0200 |
commit | 560433b4931f30ab23f602911e3e2491a1cbfae1 (patch) | |
tree | 7d976d8e885e3183b5f89ae5f823f8a32ac27d0c /src/northbridge/via/vx900/northbridge.c | |
parent | 37a8a8bd9e9d37da1e899297dbb43c0033cfd6c4 (diff) | |
download | coreboot-560433b4931f30ab23f602911e3e2491a1cbfae1.tar.xz |
VX900: Use MIN/MAX from stdlib.h instead of redefining them
Change-Id: I2dd693b300085493baa65bb652df8d6cce80b63b
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-on: http://review.coreboot.org/3431
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/northbridge/via/vx900/northbridge.c')
-rw-r--r-- | src/northbridge/via/vx900/northbridge.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/northbridge/via/vx900/northbridge.c b/src/northbridge/via/vx900/northbridge.c index fe42493dbb..c3c3920f8f 100644 --- a/src/northbridge/via/vx900/northbridge.c +++ b/src/northbridge/via/vx900/northbridge.c @@ -191,7 +191,7 @@ static u64 vx900_remap_above_4g(device_t mcu, u32 tolm) } /* The "remap to where?" register */ - reg32 = ((max(tor, RAM_4GB) >> 26) & 0x3ff) << 2; + reg32 = ((MAX(tor, RAM_4GB) >> 26) & 0x3ff) << 2; /* The "remap until where?" register */ reg32 |= ((newtor >> 26) & 0x3ff) << 14; /* Now enable the goodies */ @@ -238,7 +238,7 @@ static void vx900_set_resources(device_t dev) vx900_tolm = (pci_read_config16(mcu, 0x84) & 0xfff0) >> 4; full_tolmk = vx900_tolm << (20 - 10); /* Remap above 4G if needed */ - full_tolmk = min(full_tolmk, pci_tolm >> 10); + full_tolmk = MIN(full_tolmk, pci_tolm >> 10); printk(BIOS_SPEW, "Found top of low memory at %dMB\n", full_tolmk >> 10); @@ -247,7 +247,7 @@ static void vx900_set_resources(device_t dev) printk(BIOS_SPEW, "Integrated graphics buffer: %dMB\n", fbufk >> 10); /* Can't use the framebuffer as system RAM, sorry */ - tolmk = min(full_tolmk, tomk); + tolmk = MIN(full_tolmk, tomk); tolmk -= fbufk; ram_resource(dev, idx++, 0, 640); printk(BIOS_SPEW, "System ram left: %dMB\n", tolmk >> 10); |