From bde6d309dfafe58732ec46314a2d4c08974b62d4 Mon Sep 17 00:00:00 2001 From: Kevin Paul Herbert Date: Wed, 24 Dec 2014 18:43:20 -0800 Subject: x86: Change MMIO addr in readN(addr)/writeN(addr, val) to pointer On x86, change the type of the address parameter in read8()/read16/read32()/write8()/write16()/write32() to be a pointer, instead of unsigned long. Change-Id: Ic26dd8a72d82828b69be3c04944710681b7bd330 Signed-off-by: Kevin Paul Herbert Signed-off-by: Alexandru Gagniuc Reviewed-on: http://review.coreboot.org/7784 Tested-by: build bot (Jenkins) --- src/northbridge/intel/gm45/gma.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/northbridge/intel/gm45/gma.c') diff --git a/src/northbridge/intel/gm45/gma.c b/src/northbridge/intel/gm45/gma.c index 74e16ad2f1..4cf2776162 100644 --- a/src/northbridge/intel/gm45/gma.c +++ b/src/northbridge/intel/gm45/gma.c @@ -43,12 +43,12 @@ static struct resource *gtt_res = NULL; void gtt_write(u32 reg, u32 data) { - write32(gtt_res->base + reg, data); + write32(res2mmio(gtt_res, reg, 0), data); } #if IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) -static void power_port(u32 mmio) +static void power_port(u8 *mmio) { read32(mmio + 0x00061100); // = 0x00000000 write32(mmio + 0x00061100, 0x00000000); @@ -103,7 +103,7 @@ static void power_port(u32 mmio) } static void intel_gma_init(const struct northbridge_intel_gm45_config *info, - u32 mmio, u32 physbase, u16 piobase, u32 lfb) + u8 *mmio, u32 physbase, u16 piobase, u32 lfb) { int i; @@ -464,8 +464,8 @@ static void gma_func0_init(struct device *dev) && lfb_res && lfb_res->base) { printk(BIOS_SPEW, "Initializing VGA without OPROM. MMIO 0x%llx\n", gtt_res->base); - intel_gma_init(conf, gtt_res->base, physbase, pio_res->base, - lfb_res->base); + intel_gma_init(conf, res2mmio(gtt_res, 0, 0), physbase, + pio_res->base, lfb_res->base); } /* Linux relies on VBT for panel info. */ -- cgit v1.2.3