diff options
author | Kevin Paul Herbert <kph@meraki.net> | 2014-12-24 18:43:20 -0800 |
---|---|---|
committer | Alexandru Gagniuc <mr.nuke.me@gmail.com> | 2015-02-15 08:50:22 +0100 |
commit | bde6d309dfafe58732ec46314a2d4c08974b62d4 (patch) | |
tree | 17ba00565487ddfbb5759c96adfbb3fffe2a4550 /src/mainboard/asus | |
parent | 4b10dec1a66122b515b2191f823d7fd379ec655f (diff) | |
download | coreboot-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/mainboard/asus')
-rw-r--r-- | src/mainboard/asus/a8n_e/mptable.c | 2 | ||||
-rw-r--r-- | src/mainboard/asus/a8v-e_deluxe/mptable.c | 4 | ||||
-rw-r--r-- | src/mainboard/asus/a8v-e_se/mptable.c | 4 | ||||
-rw-r--r-- | src/mainboard/asus/dsbf/devicetree.cb | 4 | ||||
-rw-r--r-- | src/mainboard/asus/dsbf/romstage.c | 4 | ||||
-rw-r--r-- | src/mainboard/asus/f2a85-m/mptable.c | 6 | ||||
-rw-r--r-- | src/mainboard/asus/k8v-x/mptable.c | 4 | ||||
-rw-r--r-- | src/mainboard/asus/kfsn4-dre/mptable.c | 3 | ||||
-rw-r--r-- | src/mainboard/asus/m2n-e/mptable.c | 3 | ||||
-rw-r--r-- | src/mainboard/asus/m2v/mptable.c | 4 | ||||
-rw-r--r-- | src/mainboard/asus/m4a78-em/mptable.c | 3 | ||||
-rw-r--r-- | src/mainboard/asus/m4a785-m/mptable.c | 3 | ||||
-rw-r--r-- | src/mainboard/asus/m5a88-v/mptable.c | 2 | ||||
-rw-r--r-- | src/mainboard/asus/p2b-d/mptable.c | 2 | ||||
-rw-r--r-- | src/mainboard/asus/p2b-ds/mptable.c | 2 |
15 files changed, 27 insertions, 23 deletions
diff --git a/src/mainboard/asus/a8n_e/mptable.c b/src/mainboard/asus/a8n_e/mptable.c index a954d92ea9..56d2150a8f 100644 --- a/src/mainboard/asus/a8n_e/mptable.c +++ b/src/mainboard/asus/a8n_e/mptable.c @@ -59,7 +59,7 @@ static void *smp_write_config_table(void *v) res = find_resource(dev, PCI_BASE_ADDRESS_1); if (res) { smp_write_ioapic(mc, apicid_ck804, 0x11, - res->base); + res2mmio(res, 0, 0)); } /* Initialize interrupt mapping. */ diff --git a/src/mainboard/asus/a8v-e_deluxe/mptable.c b/src/mainboard/asus/a8v-e_deluxe/mptable.c index 71e0e1e95e..ebd15bae1b 100644 --- a/src/mainboard/asus/a8v-e_deluxe/mptable.c +++ b/src/mainboard/asus/a8v-e_deluxe/mptable.c @@ -38,8 +38,8 @@ static void *smp_write_config_table(void *v) mptable_write_buses(mc, NULL, &bus_isa); /* I/O APICs: APIC ID Version State Address */ - smp_write_ioapic(mc, VT8237R_APIC_ID, 0x20, IO_APIC_ADDR); - smp_write_ioapic(mc, K8T890_APIC_ID, 0x20, K8T890_APIC_BASE); + smp_write_ioapic(mc, VT8237R_APIC_ID, 0x20, VIO_APIC_VADDR); + smp_write_ioapic(mc, K8T890_APIC_ID, 0x20, (void *)K8T890_APIC_BASE); mptable_add_isa_interrupts(mc, bus_isa, VT8237R_APIC_ID, 0); diff --git a/src/mainboard/asus/a8v-e_se/mptable.c b/src/mainboard/asus/a8v-e_se/mptable.c index 71e0e1e95e..ebd15bae1b 100644 --- a/src/mainboard/asus/a8v-e_se/mptable.c +++ b/src/mainboard/asus/a8v-e_se/mptable.c @@ -38,8 +38,8 @@ static void *smp_write_config_table(void *v) mptable_write_buses(mc, NULL, &bus_isa); /* I/O APICs: APIC ID Version State Address */ - smp_write_ioapic(mc, VT8237R_APIC_ID, 0x20, IO_APIC_ADDR); - smp_write_ioapic(mc, K8T890_APIC_ID, 0x20, K8T890_APIC_BASE); + smp_write_ioapic(mc, VT8237R_APIC_ID, 0x20, VIO_APIC_VADDR); + smp_write_ioapic(mc, K8T890_APIC_ID, 0x20, (void *)K8T890_APIC_BASE); mptable_add_isa_interrupts(mc, bus_isa, VT8237R_APIC_ID, 0); diff --git a/src/mainboard/asus/dsbf/devicetree.cb b/src/mainboard/asus/dsbf/devicetree.cb index b4d1b63ff8..0d3b6c8249 100644 --- a/src/mainboard/asus/dsbf/devicetree.cb +++ b/src/mainboard/asus/dsbf/devicetree.cb @@ -91,13 +91,13 @@ chip northbridge/intel/i5000 register "have_isa_interrupts" = "1" register "irq_on_fsb" = "1" register "enable_virtual_wire" = "1" - register "base" = "0xfec00000" + register "base" = "(void *)0xfec00000" device ioapic 8 on end end chip drivers/generic/ioapic register "irq_on_fsb" = "1" - register "base" = "0xfec80000" + register "base" = "(void *)0xfec80000" device ioapic 9 on end end diff --git a/src/mainboard/asus/dsbf/romstage.c b/src/mainboard/asus/dsbf/romstage.c index d7bcb89554..699aae1289 100644 --- a/src/mainboard/asus/dsbf/romstage.c +++ b/src/mainboard/asus/dsbf/romstage.c @@ -49,7 +49,7 @@ static void early_config(void) u32 gcs, rpc, fd; /* Enable RCBA */ - pci_write_config32(PCI_DEV(0, 0x1F, 0), RCBA, DEFAULT_RCBA | 1); + pci_write_config32(PCI_DEV(0, 0x1F, 0), RCBA, (uintptr_t)DEFAULT_RCBA | 1); /* Disable watchdog */ gcs = read32(DEFAULT_RCBA + RCBA_GCS); @@ -138,7 +138,7 @@ void main(unsigned long bist) smbus_write_byte(0x6f, 0x08, 0x06); smbus_write_byte(0x6f, 0x09, 0x00); - pci_write_config32(PCI_DEV(0, 0x1f, 0), 0xf0, DEFAULT_RCBA | 1); + pci_write_config32(PCI_DEV(0, 0x1f, 0), 0xf0, (uintptr_t)DEFAULT_RCBA | 1); i5000_fbdimm_init(); smbus_write_byte(0x69, 0x01, 0x01); } diff --git a/src/mainboard/asus/f2a85-m/mptable.c b/src/mainboard/asus/f2a85-m/mptable.c index cc81819d1c..7509dd03e5 100644 --- a/src/mainboard/asus/f2a85-m/mptable.c +++ b/src/mainboard/asus/f2a85-m/mptable.c @@ -75,8 +75,8 @@ static void *smp_write_config_table(void *v) * have been written so they can be read to get the correct * APIC ID and Version */ - u8 ioapic_id = (io_apic_read(IO_APIC_ADDR, 0x00) >> 24); - u8 ioapic_ver = (io_apic_read(IO_APIC_ADDR, 0x01) & 0xFF); + u8 ioapic_id = (io_apic_read(VIO_APIC_VADDR, 0x00) >> 24); + u8 ioapic_ver = (io_apic_read(VIO_APIC_VADDR, 0x01) & 0xFF); mc = (void *)(((char *)v) + SMP_FLOATING_TABLE_LEN); @@ -92,7 +92,7 @@ static void *smp_write_config_table(void *v) my_smp_write_bus(mc, bus_isa, "ISA "); /* I/O APICs: APIC ID Version State Address */ - smp_write_ioapic(mc, ioapic_id, ioapic_ver, IO_APIC_ADDR); + smp_write_ioapic(mc, ioapic_id, ioapic_ver, VIO_APIC_VADDR); /* PIC IRQ routine */ for (byte = 0x0; byte < sizeof(picr_data); byte ++) { diff --git a/src/mainboard/asus/k8v-x/mptable.c b/src/mainboard/asus/k8v-x/mptable.c index 794194c297..59ff9aad56 100644 --- a/src/mainboard/asus/k8v-x/mptable.c +++ b/src/mainboard/asus/k8v-x/mptable.c @@ -38,8 +38,8 @@ static void *smp_write_config_table(void *v) mptable_write_buses(mc, NULL, &bus_isa); /* I/O APICs: APIC ID Version State Address */ - smp_write_ioapic(mc, VT8237R_APIC_ID, 0x20, IO_APIC_ADDR); - smp_write_ioapic(mc, K8T890_APIC_ID, 0x20, K8T890_APIC_BASE); + smp_write_ioapic(mc, VT8237R_APIC_ID, 0x20, VIO_APIC_VADDR); + smp_write_ioapic(mc, K8T890_APIC_ID, 0x20, (void *)K8T890_APIC_BASE); mptable_add_isa_interrupts(mc, bus_isa, VT8237R_APIC_ID, 0); diff --git a/src/mainboard/asus/kfsn4-dre/mptable.c b/src/mainboard/asus/kfsn4-dre/mptable.c index 46ae594081..6487a431cc 100644 --- a/src/mainboard/asus/kfsn4-dre/mptable.c +++ b/src/mainboard/asus/kfsn4-dre/mptable.c @@ -62,7 +62,8 @@ static void *smp_write_config_table(void *v) if (dev) { res = find_resource(dev, PCI_BASE_ADDRESS_1); if (res) { - smp_write_ioapic(mc, apicid_ck804, 0x11, res->base); + smp_write_ioapic(mc, apicid_ck804, 0x11, + res2mmio(res, 0, 0)); } /* Initialize interrupt mapping. */ diff --git a/src/mainboard/asus/m2n-e/mptable.c b/src/mainboard/asus/m2n-e/mptable.c index 333ec495f4..824ee3113b 100644 --- a/src/mainboard/asus/m2n-e/mptable.c +++ b/src/mainboard/asus/m2n-e/mptable.c @@ -56,7 +56,8 @@ static void *smp_write_config_table(void *v) if (dev) { res = find_resource(dev, PCI_BASE_ADDRESS_1); if (res) - smp_write_ioapic(mc, apicid_mcp55, 0x11, res->base); + smp_write_ioapic(mc, apicid_mcp55, 0x11, + res2mmio(res, 0, 0)); pci_write_config32(dev, 0x7c, 0x00000000); pci_write_config32(dev, 0x80, 0x11002009); diff --git a/src/mainboard/asus/m2v/mptable.c b/src/mainboard/asus/m2v/mptable.c index b74a1e36c3..22c66131de 100644 --- a/src/mainboard/asus/m2v/mptable.c +++ b/src/mainboard/asus/m2v/mptable.c @@ -48,8 +48,8 @@ static void *smp_write_config_table(void *v) mptable_write_buses(mc, NULL, &bus_isa); /* I/O APICs: APIC ID Version State Address */ - smp_write_ioapic(mc, VT8237R_APIC_ID, 0x3, IO_APIC_ADDR); - smp_write_ioapic(mc, K8T890_APIC_ID, 0x3, K8T890_APIC_BASE); + smp_write_ioapic(mc, VT8237R_APIC_ID, 0x3, VIO_APIC_VADDR); + smp_write_ioapic(mc, K8T890_APIC_ID, 0x3, (void*)K8T890_APIC_BASE); mptable_add_isa_interrupts(mc, bus_isa, VT8237R_APIC_ID, 0); diff --git a/src/mainboard/asus/m4a78-em/mptable.c b/src/mainboard/asus/m4a78-em/mptable.c index 11426c2343..678610393c 100644 --- a/src/mainboard/asus/m4a78-em/mptable.c +++ b/src/mainboard/asus/m4a78-em/mptable.c @@ -59,7 +59,8 @@ static void *smp_write_config_table(void *v) PCI_DEVFN(sbdn_sb700 + 0x14, 0)); if (dev) { dword = pci_read_config32(dev, 0x74) & 0xfffffff0; - smp_write_ioapic(mc, apicid_sb700, 0x11, dword); + smp_write_ioapic(mc, apicid_sb700, + 0x11,(void *) dword); /* Initialize interrupt mapping */ /* aza */ diff --git a/src/mainboard/asus/m4a785-m/mptable.c b/src/mainboard/asus/m4a785-m/mptable.c index 11426c2343..678610393c 100644 --- a/src/mainboard/asus/m4a785-m/mptable.c +++ b/src/mainboard/asus/m4a785-m/mptable.c @@ -59,7 +59,8 @@ static void *smp_write_config_table(void *v) PCI_DEVFN(sbdn_sb700 + 0x14, 0)); if (dev) { dword = pci_read_config32(dev, 0x74) & 0xfffffff0; - smp_write_ioapic(mc, apicid_sb700, 0x11, dword); + smp_write_ioapic(mc, apicid_sb700, + 0x11,(void *) dword); /* Initialize interrupt mapping */ /* aza */ diff --git a/src/mainboard/asus/m5a88-v/mptable.c b/src/mainboard/asus/m5a88-v/mptable.c index 5259dec77f..4d6bb221c3 100644 --- a/src/mainboard/asus/m5a88-v/mptable.c +++ b/src/mainboard/asus/m5a88-v/mptable.c @@ -62,7 +62,7 @@ static void *smp_write_config_table(void *v) /* I/O APICs: APIC ID Version State Address */ ReadPMIO(SB_PMIOA_REG34, AccWidthUint32, &dword); dword &= 0xFFFFFFF0; - smp_write_ioapic(mc, apicid_sb800, 0x11, dword); + smp_write_ioapic(mc, apicid_sb800, 0x11,(void *) dword); for (byte = 0x0; byte < sizeof(intr_data); byte ++) { outb(byte | 0x80, 0xC00); diff --git a/src/mainboard/asus/p2b-d/mptable.c b/src/mainboard/asus/p2b-d/mptable.c index 51d00a35dd..ef9301e93e 100644 --- a/src/mainboard/asus/p2b-d/mptable.c +++ b/src/mainboard/asus/p2b-d/mptable.c @@ -40,7 +40,7 @@ static void *smp_write_config_table(void *v) ioapic_id = 2; ioapic_ver = 0x11; /* External Intel 82093AA IOAPIC. */ - smp_write_ioapic(mc, ioapic_id, ioapic_ver, IO_APIC_ADDR); + smp_write_ioapic(mc, ioapic_id, ioapic_ver, VIO_APIC_VADDR); /* Legacy Interrupts */ mptable_add_isa_interrupts(mc, isa_bus, ioapic_id, 0); diff --git a/src/mainboard/asus/p2b-ds/mptable.c b/src/mainboard/asus/p2b-ds/mptable.c index ee3c20e1b6..359c810507 100644 --- a/src/mainboard/asus/p2b-ds/mptable.c +++ b/src/mainboard/asus/p2b-ds/mptable.c @@ -40,7 +40,7 @@ static void *smp_write_config_table(void *v) ioapic_id = 2; ioapic_ver = 0x11; /* External Intel 82093AA IOAPIC. */ - smp_write_ioapic(mc, ioapic_id, ioapic_ver, IO_APIC_ADDR); + smp_write_ioapic(mc, ioapic_id, ioapic_ver, VIO_APIC_VADDR); /* Legacy Interrupts */ mptable_add_isa_interrupts(mc, isa_bus, ioapic_id, 0); |