Skip to content

Commit

Permalink
ARM: pxa: avoid accessing interrupt registers directly
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Miao <[email protected]>
  • Loading branch information
ericmiao committed Jul 12, 2011
1 parent 9c86441 commit 5d284e3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 36 deletions.
7 changes: 7 additions & 0 deletions arch/arm/mach-pxa/include/mach/irqs.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,11 @@

#define NR_IRQS (IRQ_BOARD_START)

#ifndef __ASSEMBLY__
struct irq_data;

void pxa_mask_irq(struct irq_data *);
void pxa_unmask_irq(struct irq_data *);
#endif

#endif /* __ASM_MACH_IRQS_H */
30 changes: 0 additions & 30 deletions arch/arm/mach-pxa/include/mach/regs-intc.h

This file was deleted.

4 changes: 2 additions & 2 deletions arch/arm/mach-pxa/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static inline void __iomem *irq_base(int i)
return (void __iomem *)io_p2v(phys_base[i]);
}

static void pxa_mask_irq(struct irq_data *d)
void pxa_mask_irq(struct irq_data *d)
{
void __iomem *base = irq_data_get_irq_chip_data(d);
uint32_t icmr = __raw_readl(base + ICMR);
Expand All @@ -73,7 +73,7 @@ static void pxa_mask_irq(struct irq_data *d)
__raw_writel(icmr, base + ICMR);
}

static void pxa_unmask_irq(struct irq_data *d)
void pxa_unmask_irq(struct irq_data *d)
{
void __iomem *base = irq_data_get_irq_chip_data(d);
uint32_t icmr = __raw_readl(base + ICMR);
Expand Down
5 changes: 2 additions & 3 deletions arch/arm/mach-pxa/pxa3xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <mach/ohci.h>
#include <mach/pm.h>
#include <mach/dma.h>
#include <mach/regs-intc.h>
#include <mach/smemc.h>

#include "generic.h"
Expand Down Expand Up @@ -328,13 +327,13 @@ static void pxa_ack_ext_wakeup(struct irq_data *d)

static void pxa_mask_ext_wakeup(struct irq_data *d)
{
ICMR2 &= ~(1 << ((d->irq - PXA_IRQ(0)) & 0x1f));
pxa_mask_irq(d);
PECR &= ~PECR_IE(d->irq - IRQ_WAKEUP0);
}

static void pxa_unmask_ext_wakeup(struct irq_data *d)
{
ICMR2 |= 1 << ((d->irq - PXA_IRQ(0)) & 0x1f);
pxa_unmask_irq(d);
PECR |= PECR_IE(d->irq - IRQ_WAKEUP0);
}

Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-pxa/pxa95x.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <mach/reset.h>
#include <mach/pm.h>
#include <mach/dma.h>
#include <mach/regs-intc.h>

#include "generic.h"
#include "devices.h"
Expand Down

0 comments on commit 5d284e3

Please sign in to comment.