aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common/it8152.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/arm/common/it8152.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'arch/arm/common/it8152.c')
-rw-r--r--arch/arm/common/it8152.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c
index 1bec96e85196..7a21927c52e1 100644
--- a/arch/arm/common/it8152.c
+++ b/arch/arm/common/it8152.c
@@ -31,8 +31,10 @@
31 31
32#define MAX_SLOTS 21 32#define MAX_SLOTS 21
33 33
34static void it8152_mask_irq(unsigned int irq) 34static void it8152_mask_irq(struct irq_data *d)
35{ 35{
36 unsigned int irq = d->irq;
37
36 if (irq >= IT8152_LD_IRQ(0)) { 38 if (irq >= IT8152_LD_IRQ(0)) {
37 __raw_writel((__raw_readl(IT8152_INTC_LDCNIMR) | 39 __raw_writel((__raw_readl(IT8152_INTC_LDCNIMR) |
38 (1 << (irq - IT8152_LD_IRQ(0)))), 40 (1 << (irq - IT8152_LD_IRQ(0)))),
@@ -48,8 +50,10 @@ static void it8152_mask_irq(unsigned int irq)
48 } 50 }
49} 51}
50 52
51static void it8152_unmask_irq(unsigned int irq) 53static void it8152_unmask_irq(struct irq_data *d)
52{ 54{
55 unsigned int irq = d->irq;
56
53 if (irq >= IT8152_LD_IRQ(0)) { 57 if (irq >= IT8152_LD_IRQ(0)) {
54 __raw_writel((__raw_readl(IT8152_INTC_LDCNIMR) & 58 __raw_writel((__raw_readl(IT8152_INTC_LDCNIMR) &
55 ~(1 << (irq - IT8152_LD_IRQ(0)))), 59 ~(1 << (irq - IT8152_LD_IRQ(0)))),
@@ -67,9 +71,9 @@ static void it8152_unmask_irq(unsigned int irq)
67 71
68static struct irq_chip it8152_irq_chip = { 72static struct irq_chip it8152_irq_chip = {
69 .name = "it8152", 73 .name = "it8152",
70 .ack = it8152_mask_irq, 74 .irq_ack = it8152_mask_irq,
71 .mask = it8152_mask_irq, 75 .irq_mask = it8152_mask_irq,
72 .unmask = it8152_unmask_irq, 76 .irq_unmask = it8152_unmask_irq,
73}; 77};
74 78
75void it8152_init_irq(void) 79void it8152_init_irq(void)
@@ -84,8 +88,8 @@ void it8152_init_irq(void)
84 __raw_writel((0), IT8152_INTC_LDCNIRR); 88 __raw_writel((0), IT8152_INTC_LDCNIRR);
85 89
86 for (irq = IT8152_IRQ(0); irq <= IT8152_LAST_IRQ; irq++) { 90 for (irq = IT8152_IRQ(0); irq <= IT8152_LAST_IRQ; irq++) {
87 set_irq_chip(irq, &it8152_irq_chip); 91 irq_set_chip_and_handler(irq, &it8152_irq_chip,
88 set_irq_handler(irq, handle_level_irq); 92 handle_level_irq);
89 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); 93 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
90 } 94 }
91} 95}
@@ -236,7 +240,7 @@ static struct resource it8152_mem = {
236 240
237/* 241/*
238 * The following functions are needed for DMA bouncing. 242 * The following functions are needed for DMA bouncing.
239 * ITE8152 chip can addrees up to 64MByte, so all the devices 243 * ITE8152 chip can address up to 64MByte, so all the devices
240 * connected to ITE8152 (PCI and USB) should have limited DMA window 244 * connected to ITE8152 (PCI and USB) should have limited DMA window
241 */ 245 */
242 246
@@ -352,3 +356,4 @@ struct pci_bus * __init it8152_pci_scan_bus(int nr, struct pci_sys_data *sys)
352 return pci_scan_bus(nr, &it8152_ops, sys); 356 return pci_scan_bus(nr, &it8152_ops, sys);
353} 357}
354 358
359EXPORT_SYMBOL(dma_set_coherent_mask);