m68k/mac: Kill psc_present
authorGeert Uytterhoeven <geert@linux-m68k.org>
Tue, 29 Sep 2015 07:27:22 +0000 (09:27 +0200)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 23 Nov 2015 08:58:30 +0000 (09:58 +0100)
The presence of the Apple Peripheral System Controller (PSC) can be
tested for by just checking its base address pointer.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
arch/m68k/include/asm/mac_psc.h
arch/m68k/mac/macints.c
arch/m68k/mac/psc.c

index e5c0d71d154324bf39fcb2e038de4d78bd8526de..923305117a69ad5b947129da664aa97a96daf7c5 100644 (file)
 #ifndef __ASSEMBLY__
 
 extern volatile __u8 *psc;
-extern int psc_present;
 
 extern void psc_register_interrupts(void);
 extern void psc_irq_enable(int);
index 5c1a6b2ff0afc131e7ef49f048c94a1e7f9512e8..9f98c08719010e272aa2f6f2464bc5b53f3a1427 100644 (file)
@@ -174,7 +174,7 @@ void __init mac_init_IRQ(void)
                oss_register_interrupts();
        else
                via_register_interrupts();
-       if (psc_present)
+       if (psc)
                psc_register_interrupts();
        if (baboon_present)
                baboon_register_interrupts();
@@ -212,7 +212,7 @@ void mac_irq_enable(struct irq_data *data)
        case 4:
        case 5:
        case 6:
-               if (psc_present)
+               if (psc)
                        psc_irq_enable(irq);
                else if (oss_present)
                        oss_irq_enable(irq);
@@ -242,7 +242,7 @@ void mac_irq_disable(struct irq_data *data)
        case 4:
        case 5:
        case 6:
-               if (psc_present)
+               if (psc)
                        psc_irq_disable(irq);
                else if (oss_present)
                        oss_irq_disable(irq);
index 2290c0cae48beb8ab9fb22a74327bf94306c9df0..cb2b1a3a2b62d97fb12aa14993749cab1de85544 100644 (file)
@@ -27,7 +27,6 @@
 
 #define DEBUG_PSC
 
-int psc_present;
 volatile __u8 *psc;
 EXPORT_SYMBOL_GPL(psc);
 
@@ -39,7 +38,9 @@ static void psc_debug_dump(void)
 {
        int     i;
 
-       if (!psc_present) return;
+       if (!psc)
+               return;
+
        for (i = 0x30 ; i < 0x70 ; i += 0x10) {
                printk("PSC #%d:  IFR = 0x%02X IER = 0x%02X\n",
                        i >> 4,
@@ -81,7 +82,6 @@ void __init psc_init(void)
         && macintosh_config->ident != MAC_MODEL_Q840)
        {
                psc = NULL;
-               psc_present = 0;
                return;
        }
 
@@ -91,7 +91,6 @@ void __init psc_init(void)
         */
 
        psc = (void *) PSC_BASE;
-       psc_present = 1;
 
        printk("PSC detected at %p\n", psc);