return 0;
}
-void pirq_init(void)
+int pirq_init(void)
{
+ int ret;
+
cpu_irq_init();
- if (create_pirq_routing_table()) {
+ ret = create_pirq_routing_table();
+ if (ret) {
debug("Failed to create pirq routing table\n");
- } else {
- /* Route PIRQ */
- pirq_route_irqs(pirq_routing_table->slots,
- get_irq_slot_count(pirq_routing_table));
+ return ret;
}
+ /* Route PIRQ */
+ pirq_route_irqs(pirq_routing_table->slots,
+ get_irq_slot_count(pirq_routing_table));
+
+ return 0;
}
u32 write_pirq_routing_table(u32 addr)
*
* This initializes the PIRQ routing on the platform and configures all PCI
* devices' interrupt line register to a working IRQ number on the 8259 PIC.
+ *
+ * @return 0 if OK, -ve on error
*/
-void pirq_init(void);
+int pirq_init(void);
#endif /* _ARCH_IRQ_H_ */