diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-01-12 04:06:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 12:09:00 -0500 |
commit | b4290a23cfa9040e2f0de5ab57d6ea65abaf053b (patch) | |
tree | 592b8ecd6a2a4b618c5de1a2573f79cd932df31e /arch/m68k | |
parent | 198a4101197797fd9cee40c17dc285dc84c5d745 (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/m68k')
-rw-r--r-- | arch/m68k/amiga/amiints.c | 46 | ||||
-rw-r--r-- | arch/m68k/amiga/amisound.c | 2 | ||||
-rw-r--r-- | arch/m68k/amiga/cia.c | 8 | ||||
-rw-r--r-- | arch/m68k/amiga/config.c | 18 | ||||
-rw-r--r-- | arch/m68k/kernel/asm-offsets.c | 2 |
5 files changed, 39 insertions, 37 deletions
diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c index d9edf2d1a492..b0aa61bf8700 100644 --- a/arch/m68k/amiga/amiints.c +++ b/arch/m68k/amiga/amiints.c | |||
@@ -126,9 +126,9 @@ void __init amiga_init_IRQ(void) | |||
126 | gayle.inten = GAYLE_IRQ_IDE; | 126 | gayle.inten = GAYLE_IRQ_IDE; |
127 | 127 | ||
128 | /* turn off all interrupts and enable the master interrupt bit */ | 128 | /* turn off all interrupts and enable the master interrupt bit */ |
129 | custom.intena = 0x7fff; | 129 | amiga_custom.intena = 0x7fff; |
130 | custom.intreq = 0x7fff; | 130 | amiga_custom.intreq = 0x7fff; |
131 | custom.intena = IF_SETCLR | IF_INTEN; | 131 | amiga_custom.intena = IF_SETCLR | IF_INTEN; |
132 | 132 | ||
133 | cia_init_IRQ(&ciaa_base); | 133 | cia_init_IRQ(&ciaa_base); |
134 | cia_init_IRQ(&ciab_base); | 134 | cia_init_IRQ(&ciab_base); |
@@ -245,7 +245,7 @@ int amiga_request_irq(unsigned int irq, | |||
245 | 245 | ||
246 | /* enable the interrupt */ | 246 | /* enable the interrupt */ |
247 | if (irq < IRQ_AMIGA_PORTS && !ami_ablecount[irq]) | 247 | if (irq < IRQ_AMIGA_PORTS && !ami_ablecount[irq]) |
248 | custom.intena = IF_SETCLR | amiga_intena_vals[irq]; | 248 | amiga_custom.intena = IF_SETCLR | amiga_intena_vals[irq]; |
249 | 249 | ||
250 | return error; | 250 | return error; |
251 | } | 251 | } |
@@ -274,7 +274,7 @@ void amiga_free_irq(unsigned int irq, void *dev_id) | |||
274 | amiga_delete_irq(&ami_irq_list[irq], dev_id); | 274 | amiga_delete_irq(&ami_irq_list[irq], dev_id); |
275 | /* if server list empty, disable the interrupt */ | 275 | /* if server list empty, disable the interrupt */ |
276 | if (!ami_irq_list[irq] && irq < IRQ_AMIGA_PORTS) | 276 | if (!ami_irq_list[irq] && irq < IRQ_AMIGA_PORTS) |
277 | custom.intena = amiga_intena_vals[irq]; | 277 | amiga_custom.intena = amiga_intena_vals[irq]; |
278 | } else { | 278 | } else { |
279 | if (ami_irq_list[irq]->dev_id != dev_id) | 279 | if (ami_irq_list[irq]->dev_id != dev_id) |
280 | printk("%s: removing probably wrong IRQ %d from %s\n", | 280 | printk("%s: removing probably wrong IRQ %d from %s\n", |
@@ -283,7 +283,7 @@ void amiga_free_irq(unsigned int irq, void *dev_id) | |||
283 | ami_irq_list[irq]->flags = 0; | 283 | ami_irq_list[irq]->flags = 0; |
284 | ami_irq_list[irq]->dev_id = NULL; | 284 | ami_irq_list[irq]->dev_id = NULL; |
285 | ami_irq_list[irq]->devname = NULL; | 285 | ami_irq_list[irq]->devname = NULL; |
286 | custom.intena = amiga_intena_vals[irq]; | 286 | amiga_custom.intena = amiga_intena_vals[irq]; |
287 | } | 287 | } |
288 | } | 288 | } |
289 | 289 | ||
@@ -327,7 +327,7 @@ void amiga_enable_irq(unsigned int irq) | |||
327 | } | 327 | } |
328 | 328 | ||
329 | /* enable the interrupt */ | 329 | /* enable the interrupt */ |
330 | custom.intena = IF_SETCLR | amiga_intena_vals[irq]; | 330 | amiga_custom.intena = IF_SETCLR | amiga_intena_vals[irq]; |
331 | } | 331 | } |
332 | 332 | ||
333 | void amiga_disable_irq(unsigned int irq) | 333 | void amiga_disable_irq(unsigned int irq) |
@@ -358,7 +358,7 @@ void amiga_disable_irq(unsigned int irq) | |||
358 | } | 358 | } |
359 | 359 | ||
360 | /* disable the interrupt */ | 360 | /* disable the interrupt */ |
361 | custom.intena = amiga_intena_vals[irq]; | 361 | amiga_custom.intena = amiga_intena_vals[irq]; |
362 | } | 362 | } |
363 | 363 | ||
364 | inline void amiga_do_irq(int irq, struct pt_regs *fp) | 364 | inline void amiga_do_irq(int irq, struct pt_regs *fp) |
@@ -373,7 +373,7 @@ void amiga_do_irq_list(int irq, struct pt_regs *fp) | |||
373 | 373 | ||
374 | kstat_cpu(0).irqs[SYS_IRQS + irq]++; | 374 | kstat_cpu(0).irqs[SYS_IRQS + irq]++; |
375 | 375 | ||
376 | custom.intreq = amiga_intena_vals[irq]; | 376 | amiga_custom.intreq = amiga_intena_vals[irq]; |
377 | 377 | ||
378 | for (node = ami_irq_list[irq]; node; node = node->next) | 378 | for (node = ami_irq_list[irq]; node; node = node->next) |
379 | node->handler(irq, node->dev_id, fp); | 379 | node->handler(irq, node->dev_id, fp); |
@@ -385,23 +385,23 @@ void amiga_do_irq_list(int irq, struct pt_regs *fp) | |||
385 | 385 | ||
386 | static irqreturn_t ami_int1(int irq, void *dev_id, struct pt_regs *fp) | 386 | static irqreturn_t ami_int1(int irq, void *dev_id, struct pt_regs *fp) |
387 | { | 387 | { |
388 | unsigned short ints = custom.intreqr & custom.intenar; | 388 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; |
389 | 389 | ||
390 | /* if serial transmit buffer empty, interrupt */ | 390 | /* if serial transmit buffer empty, interrupt */ |
391 | if (ints & IF_TBE) { | 391 | if (ints & IF_TBE) { |
392 | custom.intreq = IF_TBE; | 392 | amiga_custom.intreq = IF_TBE; |
393 | amiga_do_irq(IRQ_AMIGA_TBE, fp); | 393 | amiga_do_irq(IRQ_AMIGA_TBE, fp); |
394 | } | 394 | } |
395 | 395 | ||
396 | /* if floppy disk transfer complete, interrupt */ | 396 | /* if floppy disk transfer complete, interrupt */ |
397 | if (ints & IF_DSKBLK) { | 397 | if (ints & IF_DSKBLK) { |
398 | custom.intreq = IF_DSKBLK; | 398 | amiga_custom.intreq = IF_DSKBLK; |
399 | amiga_do_irq(IRQ_AMIGA_DSKBLK, fp); | 399 | amiga_do_irq(IRQ_AMIGA_DSKBLK, fp); |
400 | } | 400 | } |
401 | 401 | ||
402 | /* if software interrupt set, interrupt */ | 402 | /* if software interrupt set, interrupt */ |
403 | if (ints & IF_SOFT) { | 403 | if (ints & IF_SOFT) { |
404 | custom.intreq = IF_SOFT; | 404 | amiga_custom.intreq = IF_SOFT; |
405 | amiga_do_irq(IRQ_AMIGA_SOFT, fp); | 405 | amiga_do_irq(IRQ_AMIGA_SOFT, fp); |
406 | } | 406 | } |
407 | return IRQ_HANDLED; | 407 | return IRQ_HANDLED; |
@@ -409,17 +409,17 @@ static irqreturn_t ami_int1(int irq, void *dev_id, struct pt_regs *fp) | |||
409 | 409 | ||
410 | static irqreturn_t ami_int3(int irq, void *dev_id, struct pt_regs *fp) | 410 | static irqreturn_t ami_int3(int irq, void *dev_id, struct pt_regs *fp) |
411 | { | 411 | { |
412 | unsigned short ints = custom.intreqr & custom.intenar; | 412 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; |
413 | 413 | ||
414 | /* if a blitter interrupt */ | 414 | /* if a blitter interrupt */ |
415 | if (ints & IF_BLIT) { | 415 | if (ints & IF_BLIT) { |
416 | custom.intreq = IF_BLIT; | 416 | amiga_custom.intreq = IF_BLIT; |
417 | amiga_do_irq(IRQ_AMIGA_BLIT, fp); | 417 | amiga_do_irq(IRQ_AMIGA_BLIT, fp); |
418 | } | 418 | } |
419 | 419 | ||
420 | /* if a copper interrupt */ | 420 | /* if a copper interrupt */ |
421 | if (ints & IF_COPER) { | 421 | if (ints & IF_COPER) { |
422 | custom.intreq = IF_COPER; | 422 | amiga_custom.intreq = IF_COPER; |
423 | amiga_do_irq(IRQ_AMIGA_COPPER, fp); | 423 | amiga_do_irq(IRQ_AMIGA_COPPER, fp); |
424 | } | 424 | } |
425 | 425 | ||
@@ -431,29 +431,29 @@ static irqreturn_t ami_int3(int irq, void *dev_id, struct pt_regs *fp) | |||
431 | 431 | ||
432 | static irqreturn_t ami_int4(int irq, void *dev_id, struct pt_regs *fp) | 432 | static irqreturn_t ami_int4(int irq, void *dev_id, struct pt_regs *fp) |
433 | { | 433 | { |
434 | unsigned short ints = custom.intreqr & custom.intenar; | 434 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; |
435 | 435 | ||
436 | /* if audio 0 interrupt */ | 436 | /* if audio 0 interrupt */ |
437 | if (ints & IF_AUD0) { | 437 | if (ints & IF_AUD0) { |
438 | custom.intreq = IF_AUD0; | 438 | amiga_custom.intreq = IF_AUD0; |
439 | amiga_do_irq(IRQ_AMIGA_AUD0, fp); | 439 | amiga_do_irq(IRQ_AMIGA_AUD0, fp); |
440 | } | 440 | } |
441 | 441 | ||
442 | /* if audio 1 interrupt */ | 442 | /* if audio 1 interrupt */ |
443 | if (ints & IF_AUD1) { | 443 | if (ints & IF_AUD1) { |
444 | custom.intreq = IF_AUD1; | 444 | amiga_custom.intreq = IF_AUD1; |
445 | amiga_do_irq(IRQ_AMIGA_AUD1, fp); | 445 | amiga_do_irq(IRQ_AMIGA_AUD1, fp); |
446 | } | 446 | } |
447 | 447 | ||
448 | /* if audio 2 interrupt */ | 448 | /* if audio 2 interrupt */ |
449 | if (ints & IF_AUD2) { | 449 | if (ints & IF_AUD2) { |
450 | custom.intreq = IF_AUD2; | 450 | amiga_custom.intreq = IF_AUD2; |
451 | amiga_do_irq(IRQ_AMIGA_AUD2, fp); | 451 | amiga_do_irq(IRQ_AMIGA_AUD2, fp); |
452 | } | 452 | } |
453 | 453 | ||
454 | /* if audio 3 interrupt */ | 454 | /* if audio 3 interrupt */ |
455 | if (ints & IF_AUD3) { | 455 | if (ints & IF_AUD3) { |
456 | custom.intreq = IF_AUD3; | 456 | amiga_custom.intreq = IF_AUD3; |
457 | amiga_do_irq(IRQ_AMIGA_AUD3, fp); | 457 | amiga_do_irq(IRQ_AMIGA_AUD3, fp); |
458 | } | 458 | } |
459 | return IRQ_HANDLED; | 459 | return IRQ_HANDLED; |
@@ -461,7 +461,7 @@ static irqreturn_t ami_int4(int irq, void *dev_id, struct pt_regs *fp) | |||
461 | 461 | ||
462 | static irqreturn_t ami_int5(int irq, void *dev_id, struct pt_regs *fp) | 462 | static irqreturn_t ami_int5(int irq, void *dev_id, struct pt_regs *fp) |
463 | { | 463 | { |
464 | unsigned short ints = custom.intreqr & custom.intenar; | 464 | unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; |
465 | 465 | ||
466 | /* if serial receive buffer full interrupt */ | 466 | /* if serial receive buffer full interrupt */ |
467 | if (ints & IF_RBF) { | 467 | if (ints & IF_RBF) { |
@@ -471,7 +471,7 @@ static irqreturn_t ami_int5(int irq, void *dev_id, struct pt_regs *fp) | |||
471 | 471 | ||
472 | /* if a disk sync interrupt */ | 472 | /* if a disk sync interrupt */ |
473 | if (ints & IF_DSKSYN) { | 473 | if (ints & IF_DSKSYN) { |
474 | custom.intreq = IF_DSKSYN; | 474 | amiga_custom.intreq = IF_DSKSYN; |
475 | amiga_do_irq(IRQ_AMIGA_DSKSYN, fp); | 475 | amiga_do_irq(IRQ_AMIGA_DSKSYN, fp); |
476 | } | 476 | } |
477 | return IRQ_HANDLED; | 477 | return IRQ_HANDLED; |
diff --git a/arch/m68k/amiga/amisound.c b/arch/m68k/amiga/amisound.c index bd5d134e9f12..ae94db5d93b2 100644 --- a/arch/m68k/amiga/amisound.c +++ b/arch/m68k/amiga/amisound.c | |||
@@ -24,6 +24,8 @@ static const signed char sine_data[] = { | |||
24 | }; | 24 | }; |
25 | #define DATA_SIZE (sizeof(sine_data)/sizeof(sine_data[0])) | 25 | #define DATA_SIZE (sizeof(sine_data)/sizeof(sine_data[0])) |
26 | 26 | ||
27 | #define custom amiga_custom | ||
28 | |||
27 | /* | 29 | /* |
28 | * The minimum period for audio may be modified by the frame buffer | 30 | * The minimum period for audio may be modified by the frame buffer |
29 | * device since it depends on htotal (for OCS/ECS/AGA) | 31 | * device since it depends on htotal (for OCS/ECS/AGA) |
diff --git a/arch/m68k/amiga/cia.c b/arch/m68k/amiga/cia.c index 7d55682615e3..9476eb9440f5 100644 --- a/arch/m68k/amiga/cia.c +++ b/arch/m68k/amiga/cia.c | |||
@@ -60,7 +60,7 @@ unsigned char cia_set_irq(struct ciabase *base, unsigned char mask) | |||
60 | else | 60 | else |
61 | base->icr_data &= ~mask; | 61 | base->icr_data &= ~mask; |
62 | if (base->icr_data & base->icr_mask) | 62 | if (base->icr_data & base->icr_mask) |
63 | custom.intreq = IF_SETCLR | base->int_mask; | 63 | amiga_custom.intreq = IF_SETCLR | base->int_mask; |
64 | return old & base->icr_mask; | 64 | return old & base->icr_mask; |
65 | } | 65 | } |
66 | 66 | ||
@@ -89,7 +89,7 @@ unsigned char cia_able_irq(struct ciabase *base, unsigned char mask) | |||
89 | } | 89 | } |
90 | } | 90 | } |
91 | if (base->icr_data & base->icr_mask) | 91 | if (base->icr_data & base->icr_mask) |
92 | custom.intreq = IF_SETCLR | base->int_mask; | 92 | amiga_custom.intreq = IF_SETCLR | base->int_mask; |
93 | return old; | 93 | return old; |
94 | } | 94 | } |
95 | 95 | ||
@@ -133,7 +133,7 @@ static irqreturn_t cia_handler(int irq, void *dev_id, struct pt_regs *fp) | |||
133 | mach_irq = base->cia_irq; | 133 | mach_irq = base->cia_irq; |
134 | irq = SYS_IRQS + mach_irq; | 134 | irq = SYS_IRQS + mach_irq; |
135 | ints = cia_set_irq(base, CIA_ICR_ALL); | 135 | ints = cia_set_irq(base, CIA_ICR_ALL); |
136 | custom.intreq = base->int_mask; | 136 | amiga_custom.intreq = base->int_mask; |
137 | for (i = 0; i < CIA_IRQS; i++, irq++, mach_irq++) { | 137 | for (i = 0; i < CIA_IRQS; i++, irq++, mach_irq++) { |
138 | if (ints & 1) { | 138 | if (ints & 1) { |
139 | kstat_cpu(0).irqs[irq]++; | 139 | kstat_cpu(0).irqs[irq]++; |
@@ -162,7 +162,7 @@ void __init cia_init_IRQ(struct ciabase *base) | |||
162 | /* install CIA handler */ | 162 | /* install CIA handler */ |
163 | request_irq(base->handler_irq, cia_handler, 0, base->name, base); | 163 | request_irq(base->handler_irq, cia_handler, 0, base->name, base); |
164 | 164 | ||
165 | custom.intena = IF_SETCLR | base->int_mask; | 165 | amiga_custom.intena = IF_SETCLR | base->int_mask; |
166 | } | 166 | } |
167 | 167 | ||
168 | int cia_get_irq_list(struct ciabase *base, struct seq_file *p) | 168 | int cia_get_irq_list(struct ciabase *base, struct seq_file *p) |
diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c index 4775e18a78f0..da24476db8e9 100644 --- a/arch/m68k/amiga/config.c +++ b/arch/m68k/amiga/config.c | |||
@@ -290,7 +290,7 @@ static void __init amiga_identify(void) | |||
290 | case CS_OCS: | 290 | case CS_OCS: |
291 | case CS_ECS: | 291 | case CS_ECS: |
292 | case CS_AGA: | 292 | case CS_AGA: |
293 | switch (custom.deniseid & 0xf) { | 293 | switch (amiga_custom.deniseid & 0xf) { |
294 | case 0x0c: | 294 | case 0x0c: |
295 | AMIGAHW_SET(DENISE_HR); | 295 | AMIGAHW_SET(DENISE_HR); |
296 | break; | 296 | break; |
@@ -303,7 +303,7 @@ static void __init amiga_identify(void) | |||
303 | AMIGAHW_SET(DENISE); | 303 | AMIGAHW_SET(DENISE); |
304 | break; | 304 | break; |
305 | } | 305 | } |
306 | switch ((custom.vposr>>8) & 0x7f) { | 306 | switch ((amiga_custom.vposr>>8) & 0x7f) { |
307 | case 0x00: | 307 | case 0x00: |
308 | AMIGAHW_SET(AGNUS_PAL); | 308 | AMIGAHW_SET(AGNUS_PAL); |
309 | break; | 309 | break; |
@@ -447,9 +447,9 @@ void __init config_amiga(void) | |||
447 | amiga_colorclock = 5*amiga_eclock; /* 3.5 MHz */ | 447 | amiga_colorclock = 5*amiga_eclock; /* 3.5 MHz */ |
448 | 448 | ||
449 | /* clear all DMA bits */ | 449 | /* clear all DMA bits */ |
450 | custom.dmacon = DMAF_ALL; | 450 | amiga_custom.dmacon = DMAF_ALL; |
451 | /* ensure that the DMA master bit is set */ | 451 | /* ensure that the DMA master bit is set */ |
452 | custom.dmacon = DMAF_SETCLR | DMAF_MASTER; | 452 | amiga_custom.dmacon = DMAF_SETCLR | DMAF_MASTER; |
453 | 453 | ||
454 | /* don't use Z2 RAM as system memory on Z3 capable machines */ | 454 | /* don't use Z2 RAM as system memory on Z3 capable machines */ |
455 | if (AMIGAHW_PRESENT(ZORRO3)) { | 455 | if (AMIGAHW_PRESENT(ZORRO3)) { |
@@ -830,8 +830,8 @@ static void amiga_savekmsg_init(void) | |||
830 | 830 | ||
831 | static void amiga_serial_putc(char c) | 831 | static void amiga_serial_putc(char c) |
832 | { | 832 | { |
833 | custom.serdat = (unsigned char)c | 0x100; | 833 | amiga_custom.serdat = (unsigned char)c | 0x100; |
834 | while (!(custom.serdatr & 0x2000)) | 834 | while (!(amiga_custom.serdatr & 0x2000)) |
835 | ; | 835 | ; |
836 | } | 836 | } |
837 | 837 | ||
@@ -855,11 +855,11 @@ int amiga_serial_console_wait_key(struct console *co) | |||
855 | { | 855 | { |
856 | int ch; | 856 | int ch; |
857 | 857 | ||
858 | while (!(custom.intreqr & IF_RBF)) | 858 | while (!(amiga_custom.intreqr & IF_RBF)) |
859 | barrier(); | 859 | barrier(); |
860 | ch = custom.serdatr & 0xff; | 860 | ch = amiga_custom.serdatr & 0xff; |
861 | /* clear the interrupt, so that another character can be read */ | 861 | /* clear the interrupt, so that another character can be read */ |
862 | custom.intreq = IF_RBF; | 862 | amiga_custom.intreq = IF_RBF; |
863 | return ch; | 863 | return ch; |
864 | } | 864 | } |
865 | 865 | ||
diff --git a/arch/m68k/kernel/asm-offsets.c b/arch/m68k/kernel/asm-offsets.c index c787c5ba9513..246a8820c223 100644 --- a/arch/m68k/kernel/asm-offsets.c +++ b/arch/m68k/kernel/asm-offsets.c | |||
@@ -92,7 +92,7 @@ int main(void) | |||
92 | DEFINE(TRAP_TRACE, TRAP_TRACE); | 92 | DEFINE(TRAP_TRACE, TRAP_TRACE); |
93 | 93 | ||
94 | /* offsets into the custom struct */ | 94 | /* offsets into the custom struct */ |
95 | DEFINE(CUSTOMBASE, &custom); | 95 | DEFINE(CUSTOMBASE, &amiga_custom); |
96 | DEFINE(C_INTENAR, offsetof(struct CUSTOM, intenar)); | 96 | DEFINE(C_INTENAR, offsetof(struct CUSTOM, intenar)); |
97 | DEFINE(C_INTREQR, offsetof(struct CUSTOM, intreqr)); | 97 | DEFINE(C_INTREQR, offsetof(struct CUSTOM, intreqr)); |
98 | DEFINE(C_INTENA, offsetof(struct CUSTOM, intena)); | 98 | DEFINE(C_INTENA, offsetof(struct CUSTOM, intena)); |