aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-01-12 04:06:12 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 12:09:00 -0500
commitb4290a23cfa9040e2f0de5ab57d6ea65abaf053b (patch)
tree592b8ecd6a2a4b618c5de1a2573f79cd932df31e /arch/ppc
parent198a4101197797fd9cee40c17dc285dc84c5d745 (diff)
[PATCH] m68k: namespace pollution fix (custom->amiga_custom)
in amigahw.h custom renamed to amiga_custom, in drivers with few instances the same replacement, in the rest - #define custom amiga_custom in driver itself Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc')
-rw-r--r--arch/ppc/amiga/amiints.c40
-rw-r--r--arch/ppc/amiga/cia.c8
-rw-r--r--arch/ppc/amiga/config.c18
-rw-r--r--arch/ppc/platforms/apus_setup.c16
4 files changed, 41 insertions, 41 deletions
diff --git a/arch/ppc/amiga/amiints.c b/arch/ppc/amiga/amiints.c
index 91195e2ce38d..5f35cf3986f7 100644
--- a/arch/ppc/amiga/amiints.c
+++ b/arch/ppc/amiga/amiints.c
@@ -96,8 +96,8 @@ void amiga_init_IRQ(void)
96 gayle.inten = GAYLE_IRQ_IDE; 96 gayle.inten = GAYLE_IRQ_IDE;
97 97
98 /* turn off all interrupts... */ 98 /* turn off all interrupts... */
99 custom.intena = 0x7fff; 99 amiga_custom.intena = 0x7fff;
100 custom.intreq = 0x7fff; 100 amiga_custom.intreq = 0x7fff;
101 101
102#ifdef CONFIG_APUS 102#ifdef CONFIG_APUS
103 /* Clear any inter-CPU interrupt requests. Circumvents bug in 103 /* Clear any inter-CPU interrupt requests. Circumvents bug in
@@ -110,7 +110,7 @@ void amiga_init_IRQ(void)
110 APUS_WRITE(APUS_IPL_EMU, IPLEMU_SETRESET | IPLEMU_IPLMASK); 110 APUS_WRITE(APUS_IPL_EMU, IPLEMU_SETRESET | IPLEMU_IPLMASK);
111#endif 111#endif
112 /* ... and enable the master interrupt bit */ 112 /* ... and enable the master interrupt bit */
113 custom.intena = IF_SETCLR | IF_INTEN; 113 amiga_custom.intena = IF_SETCLR | IF_INTEN;
114 114
115 cia_init_IRQ(&ciaa_base); 115 cia_init_IRQ(&ciaa_base);
116 cia_init_IRQ(&ciab_base); 116 cia_init_IRQ(&ciab_base);
@@ -151,7 +151,7 @@ void amiga_enable_irq(unsigned int irq)
151 } 151 }
152 152
153 /* enable the interrupt */ 153 /* enable the interrupt */
154 custom.intena = IF_SETCLR | ami_intena_vals[irq]; 154 amiga_custom.intena = IF_SETCLR | ami_intena_vals[irq];
155} 155}
156 156
157void amiga_disable_irq(unsigned int irq) 157void amiga_disable_irq(unsigned int irq)
@@ -177,7 +177,7 @@ void amiga_disable_irq(unsigned int irq)
177 } 177 }
178 178
179 /* disable the interrupt */ 179 /* disable the interrupt */
180 custom.intena = ami_intena_vals[irq]; 180 amiga_custom.intena = ami_intena_vals[irq];
181} 181}
182 182
183inline void amiga_do_irq(int irq, struct pt_regs *fp) 183inline void amiga_do_irq(int irq, struct pt_regs *fp)
@@ -196,7 +196,7 @@ void amiga_do_irq_list(int irq, struct pt_regs *fp)
196 196
197 kstat_cpu(0).irqs[irq]++; 197 kstat_cpu(0).irqs[irq]++;
198 198
199 custom.intreq = ami_intena_vals[irq]; 199 amiga_custom.intreq = ami_intena_vals[irq];
200 200
201 for (action = desc->action; action; action = action->next) 201 for (action = desc->action; action; action = action->next)
202 action->handler(irq, action->dev_id, fp); 202 action->handler(irq, action->dev_id, fp);
@@ -208,40 +208,40 @@ void amiga_do_irq_list(int irq, struct pt_regs *fp)
208 208
209static void ami_int1(int irq, void *dev_id, struct pt_regs *fp) 209static void ami_int1(int irq, void *dev_id, struct pt_regs *fp)
210{ 210{
211 unsigned short ints = custom.intreqr & custom.intenar; 211 unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
212 212
213 /* if serial transmit buffer empty, interrupt */ 213 /* if serial transmit buffer empty, interrupt */
214 if (ints & IF_TBE) { 214 if (ints & IF_TBE) {
215 custom.intreq = IF_TBE; 215 amiga_custom.intreq = IF_TBE;
216 amiga_do_irq(IRQ_AMIGA_TBE, fp); 216 amiga_do_irq(IRQ_AMIGA_TBE, fp);
217 } 217 }
218 218
219 /* if floppy disk transfer complete, interrupt */ 219 /* if floppy disk transfer complete, interrupt */
220 if (ints & IF_DSKBLK) { 220 if (ints & IF_DSKBLK) {
221 custom.intreq = IF_DSKBLK; 221 amiga_custom.intreq = IF_DSKBLK;
222 amiga_do_irq(IRQ_AMIGA_DSKBLK, fp); 222 amiga_do_irq(IRQ_AMIGA_DSKBLK, fp);
223 } 223 }
224 224
225 /* if software interrupt set, interrupt */ 225 /* if software interrupt set, interrupt */
226 if (ints & IF_SOFT) { 226 if (ints & IF_SOFT) {
227 custom.intreq = IF_SOFT; 227 amiga_custom.intreq = IF_SOFT;
228 amiga_do_irq(IRQ_AMIGA_SOFT, fp); 228 amiga_do_irq(IRQ_AMIGA_SOFT, fp);
229 } 229 }
230} 230}
231 231
232static void ami_int3(int irq, void *dev_id, struct pt_regs *fp) 232static void ami_int3(int irq, void *dev_id, struct pt_regs *fp)
233{ 233{
234 unsigned short ints = custom.intreqr & custom.intenar; 234 unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
235 235
236 /* if a blitter interrupt */ 236 /* if a blitter interrupt */
237 if (ints & IF_BLIT) { 237 if (ints & IF_BLIT) {
238 custom.intreq = IF_BLIT; 238 amiga_custom.intreq = IF_BLIT;
239 amiga_do_irq(IRQ_AMIGA_BLIT, fp); 239 amiga_do_irq(IRQ_AMIGA_BLIT, fp);
240 } 240 }
241 241
242 /* if a copper interrupt */ 242 /* if a copper interrupt */
243 if (ints & IF_COPER) { 243 if (ints & IF_COPER) {
244 custom.intreq = IF_COPER; 244 amiga_custom.intreq = IF_COPER;
245 amiga_do_irq(IRQ_AMIGA_COPPER, fp); 245 amiga_do_irq(IRQ_AMIGA_COPPER, fp);
246 } 246 }
247 247
@@ -252,36 +252,36 @@ static void ami_int3(int irq, void *dev_id, struct pt_regs *fp)
252 252
253static void ami_int4(int irq, void *dev_id, struct pt_regs *fp) 253static void ami_int4(int irq, void *dev_id, struct pt_regs *fp)
254{ 254{
255 unsigned short ints = custom.intreqr & custom.intenar; 255 unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
256 256
257 /* if audio 0 interrupt */ 257 /* if audio 0 interrupt */
258 if (ints & IF_AUD0) { 258 if (ints & IF_AUD0) {
259 custom.intreq = IF_AUD0; 259 amiga_custom.intreq = IF_AUD0;
260 amiga_do_irq(IRQ_AMIGA_AUD0, fp); 260 amiga_do_irq(IRQ_AMIGA_AUD0, fp);
261 } 261 }
262 262
263 /* if audio 1 interrupt */ 263 /* if audio 1 interrupt */
264 if (ints & IF_AUD1) { 264 if (ints & IF_AUD1) {
265 custom.intreq = IF_AUD1; 265 amiga_custom.intreq = IF_AUD1;
266 amiga_do_irq(IRQ_AMIGA_AUD1, fp); 266 amiga_do_irq(IRQ_AMIGA_AUD1, fp);
267 } 267 }
268 268
269 /* if audio 2 interrupt */ 269 /* if audio 2 interrupt */
270 if (ints & IF_AUD2) { 270 if (ints & IF_AUD2) {
271 custom.intreq = IF_AUD2; 271 amiga_custom.intreq = IF_AUD2;
272 amiga_do_irq(IRQ_AMIGA_AUD2, fp); 272 amiga_do_irq(IRQ_AMIGA_AUD2, fp);
273 } 273 }
274 274
275 /* if audio 3 interrupt */ 275 /* if audio 3 interrupt */
276 if (ints & IF_AUD3) { 276 if (ints & IF_AUD3) {
277 custom.intreq = IF_AUD3; 277 amiga_custom.intreq = IF_AUD3;
278 amiga_do_irq(IRQ_AMIGA_AUD3, fp); 278 amiga_do_irq(IRQ_AMIGA_AUD3, fp);
279 } 279 }
280} 280}
281 281
282static void ami_int5(int irq, void *dev_id, struct pt_regs *fp) 282static void ami_int5(int irq, void *dev_id, struct pt_regs *fp)
283{ 283{
284 unsigned short ints = custom.intreqr & custom.intenar; 284 unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
285 285
286 /* if serial receive buffer full interrupt */ 286 /* if serial receive buffer full interrupt */
287 if (ints & IF_RBF) { 287 if (ints & IF_RBF) {
@@ -291,7 +291,7 @@ static void ami_int5(int irq, void *dev_id, struct pt_regs *fp)
291 291
292 /* if a disk sync interrupt */ 292 /* if a disk sync interrupt */
293 if (ints & IF_DSKSYN) { 293 if (ints & IF_DSKSYN) {
294 custom.intreq = IF_DSKSYN; 294 amiga_custom.intreq = IF_DSKSYN;
295 amiga_do_irq(IRQ_AMIGA_DSKSYN, fp); 295 amiga_do_irq(IRQ_AMIGA_DSKSYN, fp);
296 } 296 }
297} 297}
diff --git a/arch/ppc/amiga/cia.c b/arch/ppc/amiga/cia.c
index ad961465b6cb..4431c58f611a 100644
--- a/arch/ppc/amiga/cia.c
+++ b/arch/ppc/amiga/cia.c
@@ -66,7 +66,7 @@ static unsigned char cia_set_irq_private(struct ciabase *base,
66 else 66 else
67 base->icr_data &= ~mask; 67 base->icr_data &= ~mask;
68 if (base->icr_data & base->icr_mask) 68 if (base->icr_data & base->icr_mask)
69 custom.intreq = IF_SETCLR | base->int_mask; 69 amiga_custom.intreq = IF_SETCLR | base->int_mask;
70 return old & base->icr_mask; 70 return old & base->icr_mask;
71} 71}
72 72
@@ -114,7 +114,7 @@ static unsigned char cia_able_irq_private(struct ciabase *base,
114 base->icr_mask &= CIA_ICR_ALL; 114 base->icr_mask &= CIA_ICR_ALL;
115 115
116 if (base->icr_data & base->icr_mask) 116 if (base->icr_data & base->icr_mask)
117 custom.intreq = IF_SETCLR | base->int_mask; 117 amiga_custom.intreq = IF_SETCLR | base->int_mask;
118 return old; 118 return old;
119} 119}
120 120
@@ -145,7 +145,7 @@ static void cia_handler(int irq, void *dev_id, struct pt_regs *fp)
145 irq = base->cia_irq; 145 irq = base->cia_irq;
146 desc = irq_desc + irq; 146 desc = irq_desc + irq;
147 ints = cia_set_irq_private(base, CIA_ICR_ALL); 147 ints = cia_set_irq_private(base, CIA_ICR_ALL);
148 custom.intreq = base->int_mask; 148 amiga_custom.intreq = base->int_mask;
149 for (i = 0; i < CIA_IRQS; i++, irq++) { 149 for (i = 0; i < CIA_IRQS; i++, irq++) {
150 if (ints & 1) { 150 if (ints & 1) {
151 kstat_cpu(0).irqs[irq]++; 151 kstat_cpu(0).irqs[irq]++;
@@ -174,5 +174,5 @@ void __init cia_init_IRQ(struct ciabase *base)
174 action->name = base->name; 174 action->name = base->name;
175 setup_irq(base->handler_irq, &amiga_sys_irqaction[base->handler_irq-IRQ_AMIGA_AUTO]); 175 setup_irq(base->handler_irq, &amiga_sys_irqaction[base->handler_irq-IRQ_AMIGA_AUTO]);
176 176
177 custom.intena = IF_SETCLR | base->int_mask; 177 amiga_custom.intena = IF_SETCLR | base->int_mask;
178} 178}
diff --git a/arch/ppc/amiga/config.c b/arch/ppc/amiga/config.c
index af881d7454dd..55794d1d4ec3 100644
--- a/arch/ppc/amiga/config.c
+++ b/arch/ppc/amiga/config.c
@@ -281,7 +281,7 @@ static void __init amiga_identify(void)
281 case CS_OCS: 281 case CS_OCS:
282 case CS_ECS: 282 case CS_ECS:
283 case CS_AGA: 283 case CS_AGA:
284 switch (custom.deniseid & 0xf) { 284 switch (amiga_custom.deniseid & 0xf) {
285 case 0x0c: 285 case 0x0c:
286 AMIGAHW_SET(DENISE_HR); 286 AMIGAHW_SET(DENISE_HR);
287 break; 287 break;
@@ -294,7 +294,7 @@ static void __init amiga_identify(void)
294 AMIGAHW_SET(DENISE); 294 AMIGAHW_SET(DENISE);
295 break; 295 break;
296 } 296 }
297 switch ((custom.vposr>>8) & 0x7f) { 297 switch ((amiga_custom.vposr>>8) & 0x7f) {
298 case 0x00: 298 case 0x00:
299 AMIGAHW_SET(AGNUS_PAL); 299 AMIGAHW_SET(AGNUS_PAL);
300 break; 300 break;
@@ -432,9 +432,9 @@ void __init config_amiga(void)
432 amiga_colorclock = 5*amiga_eclock; /* 3.5 MHz */ 432 amiga_colorclock = 5*amiga_eclock; /* 3.5 MHz */
433 433
434 /* clear all DMA bits */ 434 /* clear all DMA bits */
435 custom.dmacon = DMAF_ALL; 435 amiga_custom.dmacon = DMAF_ALL;
436 /* ensure that the DMA master bit is set */ 436 /* ensure that the DMA master bit is set */
437 custom.dmacon = DMAF_SETCLR | DMAF_MASTER; 437 amiga_custom.dmacon = DMAF_SETCLR | DMAF_MASTER;
438 438
439 /* request all RAM */ 439 /* request all RAM */
440 for (i = 0; i < m68k_num_memory; i++) { 440 for (i = 0; i < m68k_num_memory; i++) {
@@ -753,9 +753,9 @@ static void amiga_savekmsg_init(void)
753 753
754static void amiga_serial_putc(char c) 754static void amiga_serial_putc(char c)
755{ 755{
756 custom.serdat = (unsigned char)c | 0x100; 756 amiga_custom.serdat = (unsigned char)c | 0x100;
757 mb(); 757 mb();
758 while (!(custom.serdatr & 0x2000)) 758 while (!(amiga_custom.serdatr & 0x2000))
759 ; 759 ;
760} 760}
761 761
@@ -785,11 +785,11 @@ int amiga_serial_console_wait_key(struct console *co)
785{ 785{
786 int ch; 786 int ch;
787 787
788 while (!(custom.intreqr & IF_RBF)) 788 while (!(amiga_custom.intreqr & IF_RBF))
789 barrier(); 789 barrier();
790 ch = custom.serdatr & 0xff; 790 ch = amiga_custom.serdatr & 0xff;
791 /* clear the interrupt, so that another character can be read */ 791 /* clear the interrupt, so that another character can be read */
792 custom.intreq = IF_RBF; 792 amiga_custom.intreq = IF_RBF;
793 return ch; 793 return ch;
794} 794}
795 795
diff --git a/arch/ppc/platforms/apus_setup.c b/arch/ppc/platforms/apus_setup.c
index 2f74fde98ebc..f62179f14cbb 100644
--- a/arch/ppc/platforms/apus_setup.c
+++ b/arch/ppc/platforms/apus_setup.c
@@ -574,9 +574,9 @@ static __inline__ void ser_RTSon(void)
574 574
575int __debug_ser_out( unsigned char c ) 575int __debug_ser_out( unsigned char c )
576{ 576{
577 custom.serdat = c | 0x100; 577 amiga_custom.serdat = c | 0x100;
578 mb(); 578 mb();
579 while (!(custom.serdatr & 0x2000)) 579 while (!(amiga_custom.serdatr & 0x2000))
580 barrier(); 580 barrier();
581 return 1; 581 return 1;
582} 582}
@@ -586,11 +586,11 @@ unsigned char __debug_ser_in( void )
586 unsigned char c; 586 unsigned char c;
587 587
588 /* XXX: is that ok?? derived from amiga_ser.c... */ 588 /* XXX: is that ok?? derived from amiga_ser.c... */
589 while( !(custom.intreqr & IF_RBF) ) 589 while( !(amiga_custom.intreqr & IF_RBF) )
590 barrier(); 590 barrier();
591 c = custom.serdatr; 591 c = amiga_custom.serdatr;
592 /* clear the interrupt, so that another character can be read */ 592 /* clear the interrupt, so that another character can be read */
593 custom.intreq = IF_RBF; 593 amiga_custom.intreq = IF_RBF;
594 return c; 594 return c;
595} 595}
596 596
@@ -601,10 +601,10 @@ int __debug_serinit( void )
601 local_irq_save(flags); 601 local_irq_save(flags);
602 602
603 /* turn off Rx and Tx interrupts */ 603 /* turn off Rx and Tx interrupts */
604 custom.intena = IF_RBF | IF_TBE; 604 amiga_custom.intena = IF_RBF | IF_TBE;
605 605
606 /* clear any pending interrupt */ 606 /* clear any pending interrupt */
607 custom.intreq = IF_RBF | IF_TBE; 607 amiga_custom.intreq = IF_RBF | IF_TBE;
608 608
609 local_irq_restore(flags); 609 local_irq_restore(flags);
610 610
@@ -617,7 +617,7 @@ int __debug_serinit( void )
617 617
618#ifdef CONFIG_KGDB 618#ifdef CONFIG_KGDB
619 /* turn Rx interrupts on for GDB */ 619 /* turn Rx interrupts on for GDB */
620 custom.intena = IF_SETCLR | IF_RBF; 620 amiga_custom.intena = IF_SETCLR | IF_RBF;
621 ser_RTSon(); 621 ser_RTSon();
622#endif 622#endif
623 623