summaryrefslogtreecommitdiff
path: root/src/arch/x86/pirq_routing.c
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2017-06-01 11:39:59 -0600
committerMartin Roth <martinroth@google.com>2017-07-07 16:05:16 +0000
commit898a77521de97b1e4af9458b82bcc21bc7a6e799 (patch)
tree4565d11cc5bbed7729b580424006e1745dc0cfc9 /src/arch/x86/pirq_routing.c
parent50bda05e46d5f34f6519a7814e843d1e777ecf10 (diff)
arch/*: Update Kconfig symbol usage
- Update all symbols to use IS_ENABLED() - Update non-romcc usage to use 'if' instead of '#if' where it makes sense. Change-Id: I5a84414d2d1631e35ac91efb67a0d4c1f673bf85 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/20005 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/arch/x86/pirq_routing.c')
-rw-r--r--src/arch/x86/pirq_routing.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/arch/x86/pirq_routing.c b/src/arch/x86/pirq_routing.c
index 405dad0ed4..892201e57c 100644
--- a/src/arch/x86/pirq_routing.c
+++ b/src/arch/x86/pirq_routing.c
@@ -18,8 +18,12 @@
#include <arch/pirq_routing.h>
#include <string.h>
#include <device/pci.h>
+#include <arch/pirq_routing.h>
+
+void __attribute__((weak)) pirq_assign_irqs(const unsigned char pirq[CONFIG_MAX_PIRQ_LINKS])
+{
+}
-#if CONFIG_DEBUG_PIRQ
static void check_pirq_routing_table(struct irq_routing_table *rt)
{
uint8_t *addr = (uint8_t *)rt;
@@ -97,9 +101,7 @@ static int verify_copy_pirq_routing_table(unsigned long addr,
return 0;
}
-#endif
-#if CONFIG_PIRQ_ROUTE
static u8 pirq_get_next_free_irq(u8 *pirq, u16 bitmap)
{
int i, link;
@@ -185,7 +187,6 @@ static void pirq_route_irqs(unsigned long addr)
pirq_assign_irqs(pirq);
}
-#endif
unsigned long copy_pirq_routing_table(unsigned long addr,
const struct irq_routing_table *routing_table)
@@ -198,11 +199,10 @@ unsigned long copy_pirq_routing_table(unsigned long addr,
addr);
memcpy((void *)addr, routing_table, routing_table->size);
printk(BIOS_INFO, "done.\n");
-#if CONFIG_DEBUG_PIRQ
- verify_copy_pirq_routing_table(addr, routing_table);
-#endif
-#if CONFIG_PIRQ_ROUTE
- pirq_route_irqs(addr);
-#endif
+ if (IS_ENABLED(CONFIG_DEBUG_PIRQ))
+ verify_copy_pirq_routing_table(addr, routing_table);
+ if (IS_ENABLED(CONFIG_PIRQ_ROUTE))
+ pirq_route_irqs(addr);
+
return addr + routing_table->size;
}