aboutsummaryrefslogtreecommitdiff
path: root/src/arch/i386/boot/pirq_routing.c
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-02-22 06:09:43 +0000
committerStefan Reinauer <stepan@openbios.org>2010-02-22 06:09:43 +0000
commitde3206a7bebce99f11e753164cc4d46357bba96a (patch)
tree9843d883940e372dd357b1357ecd7eaba3e3365f /src/arch/i386/boot/pirq_routing.c
parentd650e9934ff8da9b9cb69e42e642c0ee6d390bf6 (diff)
This is a general cleanup patch
- drop include/part and move files to include/ - get rid lots of warnings - make resource allocator happy with w83627thg - trivial cbmem resume fix - fix payload and log level settings in abuild - fix kontron mptable for virtual wire mode - drop some dead includes and dead code. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5136 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch/i386/boot/pirq_routing.c')
-rw-r--r--src/arch/i386/boot/pirq_routing.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/arch/i386/boot/pirq_routing.c b/src/arch/i386/boot/pirq_routing.c
index 0d852c53b9..78e1dd1806 100644
--- a/src/arch/i386/boot/pirq_routing.c
+++ b/src/arch/i386/boot/pirq_routing.c
@@ -3,7 +3,11 @@
#include <string.h>
#include <device/pci.h>
-#if (CONFIG_DEBUG==1 && CONFIG_GENERATE_PIRQ_TABLE==1)
+#ifndef CONFIG_IRQ_SLOT_COUNT
+#warning "CONFIG_IRQ_SLOT_COUNT is not defined. PIRQ won't work correctly."
+#endif
+
+#if CONFIG_DEBUG
static void check_pirq_routing_table(struct irq_routing_table *rt)
{
uint8_t *addr = (uint8_t *)rt;
@@ -12,7 +16,6 @@ static void check_pirq_routing_table(struct irq_routing_table *rt)
printk_info("Checking Interrupt Routing Table consistency...\n");
-#if defined(CONFIG_IRQ_SLOT_COUNT)
if (sizeof(struct irq_routing_table) != rt->size) {
printk_warning("Inconsistent Interrupt Routing Table size (0x%x/0x%x).\n",
sizeof(struct irq_routing_table),
@@ -20,7 +23,6 @@ static void check_pirq_routing_table(struct irq_routing_table *rt)
);
rt->size=sizeof(struct irq_routing_table);
}
-#endif
for (i = 0; i < rt->size; i++)
sum += addr[i];
@@ -79,11 +81,8 @@ static int verify_copy_pirq_routing_table(unsigned long addr)
return 0;
}
-#else
-#define verify_copy_pirq_routing_table(addr)
#endif
-#if CONFIG_GENERATE_PIRQ_TABLE==1
unsigned long copy_pirq_routing_table(unsigned long addr)
{
/* Align the table to be 16 byte aligned. */
@@ -98,9 +97,8 @@ unsigned long copy_pirq_routing_table(unsigned long addr)
pirq_routing_irqs(addr);
return addr + intel_irq_routing_table.size;
}
-#endif
-#if (CONFIG_PIRQ_ROUTE==1 && CONFIG_GENERATE_PIRQ_TABLE==1)
+#if CONFIG_PIRQ_ROUTE
void pirq_routing_irqs(unsigned long addr)
{
int i, j, k, num_entries;