diff options
Diffstat (limited to 'arch/sh/boards/mach-cayman/irq.c')
-rw-r--r-- | arch/sh/boards/mach-cayman/irq.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/arch/sh/boards/mach-cayman/irq.c b/arch/sh/boards/mach-cayman/irq.c index 33f770856319..d7ac5af9d102 100644 --- a/arch/sh/boards/mach-cayman/irq.c +++ b/arch/sh/boards/mach-cayman/irq.c | |||
@@ -55,8 +55,9 @@ static struct irqaction cayman_action_pci2 = { | |||
55 | .flags = IRQF_DISABLED, | 55 | .flags = IRQF_DISABLED, |
56 | }; | 56 | }; |
57 | 57 | ||
58 | static void enable_cayman_irq(unsigned int irq) | 58 | static void enable_cayman_irq(struct irq_data *data) |
59 | { | 59 | { |
60 | unsigned int irq = data->irq; | ||
60 | unsigned long flags; | 61 | unsigned long flags; |
61 | unsigned long mask; | 62 | unsigned long mask; |
62 | unsigned int reg; | 63 | unsigned int reg; |
@@ -66,14 +67,15 @@ static void enable_cayman_irq(unsigned int irq) | |||
66 | reg = EPLD_MASK_BASE + ((irq / 8) << 2); | 67 | reg = EPLD_MASK_BASE + ((irq / 8) << 2); |
67 | bit = 1<<(irq % 8); | 68 | bit = 1<<(irq % 8); |
68 | local_irq_save(flags); | 69 | local_irq_save(flags); |
69 | mask = ctrl_inl(reg); | 70 | mask = __raw_readl(reg); |
70 | mask |= bit; | 71 | mask |= bit; |
71 | ctrl_outl(mask, reg); | 72 | __raw_writel(mask, reg); |
72 | local_irq_restore(flags); | 73 | local_irq_restore(flags); |
73 | } | 74 | } |
74 | 75 | ||
75 | void disable_cayman_irq(unsigned int irq) | 76 | static void disable_cayman_irq(struct irq_data *data) |
76 | { | 77 | { |
78 | unsigned int irq = data->irq; | ||
77 | unsigned long flags; | 79 | unsigned long flags; |
78 | unsigned long mask; | 80 | unsigned long mask; |
79 | unsigned int reg; | 81 | unsigned int reg; |
@@ -83,22 +85,16 @@ void disable_cayman_irq(unsigned int irq) | |||
83 | reg = EPLD_MASK_BASE + ((irq / 8) << 2); | 85 | reg = EPLD_MASK_BASE + ((irq / 8) << 2); |
84 | bit = 1<<(irq % 8); | 86 | bit = 1<<(irq % 8); |
85 | local_irq_save(flags); | 87 | local_irq_save(flags); |
86 | mask = ctrl_inl(reg); | 88 | mask = __raw_readl(reg); |
87 | mask &= ~bit; | 89 | mask &= ~bit; |
88 | ctrl_outl(mask, reg); | 90 | __raw_writel(mask, reg); |
89 | local_irq_restore(flags); | 91 | local_irq_restore(flags); |
90 | } | 92 | } |
91 | 93 | ||
92 | static void ack_cayman_irq(unsigned int irq) | ||
93 | { | ||
94 | disable_cayman_irq(irq); | ||
95 | } | ||
96 | |||
97 | struct irq_chip cayman_irq_type = { | 94 | struct irq_chip cayman_irq_type = { |
98 | .name = "Cayman-IRQ", | 95 | .name = "Cayman-IRQ", |
99 | .unmask = enable_cayman_irq, | 96 | .irq_unmask = enable_cayman_irq, |
100 | .mask = disable_cayman_irq, | 97 | .irq_mask = disable_cayman_irq, |
101 | .mask_ack = ack_cayman_irq, | ||
102 | }; | 98 | }; |
103 | 99 | ||
104 | int cayman_irq_demux(int evt) | 100 | int cayman_irq_demux(int evt) |
@@ -109,8 +105,8 @@ int cayman_irq_demux(int evt) | |||
109 | unsigned long status; | 105 | unsigned long status; |
110 | int i; | 106 | int i; |
111 | 107 | ||
112 | status = ctrl_inl(EPLD_STATUS_BASE) & | 108 | status = __raw_readl(EPLD_STATUS_BASE) & |
113 | ctrl_inl(EPLD_MASK_BASE) & 0xff; | 109 | __raw_readl(EPLD_MASK_BASE) & 0xff; |
114 | if (status == 0) { | 110 | if (status == 0) { |
115 | irq = -1; | 111 | irq = -1; |
116 | } else { | 112 | } else { |
@@ -126,8 +122,8 @@ int cayman_irq_demux(int evt) | |||
126 | unsigned long status; | 122 | unsigned long status; |
127 | int i; | 123 | int i; |
128 | 124 | ||
129 | status = ctrl_inl(EPLD_STATUS_BASE + 3 * sizeof(u32)) & | 125 | status = __raw_readl(EPLD_STATUS_BASE + 3 * sizeof(u32)) & |
130 | ctrl_inl(EPLD_MASK_BASE + 3 * sizeof(u32)) & 0xff; | 126 | __raw_readl(EPLD_MASK_BASE + 3 * sizeof(u32)) & 0xff; |
131 | if (status == 0) { | 127 | if (status == 0) { |
132 | irq = -1; | 128 | irq = -1; |
133 | } else { | 129 | } else { |