mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 14:41:31 +00:00
dm: x86: Add a common PIRQ init function
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@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
12d6929e1f
commit
d3b884b294
2 changed files with 13 additions and 1 deletions
|
@ -231,7 +231,7 @@ static int create_pirq_routing_table(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int irq_router_probe(struct udevice *dev)
|
int irq_router_common_init(struct udevice *dev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -249,6 +249,11 @@ int irq_router_probe(struct udevice *dev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int irq_router_probe(struct udevice *dev)
|
||||||
|
{
|
||||||
|
return irq_router_common_init(dev);
|
||||||
|
}
|
||||||
|
|
||||||
u32 write_pirq_routing_table(u32 addr)
|
u32 write_pirq_routing_table(u32 addr)
|
||||||
{
|
{
|
||||||
if (!pirq_routing_table)
|
if (!pirq_routing_table)
|
||||||
|
|
|
@ -65,4 +65,11 @@ struct pirq_routing {
|
||||||
*/
|
*/
|
||||||
void cpu_irq_init(void);
|
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_ */
|
#endif /* _ARCH_IRQ_H_ */
|
||||||
|
|
Loading…
Add table
Reference in a new issue