MIPS: ath79: Convert to new irq_chip functions
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> To: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2175/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
Родитель
41d735e870
Коммит
3fb8818bd2
|
@ -62,13 +62,12 @@ static void ath79_misc_irq_handler(unsigned int irq, struct irq_desc *desc)
|
||||||
spurious_interrupt();
|
spurious_interrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ar71xx_misc_irq_unmask(unsigned int irq)
|
static void ar71xx_misc_irq_unmask(struct irq_data *d)
|
||||||
{
|
{
|
||||||
|
unsigned int irq = d->irq - ATH79_MISC_IRQ_BASE;
|
||||||
void __iomem *base = ath79_reset_base;
|
void __iomem *base = ath79_reset_base;
|
||||||
u32 t;
|
u32 t;
|
||||||
|
|
||||||
irq -= ATH79_MISC_IRQ_BASE;
|
|
||||||
|
|
||||||
t = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
t = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
||||||
__raw_writel(t | (1 << irq), base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
__raw_writel(t | (1 << irq), base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
||||||
|
|
||||||
|
@ -76,13 +75,12 @@ static void ar71xx_misc_irq_unmask(unsigned int irq)
|
||||||
__raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
__raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ar71xx_misc_irq_mask(unsigned int irq)
|
static void ar71xx_misc_irq_mask(struct irq_data *d)
|
||||||
{
|
{
|
||||||
|
unsigned int irq = d->irq - ATH79_MISC_IRQ_BASE;
|
||||||
void __iomem *base = ath79_reset_base;
|
void __iomem *base = ath79_reset_base;
|
||||||
u32 t;
|
u32 t;
|
||||||
|
|
||||||
irq -= ATH79_MISC_IRQ_BASE;
|
|
||||||
|
|
||||||
t = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
t = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
||||||
__raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
__raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
||||||
|
|
||||||
|
@ -90,13 +88,12 @@ static void ar71xx_misc_irq_mask(unsigned int irq)
|
||||||
__raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
__raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ar724x_misc_irq_ack(unsigned int irq)
|
static void ar724x_misc_irq_ack(struct irq_data *d)
|
||||||
{
|
{
|
||||||
|
unsigned int irq = d->irq - ATH79_MISC_IRQ_BASE;
|
||||||
void __iomem *base = ath79_reset_base;
|
void __iomem *base = ath79_reset_base;
|
||||||
u32 t;
|
u32 t;
|
||||||
|
|
||||||
irq -= ATH79_MISC_IRQ_BASE;
|
|
||||||
|
|
||||||
t = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_STATUS);
|
t = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_STATUS);
|
||||||
__raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_MISC_INT_STATUS);
|
__raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_MISC_INT_STATUS);
|
||||||
|
|
||||||
|
@ -106,8 +103,8 @@ static void ar724x_misc_irq_ack(unsigned int irq)
|
||||||
|
|
||||||
static struct irq_chip ath79_misc_irq_chip = {
|
static struct irq_chip ath79_misc_irq_chip = {
|
||||||
.name = "MISC",
|
.name = "MISC",
|
||||||
.unmask = ar71xx_misc_irq_unmask,
|
.irq_unmask = ar71xx_misc_irq_unmask,
|
||||||
.mask = ar71xx_misc_irq_mask,
|
.irq_mask = ar71xx_misc_irq_mask,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void __init ath79_misc_irq_init(void)
|
static void __init ath79_misc_irq_init(void)
|
||||||
|
@ -119,9 +116,9 @@ static void __init ath79_misc_irq_init(void)
|
||||||
__raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_STATUS);
|
__raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_STATUS);
|
||||||
|
|
||||||
if (soc_is_ar71xx() || soc_is_ar913x())
|
if (soc_is_ar71xx() || soc_is_ar913x())
|
||||||
ath79_misc_irq_chip.mask_ack = ar71xx_misc_irq_mask;
|
ath79_misc_irq_chip.irq_mask_ack = ar71xx_misc_irq_mask;
|
||||||
else if (soc_is_ar724x())
|
else if (soc_is_ar724x())
|
||||||
ath79_misc_irq_chip.ack = ar724x_misc_irq_ack;
|
ath79_misc_irq_chip.irq_ack = ar724x_misc_irq_ack;
|
||||||
else
|
else
|
||||||
BUG();
|
BUG();
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче