[U-Boot] [PATCH v3 3/8] dm: x86: Add a common PIRQ init function
Simon Glass
sjg at chromium.org
Wed Jan 20 05:32:27 CET 2016
Most x86 interrupt drivers will want to use the standard PIRQ routing and
table setup. Put this code in a common function so it can be used by those
drivers that want it.
Signed-off-by: Simon Glass <sjg at chromium.org>
Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
---
Changes in v3: None
Changes in v2: None
arch/x86/cpu/irq.c | 7 ++++++-
arch/x86/include/asm/irq.h | 7 +++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/arch/x86/cpu/irq.c b/arch/x86/cpu/irq.c
index 8f59b23..e2feba7 100644
--- a/arch/x86/cpu/irq.c
+++ b/arch/x86/cpu/irq.c
@@ -231,7 +231,7 @@ static int create_pirq_routing_table(void)
return 0;
}
-int irq_router_probe(struct udevice *dev)
+int irq_router_common_init(struct udevice *dev)
{
int ret;
@@ -249,6 +249,11 @@ int irq_router_probe(struct udevice *dev)
return 0;
}
+int irq_router_probe(struct udevice *dev)
+{
+ return irq_router_common_init(dev);
+}
+
u32 write_pirq_routing_table(u32 addr)
{
if (!pirq_routing_table)
diff --git a/arch/x86/include/asm/irq.h b/arch/x86/include/asm/irq.h
index 74da66e..46e1c31 100644
--- a/arch/x86/include/asm/irq.h
+++ b/arch/x86/include/asm/irq.h
@@ -65,4 +65,11 @@ struct pirq_routing {
*/
void cpu_irq_init(void);
+/**
+ * irq_router_common_init() - Perform common x86 interrupt init
+ *
+ * This creates the PIRQ routing table and routes the IRQs
+ */
+int irq_router_common_init(struct udevice *dev);
+
#endif /* _ARCH_IRQ_H_ */
--
2.7.0.rc3.207.g0ac5344
More information about the U-Boot
mailing list