diff options
author | Morten H. Larsen <m-larsen@post6.tele.dk> | 2010-06-15 13:22:11 -0400 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2010-06-15 14:19:08 -0400 |
commit | 932e0c201d28a728e25d3b641aa95bd28ceb08b4 (patch) | |
tree | 7212f254ae94954f18d7f37d4970011e123e6cb8 /arch/alpha/kernel/ns87312.c | |
parent | 5efa16ff77cb785647a480dcdc70a6b4fc787996 (diff) |
alpha: Detect Super IO chip, no IDE on Avanti, enable EPP19
This patch probes for the Super IO chip and reserves the IO range when
found. It avoids enabling the IDE interface on the Avanti family, since
none has IDE. It enables the Enhanced Parallel Port v1.9 feature.
Signed-off-by: Morten H. Larsen <m-larsen@post6.tele.dk>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'arch/alpha/kernel/ns87312.c')
-rw-r--r-- | arch/alpha/kernel/ns87312.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/arch/alpha/kernel/ns87312.c b/arch/alpha/kernel/ns87312.c deleted file mode 100644 index 342b56d24c20..000000000000 --- a/arch/alpha/kernel/ns87312.c +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/alpha/kernel/ns87312.c | ||
3 | */ | ||
4 | |||
5 | #include <linux/init.h> | ||
6 | #include <asm/io.h> | ||
7 | #include "proto.h" | ||
8 | |||
9 | |||
10 | /* | ||
11 | * The SRM console *disables* the IDE interface, this code ensures it's | ||
12 | * enabled. | ||
13 | * | ||
14 | * This code bangs on a control register of the 87312 Super I/O chip | ||
15 | * that implements parallel port/serial ports/IDE/FDI. Depending on | ||
16 | * the motherboard, the Super I/O chip can be configured through a | ||
17 | * pair of registers that are located either at I/O ports 0x26e/0x26f | ||
18 | * or 0x398/0x399. Unfortunately, autodetecting which base address is | ||
19 | * in use works only once (right after a reset). The Super I/O chip | ||
20 | * has the additional quirk that configuration register data must be | ||
21 | * written twice (I believe this is a safety feature to prevent | ||
22 | * accidental modification---fun, isn't it?). | ||
23 | */ | ||
24 | |||
25 | void __init | ||
26 | ns87312_enable_ide(long ide_base) | ||
27 | { | ||
28 | int data; | ||
29 | unsigned long flags; | ||
30 | |||
31 | local_irq_save(flags); | ||
32 | outb(0, ide_base); /* set the index register for reg #0 */ | ||
33 | data = inb(ide_base+1); /* read the current contents */ | ||
34 | outb(0, ide_base); /* set the index register for reg #0 */ | ||
35 | outb(data | 0x40, ide_base+1); /* turn on IDE */ | ||
36 | outb(data | 0x40, ide_base+1); /* turn on IDE, really! */ | ||
37 | local_irq_restore(flags); | ||
38 | } | ||