Skip to content

Commit

Permalink
m68k/mac: Kill psc_present
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geert Uytterhoeven committed Nov 23, 2015
1 parent 1ec2183 commit 70bc53b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion arch/m68k/include/asm/mac_psc.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@
#ifndef __ASSEMBLY__

extern volatile __u8 *psc;
extern int psc_present;

extern void psc_register_interrupts(void);
extern void psc_irq_enable(int);
Expand Down
6 changes: 3 additions & 3 deletions arch/m68k/mac/macints.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
7 changes: 3 additions & 4 deletions arch/m68k/mac/psc.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

#define DEBUG_PSC

int psc_present;
volatile __u8 *psc;
EXPORT_SYMBOL_GPL(psc);

Expand All @@ -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,
Expand Down Expand Up @@ -81,7 +82,6 @@ void __init psc_init(void)
&& macintosh_config->ident != MAC_MODEL_Q840)
{
psc = NULL;
psc_present = 0;
return;
}

Expand All @@ -91,7 +91,6 @@ void __init psc_init(void)
*/

psc = (void *) PSC_BASE;
psc_present = 1;

printk("PSC detected at %p\n", psc);

Expand Down

0 comments on commit 70bc53b

Please sign in to comment.