diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2008-03-08 19:14:42 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2008-03-08 19:14:42 +0000 |
commit | c4f536568833fb7b0052a2eda63dd39f05885978 (patch) | |
tree | 58224bd442ed4f1a863990e3b1173e00fea16d1d /src/mainboard/asus/a8v-e_se/acpi_tables.c | |
parent | 917158f8031dc2595a7e066ac848684cc2fac9cc (diff) |
Various cosmetic and coding style fixes for ASUS A8V-E SE (trivial).
No functional changes, only cosmetics. This is compile-tested.
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3128 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/asus/a8v-e_se/acpi_tables.c')
-rw-r--r-- | src/mainboard/asus/a8v-e_se/acpi_tables.c | 52 |
1 files changed, 23 insertions, 29 deletions
diff --git a/src/mainboard/asus/a8v-e_se/acpi_tables.c b/src/mainboard/asus/a8v-e_se/acpi_tables.c index fa76d401f6..86fee0c99a 100644 --- a/src/mainboard/asus/a8v-e_se/acpi_tables.c +++ b/src/mainboard/asus/a8v-e_se/acpi_tables.c @@ -1,6 +1,7 @@ /* * This file is part of the coreboot project. - * written by Stefan Reinauer <stepan@openbios.org> + * + * Written by Stefan Reinauer <stepan@openbios.org>. * ACPI FADT, FACS, and DSDT table support added by * * Copyright (C) 2004 Stefan Reinauer <stepan@openbios.org> @@ -27,7 +28,6 @@ #include <arch/smp/mpspec.h> #include <device/device.h> #include <device/pci_ids.h> - #include <../../../southbridge/via/vt8237r/vt8237r.h> #include <../../../southbridge/via/k8t890/k8t890.h> @@ -37,6 +37,7 @@ unsigned long acpi_fill_mcfg(unsigned long current) { device_t dev; struct resource *res; + dev = dev_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_K8T890CE_5, 0); if (!dev) return current; @@ -53,36 +54,32 @@ unsigned long acpi_fill_madt(unsigned long current) { unsigned int gsi_base = 0x18; - /* create all subtables for processors */ + /* Create all subtables for processors. */ current = acpi_create_madt_lapics(current); - /* Write SB IOAPIC */ - current += - acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, VT8237R_APIC_ID, - VT8237R_APIC_BASE, 0); + /* Write SB IOAPIC. */ + current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, + VT8237R_APIC_ID, VT8237R_APIC_BASE, 0); - /* Write NB IOAPIC */ - current += - acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, K8T890_APIC_ID, - K8T890_APIC_BASE, gsi_base); - /* IRQ9 ACPI active low */ + /* Write NB IOAPIC. */ + current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, + K8T890_APIC_ID, K8T890_APIC_BASE, gsi_base); + + /* IRQ9 ACPI active low. */ current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) - current, 0, 9, 9, MP_IRQ_TRIGGER_LEVEL | MP_IRQ_POLARITY_LOW); + current, 0, 9, 9, MP_IRQ_TRIGGER_LEVEL | MP_IRQ_POLARITY_LOW); - /* IRQ0 -> APIC IRQ2 */ + /* IRQ0 -> APIC IRQ2. */ current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) current, 0, 0, 2, 0x0); - /* create all subtables for processors */ - current = - acpi_create_madt_lapic_nmis(current, - MP_IRQ_TRIGGER_EDGE | - MP_IRQ_POLARITY_HIGH, 1); + /* Create all subtables for processors. */ + current = acpi_create_madt_lapic_nmis(current, + MP_IRQ_TRIGGER_EDGE | MP_IRQ_POLARITY_HIGH, 1); return current; } - unsigned long write_acpi_tables(unsigned long start) { unsigned long current; @@ -96,27 +93,25 @@ unsigned long write_acpi_tables(unsigned long start) acpi_facs_t *facs; acpi_header_t *dsdt; - /* Align ACPI tables to 16byte */ + /* Align ACPI tables to 16 byte. */ start = (start + 0x0f) & -0x10; current = start; printk_info("ACPI: Writing ACPI tables at %lx...\n", start); - /* We need at least an RSDP and an RSDT Table */ + /* We need at least an RSDP and an RSDT table. */ rsdp = (acpi_rsdp_t *) current; current += sizeof(acpi_rsdp_t); rsdt = (acpi_rsdt_t *) current; current += sizeof(acpi_rsdt_t); - /* clear all table memory */ + /* Clear all table memory. */ memset((void *) start, 0, current - start); acpi_write_rsdp(rsdp, rsdt); acpi_write_rsdt(rsdt); - /* - * We explicitly add these tables later on: - */ + /* We explicitly add these tables later on: */ printk_debug("ACPI: * FACS\n"); facs = (acpi_facs_t *) current; current += sizeof(acpi_facs_t); @@ -126,7 +121,7 @@ unsigned long write_acpi_tables(unsigned long start) current += ((acpi_header_t *) AmlCode)->length; memcpy((void *) dsdt, (void *) AmlCode, ((acpi_header_t *) AmlCode)->length); - dsdt->checksum = 0; // don't trust intel iasl compiler to get this right + dsdt->checksum = 0; /* Don't trust iasl to get this right. */ dsdt->checksum = acpi_checksum(dsdt, dsdt->length); printk_debug("ACPI: * DSDT @ %08x Length %x\n", dsdt, dsdt->length); @@ -144,7 +139,7 @@ unsigned long write_acpi_tables(unsigned long start) acpi_create_hpet(hpet); acpi_add_table(rsdt, hpet); - /* If we want to use HPET Timers Linux wants an MADT */ + /* If we want to use HPET timers Linux wants an MADT. */ printk_debug("ACPI: * MADT\n"); madt = (acpi_madt_t *) current; acpi_create_madt(madt); @@ -157,7 +152,6 @@ unsigned long write_acpi_tables(unsigned long start) current += mcfg->header.length; acpi_add_table(rsdt, mcfg); - /* SRAT */ printk_debug("ACPI: * SRAT\n"); srat = (acpi_srat_t *) current; acpi_create_srat(srat); |