summaryrefslogtreecommitdiff
path: root/src/southbridge/sis/sis966/aza.c
diff options
context:
space:
mode:
authorKevin Paul Herbert <kph@meraki.net>2014-12-24 18:43:20 -0800
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2015-02-15 08:50:22 +0100
commitbde6d309dfafe58732ec46314a2d4c08974b62d4 (patch)
tree17ba00565487ddfbb5759c96adfbb3fffe2a4550 /src/southbridge/sis/sis966/aza.c
parent4b10dec1a66122b515b2191f823d7fd379ec655f (diff)
downloadcoreboot-bde6d309dfafe58732ec46314a2d4c08974b62d4.tar.xz
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 <kph@meraki.net> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-on: http://review.coreboot.org/7784 Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/southbridge/sis/sis966/aza.c')
-rw-r--r--src/southbridge/sis/sis966/aza.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/southbridge/sis/sis966/aza.c b/src/southbridge/sis/sis966/aza.c
index 1a9462bb4c..ed812053aa 100644
--- a/src/southbridge/sis/sis966/aza.c
+++ b/src/southbridge/sis/sis966/aza.c
@@ -42,7 +42,7 @@ u8 SiS_SiS7502_init[7][3]={
{0x00, 0x00, 0x00} //End of table
};
-static int set_bits(u32 port, u32 mask, u32 val)
+static int set_bits(void *port, u32 mask, u32 val)
{
u32 dword;
int count;
@@ -67,7 +67,7 @@ static int set_bits(u32 port, u32 mask, u32 val)
}
-static u32 send_verb(u32 base, u32 verb)
+static u32 send_verb(u8 *base, u32 verb)
{
u32 dword;
@@ -75,7 +75,7 @@ static u32 send_verb(u32 base, u32 verb)
dword=dword|(unsigned long)0x0002;
write32(base + 0x68, dword);
do {
- dword = read32(base + 0x68);
+ dword = read32(base + 0x68);
} while ((dword & 1)!=0);
write32(base + 0x60, verb);
udelay(500);
@@ -92,7 +92,7 @@ static u32 send_verb(u32 base, u32 verb)
}
-static int codec_detect(u32 base)
+static int codec_detect(u8 *base)
{
u32 dword;
int idx=0;
@@ -194,7 +194,7 @@ static unsigned find_verb(u32 viddid, u32 **verb)
}
-static void codec_init(u32 base, int addr)
+static void codec_init(u8 *base, int addr)
{
u32 dword;
u32 *verb;
@@ -232,7 +232,7 @@ static void codec_init(u32 base, int addr)
printk(BIOS_DEBUG, "verb loaded!\n");
}
-static void codecs_init(u32 base, u32 codec_mask)
+static void codecs_init(u8 *base, u32 codec_mask)
{
codec_init(base, 0);
return;
@@ -240,7 +240,7 @@ static void codecs_init(u32 base, u32 codec_mask)
static void aza_init(struct device *dev)
{
- u32 base;
+ u8 *base;
struct resource *res;
u32 codec_mask;
@@ -286,8 +286,8 @@ static void aza_init(struct device *dev)
if(!res)
return;
- base = res->base;
- printk(BIOS_DEBUG, "base = 0x%08x\n", base);
+ base = res2mmio(res, 0, 0);
+ printk(BIOS_DEBUG, "base = 0x%p\n", base);
codec_mask = codec_detect(base);