summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorJonathan A. Kollasch <jakllsch@kollasch.net>2013-10-11 13:50:04 -0500
committerJonathan A. Kollasch <jakllsch@kollasch.net>2013-10-12 16:13:59 +0200
commit8ad6e78778b036cf2c9bc455376a8599e0bcb759 (patch)
treebcd7b8f1c0858eaa30d03062b153d11424c7be89 /src/mainboard
parent4f9bf7e2fb7035725c2899db0d00d77007d9113c (diff)
Nvidia boards: acpi_tables.c: Remove intermediate variable in ACPI interrupt routing initialization
Change-Id: I6cb4ad5ea5ad40284f8e88ff440f2605d3b83359 Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net> Reviewed-on: http://review.coreboot.org/3959 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/msi/ms7135/acpi_tables.c14
-rw-r--r--src/mainboard/tyan/s2891/acpi_tables.c18
-rw-r--r--src/mainboard/tyan/s2892/acpi_tables.c18
-rw-r--r--src/mainboard/tyan/s2895/acpi_tables.c36
4 files changed, 23 insertions, 63 deletions
diff --git a/src/mainboard/msi/ms7135/acpi_tables.c b/src/mainboard/msi/ms7135/acpi_tables.c
index 6bd3183acb..da4ef8d30d 100644
--- a/src/mainboard/msi/ms7135/acpi_tables.c
+++ b/src/mainboard/msi/ms7135/acpi_tables.c
@@ -65,17 +65,9 @@ unsigned long acpi_fill_madt(unsigned long current)
/* Initialize interrupt mapping if mptable.c didn't. */
#if (!CONFIG_GENERATE_MP_TABLE)
#error untested config
- {
- u32 dword;
- dword = 0x0120d218;
- pci_write_config32(dev, 0x7c, dword);
-
- dword = 0x12008a00;
- pci_write_config32(dev, 0x80, dword);
-
- dword = 0x0000007d;
- pci_write_config32(dev, 0x84, dword);
- }
+ pci_write_config32(dev, 0x7c, 0x0120d218);
+ pci_write_config32(dev, 0x80, 0x12008a00);
+ pci_write_config32(dev, 0x84, 0x0000007d);
#endif
}
diff --git a/src/mainboard/tyan/s2891/acpi_tables.c b/src/mainboard/tyan/s2891/acpi_tables.c
index d3cb214aac..890e239560 100644
--- a/src/mainboard/tyan/s2891/acpi_tables.c
+++ b/src/mainboard/tyan/s2891/acpi_tables.c
@@ -43,19 +43,11 @@ unsigned long acpi_fill_madt(unsigned long current)
current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, 4,
apic_addr, 0);
/* Initialize interrupt mapping if mptable.c didn't. */
- #if (!CONFIG_GENERATE_MP_TABLE)
- {
- u32 dword;
- dword = 0x0120d218;
- pci_write_config32(dev, 0x7c, dword);
-
- dword = 0x12008a00;
- pci_write_config32(dev, 0x80, dword);
-
- dword = 0x0000007d;
- pci_write_config32(dev, 0x84, dword);
- }
- #endif
+#if (!CONFIG_GENERATE_MP_TABLE)
+ pci_write_config32(dev, 0x7c, 0x0120d218);
+ pci_write_config32(dev, 0x80, 0x12008a00);
+ pci_write_config32(dev, 0x84, 0x0000007d);
+#endif
}
/* Write AMD 8131 two IOAPICs. */
diff --git a/src/mainboard/tyan/s2892/acpi_tables.c b/src/mainboard/tyan/s2892/acpi_tables.c
index d3cb214aac..890e239560 100644
--- a/src/mainboard/tyan/s2892/acpi_tables.c
+++ b/src/mainboard/tyan/s2892/acpi_tables.c
@@ -43,19 +43,11 @@ unsigned long acpi_fill_madt(unsigned long current)
current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, 4,
apic_addr, 0);
/* Initialize interrupt mapping if mptable.c didn't. */
- #if (!CONFIG_GENERATE_MP_TABLE)
- {
- u32 dword;
- dword = 0x0120d218;
- pci_write_config32(dev, 0x7c, dword);
-
- dword = 0x12008a00;
- pci_write_config32(dev, 0x80, dword);
-
- dword = 0x0000007d;
- pci_write_config32(dev, 0x84, dword);
- }
- #endif
+#if (!CONFIG_GENERATE_MP_TABLE)
+ pci_write_config32(dev, 0x7c, 0x0120d218);
+ pci_write_config32(dev, 0x80, 0x12008a00);
+ pci_write_config32(dev, 0x84, 0x0000007d);
+#endif
}
/* Write AMD 8131 two IOAPICs. */
diff --git a/src/mainboard/tyan/s2895/acpi_tables.c b/src/mainboard/tyan/s2895/acpi_tables.c
index 8f69c7006a..b7cb475315 100644
--- a/src/mainboard/tyan/s2895/acpi_tables.c
+++ b/src/mainboard/tyan/s2895/acpi_tables.c
@@ -43,19 +43,11 @@ unsigned long acpi_fill_madt(unsigned long current)
current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, 4,
apic_addr, 0);
/* Initialize interrupt mapping if mptable.c didn't. */
- #if (!CONFIG_GENERATE_MP_TABLE)
- {
- u32 dword;
- dword = 0x0120d218;
- pci_write_config32(dev, 0x7c, dword);
-
- dword = 0x12008a00;
- pci_write_config32(dev, 0x80, dword);
-
- dword = 0x00080d7d;
- pci_write_config32(dev, 0x84, dword);
- }
- #endif
+#if (!CONFIG_GENERATE_MP_TABLE)
+ pci_write_config32(dev, 0x7c, 0x0120d218);
+ pci_write_config32(dev, 0x80, 0x12008a00);
+ pci_write_config32(dev, 0x84, 0x00080d7d);
+#endif
}
/* Write AMD 8131 two IOAPICs. */
@@ -80,19 +72,11 @@ unsigned long acpi_fill_madt(unsigned long current)
current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, 7,
apic_addr, 0x20);
/* Initialize interrupt mapping if mptable.c didn't. */
- #if (!CONFIG_GENERATE_MP_TABLE)
- {
- u32 dword;
- dword = 0x0000d218; // Why does the factory BIOS have 0?
- pci_write_config32(dev, 0x7c, dword);
-
- dword = 0x00000000;
- pci_write_config32(dev, 0x80, dword);
-
- dword = 0x00000d00; // Same here.
- pci_write_config32(dev, 0x84, dword);
- }
- #endif
+#if (!CONFIG_GENERATE_MP_TABLE)
+ pci_write_config32(dev, 0x7c, 0x0000d218); // Why does the factory BIOS have 0?
+ pci_write_config32(dev, 0x80, 0x00000000);
+ pci_write_config32(dev, 0x84, 0x00000d00); // Same here.
+#endif
}
/* IRQ9 */