mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 09:50:53 +07:00
sh: IPR/INTC2 IRQ setup consolidation.
This patch unifies the cpu specific interrupt setup functions for interrupt controller blocks such as ipr, intc2 and intc. There is no point in having separate functions for each interrupt controller, so let's clean this up. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
493a358e0a
commit
90015c8938
@ -88,7 +88,7 @@ static struct ipr_desc ipr_irq_desc = {
|
||||
},
|
||||
};
|
||||
|
||||
void __init init_IRQ_ipr(void)
|
||||
void __init plat_irq_setup(void)
|
||||
{
|
||||
register_ipr_controller(&ipr_irq_desc);
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ static struct ipr_desc ipr_irq_desc = {
|
||||
},
|
||||
};
|
||||
|
||||
void __init init_IRQ_ipr(void)
|
||||
void __init plat_irq_setup(void)
|
||||
{
|
||||
register_ipr_controller(&ipr_irq_desc);
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ static struct ipr_desc ipr_irq_desc = {
|
||||
},
|
||||
};
|
||||
|
||||
void __init init_IRQ_ipr(void)
|
||||
void __init plat_irq_setup(void)
|
||||
{
|
||||
register_ipr_controller(&ipr_irq_desc);
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ static struct ipr_desc ipr_irq_desc = {
|
||||
},
|
||||
};
|
||||
|
||||
void __init init_IRQ_ipr(void)
|
||||
void __init plat_irq_setup(void)
|
||||
{
|
||||
register_ipr_controller(&ipr_irq_desc);
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ static struct ipr_desc ipr_irq_desc = {
|
||||
},
|
||||
};
|
||||
|
||||
void __init init_IRQ_ipr(void)
|
||||
void __init plat_irq_setup(void)
|
||||
{
|
||||
register_ipr_controller(&ipr_irq_desc);
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ static struct ipr_desc ipr_irq_desc_sh7751 = {
|
||||
};
|
||||
#endif
|
||||
|
||||
void __init init_IRQ_ipr(void)
|
||||
void __init plat_irq_setup(void)
|
||||
{
|
||||
register_ipr_controller(&ipr_irq_desc);
|
||||
#ifdef CONFIG_CPU_SUBTYPE_SH7751
|
||||
|
@ -109,11 +109,6 @@ static struct intc2_desc intc2_irq_desc __read_mostly = {
|
||||
},
|
||||
};
|
||||
|
||||
void __init init_IRQ_intc2(void)
|
||||
{
|
||||
register_intc2_controller(&intc2_irq_desc);
|
||||
}
|
||||
|
||||
static struct ipr_data ipr_irq_table[] = {
|
||||
/* IRQ, IPR-idx, shift, priority */
|
||||
{ 16, 0, 12, 2 }, /* TMU0 TUNI*/
|
||||
@ -163,7 +158,8 @@ static struct ipr_desc ipr_irq_desc = {
|
||||
},
|
||||
};
|
||||
|
||||
void __init init_IRQ_ipr(void)
|
||||
void __init plat_irq_setup(void)
|
||||
{
|
||||
register_intc2_controller(&intc2_irq_desc);
|
||||
register_ipr_controller(&ipr_irq_desc);
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ static struct intc_sense_reg sense_registers[] = {
|
||||
static DECLARE_INTC_DESC(intc_desc, "sh7722", vectors, groups, priorities,
|
||||
mask_registers, prio_registers, sense_registers);
|
||||
|
||||
void __init init_IRQ_ipr(void)
|
||||
void __init plat_irq_setup(void)
|
||||
{
|
||||
register_intc_controller(&intc_desc);
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ static struct intc2_desc intc2_irq_desc __read_mostly = {
|
||||
},
|
||||
};
|
||||
|
||||
void __init init_IRQ_intc2(void)
|
||||
void __init plat_irq_setup(void)
|
||||
{
|
||||
register_intc2_controller(&intc2_irq_desc);
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ static struct intc2_desc intc2_irq_desc __read_mostly = {
|
||||
},
|
||||
};
|
||||
|
||||
void __init init_IRQ_intc2(void)
|
||||
void __init plat_irq_setup(void)
|
||||
{
|
||||
register_intc2_controller(&intc2_irq_desc);
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ static struct intc2_desc intc2_irq_desc __read_mostly = {
|
||||
},
|
||||
};
|
||||
|
||||
void __init init_IRQ_intc2(void)
|
||||
void __init plat_irq_setup(void)
|
||||
{
|
||||
register_intc2_controller(&intc2_irq_desc);
|
||||
}
|
||||
|
@ -253,14 +253,7 @@ void __init init_IRQ(void)
|
||||
#ifdef CONFIG_CPU_HAS_PINT_IRQ
|
||||
init_IRQ_pint();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_HAS_INTC2_IRQ
|
||||
init_IRQ_intc2();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_HAS_IPR_IRQ
|
||||
init_IRQ_ipr();
|
||||
#endif
|
||||
plat_irq_setup();
|
||||
|
||||
/* Perform the machine specific initialisation */
|
||||
if (sh_mv.mv_init_irq)
|
||||
|
@ -23,7 +23,6 @@ struct intc2_desc {
|
||||
};
|
||||
|
||||
void register_intc2_controller(struct intc2_desc *);
|
||||
void init_IRQ_intc2(void);
|
||||
|
||||
struct ipr_data {
|
||||
unsigned char irq;
|
||||
@ -41,7 +40,6 @@ struct ipr_desc {
|
||||
};
|
||||
|
||||
void register_ipr_controller(struct ipr_desc *);
|
||||
void init_IRQ_ipr(void);
|
||||
|
||||
/*
|
||||
* Enable individual interrupt mode for external IPR IRQs.
|
||||
@ -115,4 +113,6 @@ struct intc_desc symbol = { \
|
||||
|
||||
void __init register_intc_controller(struct intc_desc *desc);
|
||||
|
||||
void __init plat_irq_setup(void);
|
||||
|
||||
#endif /* __ASM_SH_HW_IRQ_H */
|
||||
|
Loading…
Reference in New Issue
Block a user