Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242442
b: refs/heads/master
c: 3fb8818
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner authored and Ralf Baechle committed Mar 25, 2011
1 parent fdd7d57 commit e8e7312
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 41d735e8705c5a2cffe64bc56624a4bb0519c1da
refs/heads/master: 3fb8818bd2ed2030f00678da090adff36739bf20
23 changes: 10 additions & 13 deletions trunk/arch/mips/ath79/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,41 +62,38 @@ static void ath79_misc_irq_handler(unsigned int irq, struct irq_desc *desc)
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;
u32 t;

irq -= ATH79_MISC_IRQ_BASE;

t = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
__raw_writel(t | (1 << irq), base + AR71XX_RESET_REG_MISC_INT_ENABLE);

/* flush write */
__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;
u32 t;

irq -= ATH79_MISC_IRQ_BASE;

t = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_ENABLE);
__raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_MISC_INT_ENABLE);

/* flush write */
__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;
u32 t;

irq -= ATH79_MISC_IRQ_BASE;

t = __raw_readl(base + AR71XX_RESET_REG_MISC_INT_STATUS);
__raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_MISC_INT_STATUS);

Expand All @@ -106,8 +103,8 @@ static void ar724x_misc_irq_ack(unsigned int irq)

static struct irq_chip ath79_misc_irq_chip = {
.name = "MISC",
.unmask = ar71xx_misc_irq_unmask,
.mask = ar71xx_misc_irq_mask,
.irq_unmask = ar71xx_misc_irq_unmask,
.irq_mask = ar71xx_misc_irq_mask,
};

static void __init ath79_misc_irq_init(void)
Expand All @@ -119,9 +116,9 @@ static void __init ath79_misc_irq_init(void)
__raw_writel(0, base + AR71XX_RESET_REG_MISC_INT_STATUS);

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())
ath79_misc_irq_chip.ack = ar724x_misc_irq_ack;
ath79_misc_irq_chip.irq_ack = ar724x_misc_irq_ack;
else
BUG();

Expand Down

0 comments on commit e8e7312

Please sign in to comment.