diff options
author | Lennert Buytenhek <buytenh@secretlab.ca> | 2010-12-14 16:55:26 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-01-03 05:18:16 -0500 |
commit | bb0b2374677b0678e671254112a326135522aba7 (patch) | |
tree | 36b15c066c93ac9bc17107eeaac54abacc6cc8c8 /arch/arm | |
parent | 57436c2db4426c5dcbaaba0acd5204f5fa71b762 (diff) |
ARM: S5P: irq_data conversion
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-s5pv310/irq-combiner.c | 26 | ||||
-rw-r--r-- | arch/arm/mach-s5pv310/irq-eint.c | 53 | ||||
-rw-r--r-- | arch/arm/plat-s5p/irq-eint.c | 82 | ||||
-rw-r--r-- | arch/arm/plat-s5p/irq-gpioint.c | 50 | ||||
-rw-r--r-- | arch/arm/plat-s5p/irq-pm.c | 6 |
5 files changed, 111 insertions, 106 deletions
diff --git a/arch/arm/mach-s5pv310/irq-combiner.c b/arch/arm/mach-s5pv310/irq-combiner.c index c3f88c3faf6c..9cdd1e4d4a40 100644 --- a/arch/arm/mach-s5pv310/irq-combiner.c +++ b/arch/arm/mach-s5pv310/irq-combiner.c | |||
@@ -29,24 +29,26 @@ struct combiner_chip_data { | |||
29 | 29 | ||
30 | static struct combiner_chip_data combiner_data[MAX_COMBINER_NR]; | 30 | static struct combiner_chip_data combiner_data[MAX_COMBINER_NR]; |
31 | 31 | ||
32 | static inline void __iomem *combiner_base(unsigned int irq) | 32 | static inline void __iomem *combiner_base(struct irq_data *data) |
33 | { | 33 | { |
34 | struct combiner_chip_data *combiner_data = get_irq_chip_data(irq); | 34 | struct combiner_chip_data *combiner_data = |
35 | irq_data_get_irq_chip_data(data); | ||
36 | |||
35 | return combiner_data->base; | 37 | return combiner_data->base; |
36 | } | 38 | } |
37 | 39 | ||
38 | static void combiner_mask_irq(unsigned int irq) | 40 | static void combiner_mask_irq(struct irq_data *data) |
39 | { | 41 | { |
40 | u32 mask = 1 << (irq % 32); | 42 | u32 mask = 1 << (data->irq % 32); |
41 | 43 | ||
42 | __raw_writel(mask, combiner_base(irq) + COMBINER_ENABLE_CLEAR); | 44 | __raw_writel(mask, combiner_base(data) + COMBINER_ENABLE_CLEAR); |
43 | } | 45 | } |
44 | 46 | ||
45 | static void combiner_unmask_irq(unsigned int irq) | 47 | static void combiner_unmask_irq(struct irq_data *data) |
46 | { | 48 | { |
47 | u32 mask = 1 << (irq % 32); | 49 | u32 mask = 1 << (data->irq % 32); |
48 | 50 | ||
49 | __raw_writel(mask, combiner_base(irq) + COMBINER_ENABLE_SET); | 51 | __raw_writel(mask, combiner_base(data) + COMBINER_ENABLE_SET); |
50 | } | 52 | } |
51 | 53 | ||
52 | static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) | 54 | static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) |
@@ -57,7 +59,7 @@ static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) | |||
57 | unsigned long status; | 59 | unsigned long status; |
58 | 60 | ||
59 | /* primary controller ack'ing */ | 61 | /* primary controller ack'ing */ |
60 | chip->ack(irq); | 62 | chip->irq_ack(&desc->irq_data); |
61 | 63 | ||
62 | spin_lock(&irq_controller_lock); | 64 | spin_lock(&irq_controller_lock); |
63 | status = __raw_readl(chip_data->base + COMBINER_INT_STATUS); | 65 | status = __raw_readl(chip_data->base + COMBINER_INT_STATUS); |
@@ -76,13 +78,13 @@ static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) | |||
76 | 78 | ||
77 | out: | 79 | out: |
78 | /* primary controller unmasking */ | 80 | /* primary controller unmasking */ |
79 | chip->unmask(irq); | 81 | chip->irq_unmask(&desc->irq_data); |
80 | } | 82 | } |
81 | 83 | ||
82 | static struct irq_chip combiner_chip = { | 84 | static struct irq_chip combiner_chip = { |
83 | .name = "COMBINER", | 85 | .name = "COMBINER", |
84 | .mask = combiner_mask_irq, | 86 | .irq_mask = combiner_mask_irq, |
85 | .unmask = combiner_unmask_irq, | 87 | .irq_unmask = combiner_unmask_irq, |
86 | }; | 88 | }; |
87 | 89 | ||
88 | void __init combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq) | 90 | void __init combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq) |
diff --git a/arch/arm/mach-s5pv310/irq-eint.c b/arch/arm/mach-s5pv310/irq-eint.c index f5a415edc0b6..477bd9e97f0f 100644 --- a/arch/arm/mach-s5pv310/irq-eint.c +++ b/arch/arm/mach-s5pv310/irq-eint.c | |||
@@ -48,42 +48,43 @@ static unsigned int s5pv310_get_irq_nr(unsigned int number) | |||
48 | return ret; | 48 | return ret; |
49 | } | 49 | } |
50 | 50 | ||
51 | static inline void s5pv310_irq_eint_mask(unsigned int irq) | 51 | static inline void s5pv310_irq_eint_mask(struct irq_data *data) |
52 | { | 52 | { |
53 | u32 mask; | 53 | u32 mask; |
54 | 54 | ||
55 | spin_lock(&eint_lock); | 55 | spin_lock(&eint_lock); |
56 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(irq))); | 56 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(data->irq))); |
57 | mask |= eint_irq_to_bit(irq); | 57 | mask |= eint_irq_to_bit(data->irq); |
58 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(irq))); | 58 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(data->irq))); |
59 | spin_unlock(&eint_lock); | 59 | spin_unlock(&eint_lock); |
60 | } | 60 | } |
61 | 61 | ||
62 | static void s5pv310_irq_eint_unmask(unsigned int irq) | 62 | static void s5pv310_irq_eint_unmask(struct irq_data *data) |
63 | { | 63 | { |
64 | u32 mask; | 64 | u32 mask; |
65 | 65 | ||
66 | spin_lock(&eint_lock); | 66 | spin_lock(&eint_lock); |
67 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(irq))); | 67 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(data->irq))); |
68 | mask &= ~(eint_irq_to_bit(irq)); | 68 | mask &= ~(eint_irq_to_bit(data->irq)); |
69 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(irq))); | 69 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(data->irq))); |
70 | spin_unlock(&eint_lock); | 70 | spin_unlock(&eint_lock); |
71 | } | 71 | } |
72 | 72 | ||
73 | static inline void s5pv310_irq_eint_ack(unsigned int irq) | 73 | static inline void s5pv310_irq_eint_ack(struct irq_data *data) |
74 | { | 74 | { |
75 | __raw_writel(eint_irq_to_bit(irq), S5P_EINT_PEND(EINT_REG_NR(irq))); | 75 | __raw_writel(eint_irq_to_bit(data->irq), |
76 | S5P_EINT_PEND(EINT_REG_NR(data->irq))); | ||
76 | } | 77 | } |
77 | 78 | ||
78 | static void s5pv310_irq_eint_maskack(unsigned int irq) | 79 | static void s5pv310_irq_eint_maskack(struct irq_data *data) |
79 | { | 80 | { |
80 | s5pv310_irq_eint_mask(irq); | 81 | s5pv310_irq_eint_mask(data); |
81 | s5pv310_irq_eint_ack(irq); | 82 | s5pv310_irq_eint_ack(data); |
82 | } | 83 | } |
83 | 84 | ||
84 | static int s5pv310_irq_eint_set_type(unsigned int irq, unsigned int type) | 85 | static int s5pv310_irq_eint_set_type(struct irq_data *data, unsigned int type) |
85 | { | 86 | { |
86 | int offs = EINT_OFFSET(irq); | 87 | int offs = EINT_OFFSET(data->irq); |
87 | int shift; | 88 | int shift; |
88 | u32 ctrl, mask; | 89 | u32 ctrl, mask; |
89 | u32 newvalue = 0; | 90 | u32 newvalue = 0; |
@@ -118,10 +119,10 @@ static int s5pv310_irq_eint_set_type(unsigned int irq, unsigned int type) | |||
118 | mask = 0x7 << shift; | 119 | mask = 0x7 << shift; |
119 | 120 | ||
120 | spin_lock(&eint_lock); | 121 | spin_lock(&eint_lock); |
121 | ctrl = __raw_readl(S5P_EINT_CON(EINT_REG_NR(irq))); | 122 | ctrl = __raw_readl(S5P_EINT_CON(EINT_REG_NR(data->irq))); |
122 | ctrl &= ~mask; | 123 | ctrl &= ~mask; |
123 | ctrl |= newvalue << shift; | 124 | ctrl |= newvalue << shift; |
124 | __raw_writel(ctrl, S5P_EINT_CON(EINT_REG_NR(irq))); | 125 | __raw_writel(ctrl, S5P_EINT_CON(EINT_REG_NR(data->irq))); |
125 | spin_unlock(&eint_lock); | 126 | spin_unlock(&eint_lock); |
126 | 127 | ||
127 | switch (offs) { | 128 | switch (offs) { |
@@ -146,11 +147,11 @@ static int s5pv310_irq_eint_set_type(unsigned int irq, unsigned int type) | |||
146 | 147 | ||
147 | static struct irq_chip s5pv310_irq_eint = { | 148 | static struct irq_chip s5pv310_irq_eint = { |
148 | .name = "s5pv310-eint", | 149 | .name = "s5pv310-eint", |
149 | .mask = s5pv310_irq_eint_mask, | 150 | .irq_mask = s5pv310_irq_eint_mask, |
150 | .unmask = s5pv310_irq_eint_unmask, | 151 | .irq_unmask = s5pv310_irq_eint_unmask, |
151 | .mask_ack = s5pv310_irq_eint_maskack, | 152 | .irq_mask_ack = s5pv310_irq_eint_maskack, |
152 | .ack = s5pv310_irq_eint_ack, | 153 | .irq_ack = s5pv310_irq_eint_ack, |
153 | .set_type = s5pv310_irq_eint_set_type, | 154 | .irq_set_type = s5pv310_irq_eint_set_type, |
154 | #ifdef CONFIG_PM | 155 | #ifdef CONFIG_PM |
155 | .irq_set_wake = s3c_irqext_wake, | 156 | .irq_set_wake = s3c_irqext_wake, |
156 | #endif | 157 | #endif |
@@ -192,14 +193,14 @@ static void s5pv310_irq_eint0_15(unsigned int irq, struct irq_desc *desc) | |||
192 | u32 *irq_data = get_irq_data(irq); | 193 | u32 *irq_data = get_irq_data(irq); |
193 | struct irq_chip *chip = get_irq_chip(irq); | 194 | struct irq_chip *chip = get_irq_chip(irq); |
194 | 195 | ||
195 | chip->mask(irq); | 196 | chip->irq_mask(&desc->irq_data); |
196 | 197 | ||
197 | if (chip->ack) | 198 | if (chip->irq_ack) |
198 | chip->ack(irq); | 199 | chip->irq_ack(&desc->irq_data); |
199 | 200 | ||
200 | generic_handle_irq(*irq_data); | 201 | generic_handle_irq(*irq_data); |
201 | 202 | ||
202 | chip->unmask(irq); | 203 | chip->irq_unmask(&desc->irq_data); |
203 | } | 204 | } |
204 | 205 | ||
205 | int __init s5pv310_init_irq_eint(void) | 206 | int __init s5pv310_init_irq_eint(void) |
diff --git a/arch/arm/plat-s5p/irq-eint.c b/arch/arm/plat-s5p/irq-eint.c index f2f2e1ccd0e6..225aa25405db 100644 --- a/arch/arm/plat-s5p/irq-eint.c +++ b/arch/arm/plat-s5p/irq-eint.c | |||
@@ -28,39 +28,40 @@ | |||
28 | #include <plat/gpio-cfg.h> | 28 | #include <plat/gpio-cfg.h> |
29 | #include <mach/regs-gpio.h> | 29 | #include <mach/regs-gpio.h> |
30 | 30 | ||
31 | static inline void s5p_irq_eint_mask(unsigned int irq) | 31 | static inline void s5p_irq_eint_mask(struct irq_data *data) |
32 | { | 32 | { |
33 | u32 mask; | 33 | u32 mask; |
34 | 34 | ||
35 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(irq))); | 35 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(data->irq))); |
36 | mask |= eint_irq_to_bit(irq); | 36 | mask |= eint_irq_to_bit(data->irq); |
37 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(irq))); | 37 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(data->irq))); |
38 | } | 38 | } |
39 | 39 | ||
40 | static void s5p_irq_eint_unmask(unsigned int irq) | 40 | static void s5p_irq_eint_unmask(struct irq_data *data) |
41 | { | 41 | { |
42 | u32 mask; | 42 | u32 mask; |
43 | 43 | ||
44 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(irq))); | 44 | mask = __raw_readl(S5P_EINT_MASK(EINT_REG_NR(data->irq))); |
45 | mask &= ~(eint_irq_to_bit(irq)); | 45 | mask &= ~(eint_irq_to_bit(data->irq)); |
46 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(irq))); | 46 | __raw_writel(mask, S5P_EINT_MASK(EINT_REG_NR(data->irq))); |
47 | } | 47 | } |
48 | 48 | ||
49 | static inline void s5p_irq_eint_ack(unsigned int irq) | 49 | static inline void s5p_irq_eint_ack(struct irq_data *data) |
50 | { | 50 | { |
51 | __raw_writel(eint_irq_to_bit(irq), S5P_EINT_PEND(EINT_REG_NR(irq))); | 51 | __raw_writel(eint_irq_to_bit(data->irq), |
52 | S5P_EINT_PEND(EINT_REG_NR(data->irq))); | ||
52 | } | 53 | } |
53 | 54 | ||
54 | static void s5p_irq_eint_maskack(unsigned int irq) | 55 | static void s5p_irq_eint_maskack(struct irq_data *data) |
55 | { | 56 | { |
56 | /* compiler should in-line these */ | 57 | /* compiler should in-line these */ |
57 | s5p_irq_eint_mask(irq); | 58 | s5p_irq_eint_mask(data); |
58 | s5p_irq_eint_ack(irq); | 59 | s5p_irq_eint_ack(data); |
59 | } | 60 | } |
60 | 61 | ||
61 | static int s5p_irq_eint_set_type(unsigned int irq, unsigned int type) | 62 | static int s5p_irq_eint_set_type(struct irq_data *data, unsigned int type) |
62 | { | 63 | { |
63 | int offs = EINT_OFFSET(irq); | 64 | int offs = EINT_OFFSET(data->irq); |
64 | int shift; | 65 | int shift; |
65 | u32 ctrl, mask; | 66 | u32 ctrl, mask; |
66 | u32 newvalue = 0; | 67 | u32 newvalue = 0; |
@@ -94,10 +95,10 @@ static int s5p_irq_eint_set_type(unsigned int irq, unsigned int type) | |||
94 | shift = (offs & 0x7) * 4; | 95 | shift = (offs & 0x7) * 4; |
95 | mask = 0x7 << shift; | 96 | mask = 0x7 << shift; |
96 | 97 | ||
97 | ctrl = __raw_readl(S5P_EINT_CON(EINT_REG_NR(irq))); | 98 | ctrl = __raw_readl(S5P_EINT_CON(EINT_REG_NR(data->irq))); |
98 | ctrl &= ~mask; | 99 | ctrl &= ~mask; |
99 | ctrl |= newvalue << shift; | 100 | ctrl |= newvalue << shift; |
100 | __raw_writel(ctrl, S5P_EINT_CON(EINT_REG_NR(irq))); | 101 | __raw_writel(ctrl, S5P_EINT_CON(EINT_REG_NR(data->irq))); |
101 | 102 | ||
102 | if ((0 <= offs) && (offs < 8)) | 103 | if ((0 <= offs) && (offs < 8)) |
103 | s3c_gpio_cfgpin(EINT_GPIO_0(offs & 0x7), EINT_MODE); | 104 | s3c_gpio_cfgpin(EINT_GPIO_0(offs & 0x7), EINT_MODE); |
@@ -119,11 +120,11 @@ static int s5p_irq_eint_set_type(unsigned int irq, unsigned int type) | |||
119 | 120 | ||
120 | static struct irq_chip s5p_irq_eint = { | 121 | static struct irq_chip s5p_irq_eint = { |
121 | .name = "s5p-eint", | 122 | .name = "s5p-eint", |
122 | .mask = s5p_irq_eint_mask, | 123 | .irq_mask = s5p_irq_eint_mask, |
123 | .unmask = s5p_irq_eint_unmask, | 124 | .irq_unmask = s5p_irq_eint_unmask, |
124 | .mask_ack = s5p_irq_eint_maskack, | 125 | .irq_mask_ack = s5p_irq_eint_maskack, |
125 | .ack = s5p_irq_eint_ack, | 126 | .irq_ack = s5p_irq_eint_ack, |
126 | .set_type = s5p_irq_eint_set_type, | 127 | .irq_set_type = s5p_irq_eint_set_type, |
127 | #ifdef CONFIG_PM | 128 | #ifdef CONFIG_PM |
128 | .irq_set_wake = s3c_irqext_wake, | 129 | .irq_set_wake = s3c_irqext_wake, |
129 | #endif | 130 | #endif |
@@ -159,40 +160,41 @@ static void s5p_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc) | |||
159 | s5p_irq_demux_eint(IRQ_EINT(24)); | 160 | s5p_irq_demux_eint(IRQ_EINT(24)); |
160 | } | 161 | } |
161 | 162 | ||
162 | static inline void s5p_irq_vic_eint_mask(unsigned int irq) | 163 | static inline void s5p_irq_vic_eint_mask(struct irq_data *data) |
163 | { | 164 | { |
164 | void __iomem *base = get_irq_chip_data(irq); | 165 | void __iomem *base = irq_data_get_irq_chip_data(data); |
165 | 166 | ||
166 | s5p_irq_eint_mask(irq); | 167 | s5p_irq_eint_mask(data); |
167 | writel(1 << EINT_OFFSET(irq), base + VIC_INT_ENABLE_CLEAR); | 168 | writel(1 << EINT_OFFSET(data->irq), base + VIC_INT_ENABLE_CLEAR); |
168 | } | 169 | } |
169 | 170 | ||
170 | static void s5p_irq_vic_eint_unmask(unsigned int irq) | 171 | static void s5p_irq_vic_eint_unmask(struct irq_data *data) |
171 | { | 172 | { |
172 | void __iomem *base = get_irq_chip_data(irq); | 173 | void __iomem *base = irq_data_get_irq_chip_data(data); |
173 | 174 | ||
174 | s5p_irq_eint_unmask(irq); | 175 | s5p_irq_eint_unmask(data); |
175 | writel(1 << EINT_OFFSET(irq), base + VIC_INT_ENABLE); | 176 | writel(1 << EINT_OFFSET(data->irq), base + VIC_INT_ENABLE); |
176 | } | 177 | } |
177 | 178 | ||
178 | static inline void s5p_irq_vic_eint_ack(unsigned int irq) | 179 | static inline void s5p_irq_vic_eint_ack(struct irq_data *data) |
179 | { | 180 | { |
180 | __raw_writel(eint_irq_to_bit(irq), S5P_EINT_PEND(EINT_REG_NR(irq))); | 181 | __raw_writel(eint_irq_to_bit(data->irq), |
182 | S5P_EINT_PEND(EINT_REG_NR(data->irq))); | ||
181 | } | 183 | } |
182 | 184 | ||
183 | static void s5p_irq_vic_eint_maskack(unsigned int irq) | 185 | static void s5p_irq_vic_eint_maskack(struct irq_data *data) |
184 | { | 186 | { |
185 | s5p_irq_vic_eint_mask(irq); | 187 | s5p_irq_vic_eint_mask(data); |
186 | s5p_irq_vic_eint_ack(irq); | 188 | s5p_irq_vic_eint_ack(data); |
187 | } | 189 | } |
188 | 190 | ||
189 | static struct irq_chip s5p_irq_vic_eint = { | 191 | static struct irq_chip s5p_irq_vic_eint = { |
190 | .name = "s5p_vic_eint", | 192 | .name = "s5p_vic_eint", |
191 | .mask = s5p_irq_vic_eint_mask, | 193 | .irq_mask = s5p_irq_vic_eint_mask, |
192 | .unmask = s5p_irq_vic_eint_unmask, | 194 | .irq_unmask = s5p_irq_vic_eint_unmask, |
193 | .mask_ack = s5p_irq_vic_eint_maskack, | 195 | .irq_mask_ack = s5p_irq_vic_eint_maskack, |
194 | .ack = s5p_irq_vic_eint_ack, | 196 | .irq_ack = s5p_irq_vic_eint_ack, |
195 | .set_type = s5p_irq_eint_set_type, | 197 | .irq_set_type = s5p_irq_eint_set_type, |
196 | #ifdef CONFIG_PM | 198 | #ifdef CONFIG_PM |
197 | .irq_set_wake = s3c_irqext_wake, | 199 | .irq_set_wake = s3c_irqext_wake, |
198 | #endif | 200 | #endif |
diff --git a/arch/arm/plat-s5p/irq-gpioint.c b/arch/arm/plat-s5p/irq-gpioint.c index 0e5dc8cbf5e3..3b6bf89d1739 100644 --- a/arch/arm/plat-s5p/irq-gpioint.c +++ b/arch/arm/plat-s5p/irq-gpioint.c | |||
@@ -30,9 +30,9 @@ | |||
30 | 30 | ||
31 | static struct s3c_gpio_chip *irq_chips[S5P_GPIOINT_GROUP_MAXNR]; | 31 | static struct s3c_gpio_chip *irq_chips[S5P_GPIOINT_GROUP_MAXNR]; |
32 | 32 | ||
33 | static int s5p_gpioint_get_group(unsigned int irq) | 33 | static int s5p_gpioint_get_group(struct irq_data *data) |
34 | { | 34 | { |
35 | struct gpio_chip *chip = get_irq_data(irq); | 35 | struct gpio_chip *chip = irq_data_get_irq_data(data); |
36 | struct s3c_gpio_chip *s3c_chip = container_of(chip, | 36 | struct s3c_gpio_chip *s3c_chip = container_of(chip, |
37 | struct s3c_gpio_chip, chip); | 37 | struct s3c_gpio_chip, chip); |
38 | int group; | 38 | int group; |
@@ -44,22 +44,22 @@ static int s5p_gpioint_get_group(unsigned int irq) | |||
44 | return group; | 44 | return group; |
45 | } | 45 | } |
46 | 46 | ||
47 | static int s5p_gpioint_get_offset(unsigned int irq) | 47 | static int s5p_gpioint_get_offset(struct irq_data *data) |
48 | { | 48 | { |
49 | struct gpio_chip *chip = get_irq_data(irq); | 49 | struct gpio_chip *chip = irq_data_get_irq_data(data); |
50 | struct s3c_gpio_chip *s3c_chip = container_of(chip, | 50 | struct s3c_gpio_chip *s3c_chip = container_of(chip, |
51 | struct s3c_gpio_chip, chip); | 51 | struct s3c_gpio_chip, chip); |
52 | 52 | ||
53 | return irq - s3c_chip->irq_base; | 53 | return data->irq - s3c_chip->irq_base; |
54 | } | 54 | } |
55 | 55 | ||
56 | static void s5p_gpioint_ack(unsigned int irq) | 56 | static void s5p_gpioint_ack(struct irq_data *data) |
57 | { | 57 | { |
58 | int group, offset, pend_offset; | 58 | int group, offset, pend_offset; |
59 | unsigned int value; | 59 | unsigned int value; |
60 | 60 | ||
61 | group = s5p_gpioint_get_group(irq); | 61 | group = s5p_gpioint_get_group(data); |
62 | offset = s5p_gpioint_get_offset(irq); | 62 | offset = s5p_gpioint_get_offset(data); |
63 | pend_offset = group << 2; | 63 | pend_offset = group << 2; |
64 | 64 | ||
65 | value = __raw_readl(S5P_GPIOREG(GPIOINT_PEND_OFFSET) + pend_offset); | 65 | value = __raw_readl(S5P_GPIOREG(GPIOINT_PEND_OFFSET) + pend_offset); |
@@ -67,13 +67,13 @@ static void s5p_gpioint_ack(unsigned int irq) | |||
67 | __raw_writel(value, S5P_GPIOREG(GPIOINT_PEND_OFFSET) + pend_offset); | 67 | __raw_writel(value, S5P_GPIOREG(GPIOINT_PEND_OFFSET) + pend_offset); |
68 | } | 68 | } |
69 | 69 | ||
70 | static void s5p_gpioint_mask(unsigned int irq) | 70 | static void s5p_gpioint_mask(struct irq_data *data) |
71 | { | 71 | { |
72 | int group, offset, mask_offset; | 72 | int group, offset, mask_offset; |
73 | unsigned int value; | 73 | unsigned int value; |
74 | 74 | ||
75 | group = s5p_gpioint_get_group(irq); | 75 | group = s5p_gpioint_get_group(data); |
76 | offset = s5p_gpioint_get_offset(irq); | 76 | offset = s5p_gpioint_get_offset(data); |
77 | mask_offset = group << 2; | 77 | mask_offset = group << 2; |
78 | 78 | ||
79 | value = __raw_readl(S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); | 79 | value = __raw_readl(S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); |
@@ -81,13 +81,13 @@ static void s5p_gpioint_mask(unsigned int irq) | |||
81 | __raw_writel(value, S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); | 81 | __raw_writel(value, S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); |
82 | } | 82 | } |
83 | 83 | ||
84 | static void s5p_gpioint_unmask(unsigned int irq) | 84 | static void s5p_gpioint_unmask(struct irq_data *data) |
85 | { | 85 | { |
86 | int group, offset, mask_offset; | 86 | int group, offset, mask_offset; |
87 | unsigned int value; | 87 | unsigned int value; |
88 | 88 | ||
89 | group = s5p_gpioint_get_group(irq); | 89 | group = s5p_gpioint_get_group(data); |
90 | offset = s5p_gpioint_get_offset(irq); | 90 | offset = s5p_gpioint_get_offset(data); |
91 | mask_offset = group << 2; | 91 | mask_offset = group << 2; |
92 | 92 | ||
93 | value = __raw_readl(S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); | 93 | value = __raw_readl(S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); |
@@ -95,19 +95,19 @@ static void s5p_gpioint_unmask(unsigned int irq) | |||
95 | __raw_writel(value, S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); | 95 | __raw_writel(value, S5P_GPIOREG(GPIOINT_MASK_OFFSET) + mask_offset); |
96 | } | 96 | } |
97 | 97 | ||
98 | static void s5p_gpioint_mask_ack(unsigned int irq) | 98 | static void s5p_gpioint_mask_ack(struct irq_data *data) |
99 | { | 99 | { |
100 | s5p_gpioint_mask(irq); | 100 | s5p_gpioint_mask(data); |
101 | s5p_gpioint_ack(irq); | 101 | s5p_gpioint_ack(data); |
102 | } | 102 | } |
103 | 103 | ||
104 | static int s5p_gpioint_set_type(unsigned int irq, unsigned int type) | 104 | static int s5p_gpioint_set_type(struct irq_data *data, unsigned int type) |
105 | { | 105 | { |
106 | int group, offset, con_offset; | 106 | int group, offset, con_offset; |
107 | unsigned int value; | 107 | unsigned int value; |
108 | 108 | ||
109 | group = s5p_gpioint_get_group(irq); | 109 | group = s5p_gpioint_get_group(data); |
110 | offset = s5p_gpioint_get_offset(irq); | 110 | offset = s5p_gpioint_get_offset(data); |
111 | con_offset = group << 2; | 111 | con_offset = group << 2; |
112 | 112 | ||
113 | switch (type) { | 113 | switch (type) { |
@@ -142,11 +142,11 @@ static int s5p_gpioint_set_type(unsigned int irq, unsigned int type) | |||
142 | 142 | ||
143 | struct irq_chip s5p_gpioint = { | 143 | struct irq_chip s5p_gpioint = { |
144 | .name = "s5p_gpioint", | 144 | .name = "s5p_gpioint", |
145 | .ack = s5p_gpioint_ack, | 145 | .irq_ack = s5p_gpioint_ack, |
146 | .mask = s5p_gpioint_mask, | 146 | .irq_mask = s5p_gpioint_mask, |
147 | .mask_ack = s5p_gpioint_mask_ack, | 147 | .irq_mask_ack = s5p_gpioint_mask_ack, |
148 | .unmask = s5p_gpioint_unmask, | 148 | .irq_unmask = s5p_gpioint_unmask, |
149 | .set_type = s5p_gpioint_set_type, | 149 | .irq_set_type = s5p_gpioint_set_type, |
150 | }; | 150 | }; |
151 | 151 | ||
152 | static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc) | 152 | static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc) |
diff --git a/arch/arm/plat-s5p/irq-pm.c b/arch/arm/plat-s5p/irq-pm.c index dc33b9ecda45..5259ad458bc8 100644 --- a/arch/arm/plat-s5p/irq-pm.c +++ b/arch/arm/plat-s5p/irq-pm.c | |||
@@ -37,14 +37,14 @@ | |||
37 | unsigned long s3c_irqwake_intallow = 0x00000006L; | 37 | unsigned long s3c_irqwake_intallow = 0x00000006L; |
38 | unsigned long s3c_irqwake_eintallow = 0xffffffffL; | 38 | unsigned long s3c_irqwake_eintallow = 0xffffffffL; |
39 | 39 | ||
40 | int s3c_irq_wake(unsigned int irqno, unsigned int state) | 40 | int s3c_irq_wake(struct irq_data *data, unsigned int state) |
41 | { | 41 | { |
42 | unsigned long irqbit; | 42 | unsigned long irqbit; |
43 | 43 | ||
44 | switch (irqno) { | 44 | switch (data->irq) { |
45 | case IRQ_RTC_TIC: | 45 | case IRQ_RTC_TIC: |
46 | case IRQ_RTC_ALARM: | 46 | case IRQ_RTC_ALARM: |
47 | irqbit = 1 << (irqno + 1 - IRQ_RTC_ALARM); | 47 | irqbit = 1 << (data->irq + 1 - IRQ_RTC_ALARM); |
48 | if (!state) | 48 | if (!state) |
49 | s3c_irqwake_intmask |= irqbit; | 49 | s3c_irqwake_intmask |= irqbit; |
50 | else | 50 | else |