diff options
author | David S. Miller <davem@davemloft.net> | 2008-03-18 02:44:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-18 02:44:31 -0400 |
commit | 2f633928cbba8a5858bb39b11e7219a41b0fbef5 (patch) | |
tree | 9a82f4b7f2c3afe4b0208d8e44ea61bae90a7d22 /arch/blackfin/mach-common | |
parent | 5e226e4d9016daee170699f8a4188a5505021756 (diff) | |
parent | bde4f8fa8db2abd5ac9c542d76012d0fedab050f (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/blackfin/mach-common')
-rw-r--r-- | arch/blackfin/mach-common/dpmc.S | 137 | ||||
-rw-r--r-- | arch/blackfin/mach-common/entry.S | 5 | ||||
-rw-r--r-- | arch/blackfin/mach-common/ints-priority.c | 174 |
3 files changed, 70 insertions, 246 deletions
diff --git a/arch/blackfin/mach-common/dpmc.S b/arch/blackfin/mach-common/dpmc.S index b80ddd8b232d..9d45aa3265b1 100644 --- a/arch/blackfin/mach-common/dpmc.S +++ b/arch/blackfin/mach-common/dpmc.S | |||
@@ -31,140 +31,6 @@ | |||
31 | #include <asm/blackfin.h> | 31 | #include <asm/blackfin.h> |
32 | #include <asm/mach/irq.h> | 32 | #include <asm/mach/irq.h> |
33 | 33 | ||
34 | .text | ||
35 | |||
36 | ENTRY(_unmask_wdog_wakeup_evt) | ||
37 | [--SP] = ( R7:0, P5:0 ); | ||
38 | #if defined(CONFIG_BF561) | ||
39 | P0.H = hi(SICA_IWR1); | ||
40 | P0.L = lo(SICA_IWR1); | ||
41 | #elif defined(CONFIG_BF54x) || defined(CONFIG_BF52x) | ||
42 | P0.h = HI(SIC_IWR0); | ||
43 | P0.l = LO(SIC_IWR0); | ||
44 | #else | ||
45 | P0.h = HI(SIC_IWR); | ||
46 | P0.l = LO(SIC_IWR); | ||
47 | #endif | ||
48 | R7 = [P0]; | ||
49 | #if defined(CONFIG_BF561) | ||
50 | BITSET(R7, 27); | ||
51 | #else | ||
52 | BITSET(R7,(IRQ_WATCH - IVG7)); | ||
53 | #endif | ||
54 | [P0] = R7; | ||
55 | SSYNC; | ||
56 | |||
57 | ( R7:0, P5:0 ) = [SP++]; | ||
58 | RTS; | ||
59 | |||
60 | .LWRITE_TO_STAT: | ||
61 | /* When watch dog timer is enabled, a write to STAT will load the | ||
62 | * contents of CNT to STAT | ||
63 | */ | ||
64 | R7 = 0x0000(z); | ||
65 | #if defined(CONFIG_BF561) | ||
66 | P0.h = HI(WDOGA_STAT); | ||
67 | P0.l = LO(WDOGA_STAT); | ||
68 | #else | ||
69 | P0.h = HI(WDOG_STAT); | ||
70 | P0.l = LO(WDOG_STAT); | ||
71 | #endif | ||
72 | [P0] = R7; | ||
73 | SSYNC; | ||
74 | JUMP .LSKIP_WRITE_TO_STAT; | ||
75 | |||
76 | ENTRY(_program_wdog_timer) | ||
77 | [--SP] = ( R7:0, P5:0 ); | ||
78 | #if defined(CONFIG_BF561) | ||
79 | P0.h = HI(WDOGA_CNT); | ||
80 | P0.l = LO(WDOGA_CNT); | ||
81 | #else | ||
82 | P0.h = HI(WDOG_CNT); | ||
83 | P0.l = LO(WDOG_CNT); | ||
84 | #endif | ||
85 | [P0] = R0; | ||
86 | SSYNC; | ||
87 | |||
88 | #if defined(CONFIG_BF561) | ||
89 | P0.h = HI(WDOGA_CTL); | ||
90 | P0.l = LO(WDOGA_CTL); | ||
91 | #else | ||
92 | P0.h = HI(WDOG_CTL); | ||
93 | P0.l = LO(WDOG_CTL); | ||
94 | #endif | ||
95 | R7 = W[P0](Z); | ||
96 | CC = BITTST(R7,1); | ||
97 | if !CC JUMP .LWRITE_TO_STAT; | ||
98 | CC = BITTST(R7,2); | ||
99 | if !CC JUMP .LWRITE_TO_STAT; | ||
100 | |||
101 | .LSKIP_WRITE_TO_STAT: | ||
102 | #if defined(CONFIG_BF561) | ||
103 | P0.h = HI(WDOGA_CTL); | ||
104 | P0.l = LO(WDOGA_CTL); | ||
105 | #else | ||
106 | P0.h = HI(WDOG_CTL); | ||
107 | P0.l = LO(WDOG_CTL); | ||
108 | #endif | ||
109 | R7 = W[P0](Z); | ||
110 | BITCLR(R7,1); /* Enable GP event */ | ||
111 | BITSET(R7,2); | ||
112 | W[P0] = R7.L; | ||
113 | SSYNC; | ||
114 | NOP; | ||
115 | |||
116 | R7 = W[P0](Z); | ||
117 | BITCLR(R7,4); /* Enable the wdog counter */ | ||
118 | W[P0] = R7.L; | ||
119 | SSYNC; | ||
120 | |||
121 | ( R7:0, P5:0 ) = [SP++]; | ||
122 | RTS; | ||
123 | |||
124 | ENTRY(_clear_wdog_wakeup_evt) | ||
125 | [--SP] = ( R7:0, P5:0 ); | ||
126 | |||
127 | #if defined(CONFIG_BF561) | ||
128 | P0.h = HI(WDOGA_CTL); | ||
129 | P0.l = LO(WDOGA_CTL); | ||
130 | #else | ||
131 | P0.h = HI(WDOG_CTL); | ||
132 | P0.l = LO(WDOG_CTL); | ||
133 | #endif | ||
134 | R7 = 0x0AD6(Z); | ||
135 | W[P0] = R7.L; | ||
136 | SSYNC; | ||
137 | |||
138 | R7 = W[P0](Z); | ||
139 | BITSET(R7,15); | ||
140 | W[P0] = R7.L; | ||
141 | SSYNC; | ||
142 | |||
143 | R7 = W[P0](Z); | ||
144 | BITSET(R7,1); | ||
145 | BITSET(R7,2); | ||
146 | W[P0] = R7.L; | ||
147 | SSYNC; | ||
148 | |||
149 | ( R7:0, P5:0 ) = [SP++]; | ||
150 | RTS; | ||
151 | |||
152 | ENTRY(_disable_wdog_timer) | ||
153 | [--SP] = ( R7:0, P5:0 ); | ||
154 | #if defined(CONFIG_BF561) | ||
155 | P0.h = HI(WDOGA_CTL); | ||
156 | P0.l = LO(WDOGA_CTL); | ||
157 | #else | ||
158 | P0.h = HI(WDOG_CTL); | ||
159 | P0.l = LO(WDOG_CTL); | ||
160 | #endif | ||
161 | R7 = 0xAD6(Z); | ||
162 | W[P0] = R7.L; | ||
163 | SSYNC; | ||
164 | ( R7:0, P5:0 ) = [SP++]; | ||
165 | RTS; | ||
166 | |||
167 | #if !defined(CONFIG_BF561) | ||
168 | 34 | ||
169 | .section .l1.text | 35 | .section .l1.text |
170 | 36 | ||
@@ -459,10 +325,12 @@ ENTRY(_set_sic_iwr) | |||
459 | RTS; | 325 | RTS; |
460 | 326 | ||
461 | ENTRY(_set_rtc_istat) | 327 | ENTRY(_set_rtc_istat) |
328 | #ifndef CONFIG_BF561 | ||
462 | P0.H = hi(RTC_ISTAT); | 329 | P0.H = hi(RTC_ISTAT); |
463 | P0.L = lo(RTC_ISTAT); | 330 | P0.L = lo(RTC_ISTAT); |
464 | w[P0] = R0.L; | 331 | w[P0] = R0.L; |
465 | SSYNC; | 332 | SSYNC; |
333 | #endif | ||
466 | RTS; | 334 | RTS; |
467 | 335 | ||
468 | ENTRY(_test_pll_locked) | 336 | ENTRY(_test_pll_locked) |
@@ -473,4 +341,3 @@ ENTRY(_test_pll_locked) | |||
473 | CC = BITTST(R0,5); | 341 | CC = BITTST(R0,5); |
474 | IF !CC JUMP 1b; | 342 | IF !CC JUMP 1b; |
475 | RTS; | 343 | RTS; |
476 | #endif | ||
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index 2cbb7a0bc38e..cee54cebbc65 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S | |||
@@ -1369,7 +1369,7 @@ ENTRY(_sys_call_table) | |||
1369 | .long _sys_epoll_pwait | 1369 | .long _sys_epoll_pwait |
1370 | .long _sys_utimensat | 1370 | .long _sys_utimensat |
1371 | .long _sys_signalfd | 1371 | .long _sys_signalfd |
1372 | .long _sys_ni_syscall | 1372 | .long _sys_timerfd_create |
1373 | .long _sys_eventfd /* 350 */ | 1373 | .long _sys_eventfd /* 350 */ |
1374 | .long _sys_pread64 | 1374 | .long _sys_pread64 |
1375 | .long _sys_pwrite64 | 1375 | .long _sys_pwrite64 |
@@ -1378,6 +1378,9 @@ ENTRY(_sys_call_table) | |||
1378 | .long _sys_get_robust_list /* 355 */ | 1378 | .long _sys_get_robust_list /* 355 */ |
1379 | .long _sys_fallocate | 1379 | .long _sys_fallocate |
1380 | .long _sys_semtimedop | 1380 | .long _sys_semtimedop |
1381 | .long _sys_timerfd_settime | ||
1382 | .long _sys_timerfd_gettime | ||
1383 | |||
1381 | .rept NR_syscalls-(.-_sys_call_table)/4 | 1384 | .rept NR_syscalls-(.-_sys_call_table)/4 |
1382 | .long _sys_ni_syscall | 1385 | .long _sys_ni_syscall |
1383 | .endr | 1386 | .endr |
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c index 880595afe98d..225ef14af75e 100644 --- a/arch/blackfin/mach-common/ints-priority.c +++ b/arch/blackfin/mach-common/ints-priority.c | |||
@@ -74,7 +74,7 @@ unsigned long bfin_sic_iwr[3]; /* Up to 3 SIC_IWRx registers */ | |||
74 | #endif | 74 | #endif |
75 | 75 | ||
76 | struct ivgx { | 76 | struct ivgx { |
77 | /* irq number for request_irq, available in mach-bf533/irq.h */ | 77 | /* irq number for request_irq, available in mach-bf5xx/irq.h */ |
78 | unsigned int irqno; | 78 | unsigned int irqno; |
79 | /* corresponding bit in the SIC_ISR register */ | 79 | /* corresponding bit in the SIC_ISR register */ |
80 | unsigned int isrflag; | 80 | unsigned int isrflag; |
@@ -86,7 +86,6 @@ struct ivg_slice { | |||
86 | struct ivgx *istop; | 86 | struct ivgx *istop; |
87 | } ivg7_13[IVG13 - IVG7 + 1]; | 87 | } ivg7_13[IVG13 - IVG7 + 1]; |
88 | 88 | ||
89 | static void search_IAR(void); | ||
90 | 89 | ||
91 | /* | 90 | /* |
92 | * Search SIC_IAR and fill tables with the irqvalues | 91 | * Search SIC_IAR and fill tables with the irqvalues |
@@ -120,10 +119,10 @@ static void __init search_IAR(void) | |||
120 | } | 119 | } |
121 | 120 | ||
122 | /* | 121 | /* |
123 | * This is for BF533 internal IRQs | 122 | * This is for core internal IRQs |
124 | */ | 123 | */ |
125 | 124 | ||
126 | static void ack_noop(unsigned int irq) | 125 | static void bfin_ack_noop(unsigned int irq) |
127 | { | 126 | { |
128 | /* Dummy function. */ | 127 | /* Dummy function. */ |
129 | } | 128 | } |
@@ -156,11 +155,11 @@ static void bfin_internal_mask_irq(unsigned int irq) | |||
156 | { | 155 | { |
157 | #ifdef CONFIG_BF53x | 156 | #ifdef CONFIG_BF53x |
158 | bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() & | 157 | bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() & |
159 | ~(1 << (irq - (IRQ_CORETMR + 1)))); | 158 | ~(1 << SIC_SYSIRQ(irq))); |
160 | #else | 159 | #else |
161 | unsigned mask_bank, mask_bit; | 160 | unsigned mask_bank, mask_bit; |
162 | mask_bank = (irq - (IRQ_CORETMR + 1)) / 32; | 161 | mask_bank = SIC_SYSIRQ(irq) / 32; |
163 | mask_bit = (irq - (IRQ_CORETMR + 1)) % 32; | 162 | mask_bit = SIC_SYSIRQ(irq) % 32; |
164 | bfin_write_SIC_IMASK(mask_bank, bfin_read_SIC_IMASK(mask_bank) & | 163 | bfin_write_SIC_IMASK(mask_bank, bfin_read_SIC_IMASK(mask_bank) & |
165 | ~(1 << mask_bit)); | 164 | ~(1 << mask_bit)); |
166 | #endif | 165 | #endif |
@@ -171,11 +170,11 @@ static void bfin_internal_unmask_irq(unsigned int irq) | |||
171 | { | 170 | { |
172 | #ifdef CONFIG_BF53x | 171 | #ifdef CONFIG_BF53x |
173 | bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() | | 172 | bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() | |
174 | (1 << (irq - (IRQ_CORETMR + 1)))); | 173 | (1 << SIC_SYSIRQ(irq))); |
175 | #else | 174 | #else |
176 | unsigned mask_bank, mask_bit; | 175 | unsigned mask_bank, mask_bit; |
177 | mask_bank = (irq - (IRQ_CORETMR + 1)) / 32; | 176 | mask_bank = SIC_SYSIRQ(irq) / 32; |
178 | mask_bit = (irq - (IRQ_CORETMR + 1)) % 32; | 177 | mask_bit = SIC_SYSIRQ(irq) % 32; |
179 | bfin_write_SIC_IMASK(mask_bank, bfin_read_SIC_IMASK(mask_bank) | | 178 | bfin_write_SIC_IMASK(mask_bank, bfin_read_SIC_IMASK(mask_bank) | |
180 | (1 << mask_bit)); | 179 | (1 << mask_bit)); |
181 | #endif | 180 | #endif |
@@ -187,8 +186,8 @@ int bfin_internal_set_wake(unsigned int irq, unsigned int state) | |||
187 | { | 186 | { |
188 | unsigned bank, bit; | 187 | unsigned bank, bit; |
189 | unsigned long flags; | 188 | unsigned long flags; |
190 | bank = (irq - (IRQ_CORETMR + 1)) / 32; | 189 | bank = SIC_SYSIRQ(irq) / 32; |
191 | bit = (irq - (IRQ_CORETMR + 1)) % 32; | 190 | bit = SIC_SYSIRQ(irq) % 32; |
192 | 191 | ||
193 | local_irq_save(flags); | 192 | local_irq_save(flags); |
194 | 193 | ||
@@ -204,15 +203,18 @@ int bfin_internal_set_wake(unsigned int irq, unsigned int state) | |||
204 | #endif | 203 | #endif |
205 | 204 | ||
206 | static struct irq_chip bfin_core_irqchip = { | 205 | static struct irq_chip bfin_core_irqchip = { |
207 | .ack = ack_noop, | 206 | .ack = bfin_ack_noop, |
208 | .mask = bfin_core_mask_irq, | 207 | .mask = bfin_core_mask_irq, |
209 | .unmask = bfin_core_unmask_irq, | 208 | .unmask = bfin_core_unmask_irq, |
210 | }; | 209 | }; |
211 | 210 | ||
212 | static struct irq_chip bfin_internal_irqchip = { | 211 | static struct irq_chip bfin_internal_irqchip = { |
213 | .ack = ack_noop, | 212 | .ack = bfin_ack_noop, |
214 | .mask = bfin_internal_mask_irq, | 213 | .mask = bfin_internal_mask_irq, |
215 | .unmask = bfin_internal_unmask_irq, | 214 | .unmask = bfin_internal_unmask_irq, |
215 | .mask_ack = bfin_internal_mask_irq, | ||
216 | .disable = bfin_internal_mask_irq, | ||
217 | .enable = bfin_internal_unmask_irq, | ||
216 | #ifdef CONFIG_PM | 218 | #ifdef CONFIG_PM |
217 | .set_wake = bfin_internal_set_wake, | 219 | .set_wake = bfin_internal_set_wake, |
218 | #endif | 220 | #endif |
@@ -221,38 +223,23 @@ static struct irq_chip bfin_internal_irqchip = { | |||
221 | #ifdef BF537_GENERIC_ERROR_INT_DEMUX | 223 | #ifdef BF537_GENERIC_ERROR_INT_DEMUX |
222 | static int error_int_mask; | 224 | static int error_int_mask; |
223 | 225 | ||
224 | static void bfin_generic_error_ack_irq(unsigned int irq) | ||
225 | { | ||
226 | |||
227 | } | ||
228 | |||
229 | static void bfin_generic_error_mask_irq(unsigned int irq) | 226 | static void bfin_generic_error_mask_irq(unsigned int irq) |
230 | { | 227 | { |
231 | error_int_mask &= ~(1L << (irq - IRQ_PPI_ERROR)); | 228 | error_int_mask &= ~(1L << (irq - IRQ_PPI_ERROR)); |
232 | 229 | ||
233 | if (!error_int_mask) { | 230 | if (!error_int_mask) |
234 | local_irq_disable(); | 231 | bfin_internal_mask_irq(IRQ_GENERIC_ERROR); |
235 | bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() & | ||
236 | ~(1 << (IRQ_GENERIC_ERROR - | ||
237 | (IRQ_CORETMR + 1)))); | ||
238 | SSYNC(); | ||
239 | local_irq_enable(); | ||
240 | } | ||
241 | } | 232 | } |
242 | 233 | ||
243 | static void bfin_generic_error_unmask_irq(unsigned int irq) | 234 | static void bfin_generic_error_unmask_irq(unsigned int irq) |
244 | { | 235 | { |
245 | local_irq_disable(); | 236 | bfin_internal_unmask_irq(IRQ_GENERIC_ERROR); |
246 | bfin_write_SIC_IMASK(bfin_read_SIC_IMASK() | 1 << | ||
247 | (IRQ_GENERIC_ERROR - (IRQ_CORETMR + 1))); | ||
248 | SSYNC(); | ||
249 | local_irq_enable(); | ||
250 | |||
251 | error_int_mask |= 1L << (irq - IRQ_PPI_ERROR); | 237 | error_int_mask |= 1L << (irq - IRQ_PPI_ERROR); |
252 | } | 238 | } |
253 | 239 | ||
254 | static struct irq_chip bfin_generic_error_irqchip = { | 240 | static struct irq_chip bfin_generic_error_irqchip = { |
255 | .ack = bfin_generic_error_ack_irq, | 241 | .ack = bfin_ack_noop, |
242 | .mask_ack = bfin_generic_error_mask_irq, | ||
256 | .mask = bfin_generic_error_mask_irq, | 243 | .mask = bfin_generic_error_mask_irq, |
257 | .unmask = bfin_generic_error_unmask_irq, | 244 | .unmask = bfin_generic_error_unmask_irq, |
258 | }; | 245 | }; |
@@ -608,7 +595,7 @@ static struct pin_int_t *pint[NR_PINT_SYS_IRQS] = { | |||
608 | (struct pin_int_t *)PINT3_MASK_SET, | 595 | (struct pin_int_t *)PINT3_MASK_SET, |
609 | }; | 596 | }; |
610 | 597 | ||
611 | unsigned short get_irq_base(u8 bank, u8 bmap) | 598 | inline unsigned short get_irq_base(u8 bank, u8 bmap) |
612 | { | 599 | { |
613 | 600 | ||
614 | u16 irq_base; | 601 | u16 irq_base; |
@@ -969,17 +956,12 @@ int __init init_arch_irq(void) | |||
969 | #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561) | 956 | #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561) |
970 | bfin_write_SIC_IMASK0(SIC_UNMASK_ALL); | 957 | bfin_write_SIC_IMASK0(SIC_UNMASK_ALL); |
971 | bfin_write_SIC_IMASK1(SIC_UNMASK_ALL); | 958 | bfin_write_SIC_IMASK1(SIC_UNMASK_ALL); |
972 | bfin_write_SIC_IWR0(IWR_ENABLE_ALL); | ||
973 | bfin_write_SIC_IWR1(IWR_ENABLE_ALL); | ||
974 | # ifdef CONFIG_BF54x | 959 | # ifdef CONFIG_BF54x |
975 | bfin_write_SIC_IMASK2(SIC_UNMASK_ALL); | 960 | bfin_write_SIC_IMASK2(SIC_UNMASK_ALL); |
976 | bfin_write_SIC_IWR2(IWR_ENABLE_ALL); | ||
977 | # endif | 961 | # endif |
978 | #else | 962 | #else |
979 | bfin_write_SIC_IMASK(SIC_UNMASK_ALL); | 963 | bfin_write_SIC_IMASK(SIC_UNMASK_ALL); |
980 | bfin_write_SIC_IWR(IWR_ENABLE_ALL); | ||
981 | #endif | 964 | #endif |
982 | SSYNC(); | ||
983 | 965 | ||
984 | local_irq_disable(); | 966 | local_irq_disable(); |
985 | 967 | ||
@@ -1001,90 +983,53 @@ int __init init_arch_irq(void) | |||
1001 | set_irq_chip(irq, &bfin_core_irqchip); | 983 | set_irq_chip(irq, &bfin_core_irqchip); |
1002 | else | 984 | else |
1003 | set_irq_chip(irq, &bfin_internal_irqchip); | 985 | set_irq_chip(irq, &bfin_internal_irqchip); |
1004 | #ifdef BF537_GENERIC_ERROR_INT_DEMUX | ||
1005 | if (irq != IRQ_GENERIC_ERROR) { | ||
1006 | #endif | ||
1007 | 986 | ||
1008 | switch (irq) { | 987 | switch (irq) { |
1009 | #if defined(CONFIG_BF53x) | 988 | #if defined(CONFIG_BF53x) |
1010 | case IRQ_PROG_INTA: | 989 | case IRQ_PROG_INTA: |
1011 | set_irq_chained_handler(irq, | ||
1012 | bfin_demux_gpio_irq); | ||
1013 | break; | ||
1014 | # if defined(BF537_FAMILY) && !(defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)) | 990 | # if defined(BF537_FAMILY) && !(defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)) |
1015 | case IRQ_MAC_RX: | 991 | case IRQ_MAC_RX: |
1016 | set_irq_chained_handler(irq, | ||
1017 | bfin_demux_gpio_irq); | ||
1018 | break; | ||
1019 | # endif | 992 | # endif |
1020 | #elif defined(CONFIG_BF54x) | 993 | #elif defined(CONFIG_BF54x) |
1021 | case IRQ_PINT0: | 994 | case IRQ_PINT0: |
1022 | set_irq_chained_handler(irq, | 995 | case IRQ_PINT1: |
1023 | bfin_demux_gpio_irq); | 996 | case IRQ_PINT2: |
1024 | break; | 997 | case IRQ_PINT3: |
1025 | case IRQ_PINT1: | ||
1026 | set_irq_chained_handler(irq, | ||
1027 | bfin_demux_gpio_irq); | ||
1028 | break; | ||
1029 | case IRQ_PINT2: | ||
1030 | set_irq_chained_handler(irq, | ||
1031 | bfin_demux_gpio_irq); | ||
1032 | break; | ||
1033 | case IRQ_PINT3: | ||
1034 | set_irq_chained_handler(irq, | ||
1035 | bfin_demux_gpio_irq); | ||
1036 | break; | ||
1037 | #elif defined(CONFIG_BF52x) | 998 | #elif defined(CONFIG_BF52x) |
1038 | case IRQ_PORTF_INTA: | 999 | case IRQ_PORTF_INTA: |
1039 | set_irq_chained_handler(irq, | 1000 | case IRQ_PORTG_INTA: |
1040 | bfin_demux_gpio_irq); | 1001 | case IRQ_PORTH_INTA: |
1041 | break; | ||
1042 | case IRQ_PORTG_INTA: | ||
1043 | set_irq_chained_handler(irq, | ||
1044 | bfin_demux_gpio_irq); | ||
1045 | break; | ||
1046 | case IRQ_PORTH_INTA: | ||
1047 | set_irq_chained_handler(irq, | ||
1048 | bfin_demux_gpio_irq); | ||
1049 | break; | ||
1050 | #elif defined(CONFIG_BF561) | 1002 | #elif defined(CONFIG_BF561) |
1051 | case IRQ_PROG0_INTA: | 1003 | case IRQ_PROG0_INTA: |
1052 | set_irq_chained_handler(irq, | 1004 | case IRQ_PROG1_INTA: |
1053 | bfin_demux_gpio_irq); | 1005 | case IRQ_PROG2_INTA: |
1054 | break; | ||
1055 | case IRQ_PROG1_INTA: | ||
1056 | set_irq_chained_handler(irq, | ||
1057 | bfin_demux_gpio_irq); | ||
1058 | break; | ||
1059 | case IRQ_PROG2_INTA: | ||
1060 | set_irq_chained_handler(irq, | ||
1061 | bfin_demux_gpio_irq); | ||
1062 | break; | ||
1063 | #endif | 1006 | #endif |
1064 | default: | 1007 | set_irq_chained_handler(irq, |
1065 | set_irq_handler(irq, handle_simple_irq); | 1008 | bfin_demux_gpio_irq); |
1066 | break; | 1009 | break; |
1067 | } | ||
1068 | |||
1069 | #ifdef BF537_GENERIC_ERROR_INT_DEMUX | 1010 | #ifdef BF537_GENERIC_ERROR_INT_DEMUX |
1070 | } else { | 1011 | case IRQ_GENERIC_ERROR: |
1071 | set_irq_handler(irq, bfin_demux_error_irq); | 1012 | set_irq_handler(irq, bfin_demux_error_irq); |
1072 | } | 1013 | |
1014 | break; | ||
1073 | #endif | 1015 | #endif |
1016 | default: | ||
1017 | set_irq_handler(irq, handle_simple_irq); | ||
1018 | break; | ||
1019 | } | ||
1074 | } | 1020 | } |
1021 | |||
1075 | #ifdef BF537_GENERIC_ERROR_INT_DEMUX | 1022 | #ifdef BF537_GENERIC_ERROR_INT_DEMUX |
1076 | for (irq = IRQ_PPI_ERROR; irq <= IRQ_UART1_ERROR; irq++) { | 1023 | for (irq = IRQ_PPI_ERROR; irq <= IRQ_UART1_ERROR; irq++) |
1077 | set_irq_chip(irq, &bfin_generic_error_irqchip); | 1024 | set_irq_chip_and_handler(irq, &bfin_generic_error_irqchip, |
1078 | set_irq_handler(irq, handle_level_irq); | 1025 | handle_level_irq); |
1079 | } | ||
1080 | #endif | 1026 | #endif |
1081 | 1027 | ||
1082 | for (irq = GPIO_IRQ_BASE; irq < NR_IRQS; irq++) { | 1028 | /* if configured as edge, then will be changed to do_edge_IRQ */ |
1029 | for (irq = GPIO_IRQ_BASE; irq < NR_IRQS; irq++) | ||
1030 | set_irq_chip_and_handler(irq, &bfin_gpio_irqchip, | ||
1031 | handle_level_irq); | ||
1083 | 1032 | ||
1084 | set_irq_chip(irq, &bfin_gpio_irqchip); | ||
1085 | /* if configured as edge, then will be changed to do_edge_IRQ */ | ||
1086 | set_irq_handler(irq, handle_level_irq); | ||
1087 | } | ||
1088 | 1033 | ||
1089 | bfin_write_IMASK(0); | 1034 | bfin_write_IMASK(0); |
1090 | CSYNC(); | 1035 | CSYNC(); |
@@ -1106,6 +1051,16 @@ int __init init_arch_irq(void) | |||
1106 | IMASK_IVG14 | IMASK_IVG13 | IMASK_IVG12 | IMASK_IVG11 | | 1051 | IMASK_IVG14 | IMASK_IVG13 | IMASK_IVG12 | IMASK_IVG11 | |
1107 | IMASK_IVG10 | IMASK_IVG9 | IMASK_IVG8 | IMASK_IVG7 | IMASK_IVGHW; | 1052 | IMASK_IVG10 | IMASK_IVG9 | IMASK_IVG8 | IMASK_IVG7 | IMASK_IVGHW; |
1108 | 1053 | ||
1054 | #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561) | ||
1055 | bfin_write_SIC_IWR0(IWR_ENABLE_ALL); | ||
1056 | bfin_write_SIC_IWR1(IWR_ENABLE_ALL); | ||
1057 | # ifdef CONFIG_BF54x | ||
1058 | bfin_write_SIC_IWR2(IWR_ENABLE_ALL); | ||
1059 | # endif | ||
1060 | #else | ||
1061 | bfin_write_SIC_IWR(IWR_ENABLE_ALL); | ||
1062 | #endif | ||
1063 | |||
1109 | return 0; | 1064 | return 0; |
1110 | } | 1065 | } |
1111 | 1066 | ||
@@ -1122,7 +1077,6 @@ void do_irq(int vec, struct pt_regs *fp) | |||
1122 | #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561) | 1077 | #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561) |
1123 | unsigned long sic_status[3]; | 1078 | unsigned long sic_status[3]; |
1124 | 1079 | ||
1125 | SSYNC(); | ||
1126 | sic_status[0] = bfin_read_SIC_ISR0() & bfin_read_SIC_IMASK0(); | 1080 | sic_status[0] = bfin_read_SIC_ISR0() & bfin_read_SIC_IMASK0(); |
1127 | sic_status[1] = bfin_read_SIC_ISR1() & bfin_read_SIC_IMASK1(); | 1081 | sic_status[1] = bfin_read_SIC_ISR1() & bfin_read_SIC_IMASK1(); |
1128 | #ifdef CONFIG_BF54x | 1082 | #ifdef CONFIG_BF54x |
@@ -1138,7 +1092,7 @@ void do_irq(int vec, struct pt_regs *fp) | |||
1138 | } | 1092 | } |
1139 | #else | 1093 | #else |
1140 | unsigned long sic_status; | 1094 | unsigned long sic_status; |
1141 | SSYNC(); | 1095 | |
1142 | sic_status = bfin_read_SIC_IMASK() & bfin_read_SIC_ISR(); | 1096 | sic_status = bfin_read_SIC_IMASK() & bfin_read_SIC_ISR(); |
1143 | 1097 | ||
1144 | for (;; ivg++) { | 1098 | for (;; ivg++) { |