diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/ide/legacy/falconide.c |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'drivers/ide/legacy/falconide.c')
-rw-r--r-- | drivers/ide/legacy/falconide.c | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/drivers/ide/legacy/falconide.c b/drivers/ide/legacy/falconide.c new file mode 100644 index 000000000000..a9f2cd5bb81e --- /dev/null +++ b/drivers/ide/legacy/falconide.c | |||
@@ -0,0 +1,78 @@ | |||
1 | /* | ||
2 | * linux/drivers/ide/legacy/falconide.c -- Atari Falcon IDE Driver | ||
3 | * | ||
4 | * Created 12 Jul 1997 by Geert Uytterhoeven | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file COPYING in the main directory of this archive for | ||
8 | * more details. | ||
9 | */ | ||
10 | |||
11 | #include <linux/types.h> | ||
12 | #include <linux/mm.h> | ||
13 | #include <linux/interrupt.h> | ||
14 | #include <linux/blkdev.h> | ||
15 | #include <linux/hdreg.h> | ||
16 | #include <linux/ide.h> | ||
17 | #include <linux/init.h> | ||
18 | |||
19 | #include <asm/setup.h> | ||
20 | #include <asm/atarihw.h> | ||
21 | #include <asm/atariints.h> | ||
22 | #include <asm/atari_stdma.h> | ||
23 | |||
24 | |||
25 | /* | ||
26 | * Base of the IDE interface | ||
27 | */ | ||
28 | |||
29 | #define ATA_HD_BASE 0xfff00000 | ||
30 | |||
31 | /* | ||
32 | * Offsets from the above base | ||
33 | */ | ||
34 | |||
35 | #define ATA_HD_DATA 0x00 | ||
36 | #define ATA_HD_ERROR 0x05 /* see err-bits */ | ||
37 | #define ATA_HD_NSECTOR 0x09 /* nr of sectors to read/write */ | ||
38 | #define ATA_HD_SECTOR 0x0d /* starting sector */ | ||
39 | #define ATA_HD_LCYL 0x11 /* starting cylinder */ | ||
40 | #define ATA_HD_HCYL 0x15 /* high byte of starting cyl */ | ||
41 | #define ATA_HD_SELECT 0x19 /* 101dhhhh , d=drive, hhhh=head */ | ||
42 | #define ATA_HD_STATUS 0x1d /* see status-bits */ | ||
43 | #define ATA_HD_CONTROL 0x39 | ||
44 | |||
45 | static int falconide_offsets[IDE_NR_PORTS] __initdata = { | ||
46 | ATA_HD_DATA, ATA_HD_ERROR, ATA_HD_NSECTOR, ATA_HD_SECTOR, ATA_HD_LCYL, | ||
47 | ATA_HD_HCYL, ATA_HD_SELECT, ATA_HD_STATUS, ATA_HD_CONTROL, -1 | ||
48 | }; | ||
49 | |||
50 | |||
51 | /* | ||
52 | * falconide_intr_lock is used to obtain access to the IDE interrupt, | ||
53 | * which is shared between several drivers. | ||
54 | */ | ||
55 | |||
56 | int falconide_intr_lock; | ||
57 | |||
58 | |||
59 | /* | ||
60 | * Probe for a Falcon IDE interface | ||
61 | */ | ||
62 | |||
63 | void __init falconide_init(void) | ||
64 | { | ||
65 | if (MACH_IS_ATARI && ATARIHW_PRESENT(IDE)) { | ||
66 | hw_regs_t hw; | ||
67 | int index; | ||
68 | |||
69 | ide_setup_ports(&hw, ATA_HD_BASE, falconide_offsets, | ||
70 | 0, 0, NULL, | ||
71 | // falconide_iops, | ||
72 | IRQ_MFP_IDE); | ||
73 | index = ide_register_hw(&hw, NULL); | ||
74 | |||
75 | if (index != -1) | ||
76 | printk("ide%d: Falcon IDE interface\n", index); | ||
77 | } | ||
78 | } | ||