diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 22:06:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 22:06:25 -0500 |
commit | 551e4fb2465b87de9d4aa1669b27d624435443bb (patch) | |
tree | 316a5816b833a7536071a4ee0913a9b51b4faff8 /drivers/ide/legacy/falconide.c | |
parent | b297d520b9af536d5580ac505dd316be4cf5560c (diff) | |
parent | dfe799364e7a500389559e1dcd331d995cdc18ea (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (29 commits)
ide-tape: bump minor driver version
ide-tape: cleanup the remaining codestyle issues
ide-tape: fix syntax error in idetape_identify_device()
ide-tape: remove leftover OnStream support warning
ide-tape: collect module-related macro calls at the end
ide-tape: include proper headers
ide-tape: remove unused "length" arg from idetape_create_read_buffer_cmd()
ide-tape: remove struct idetape_id_gcw
ide-tape: cleanup and fix comments
ide-tape: shorten some function names
ide-tape: remove idetape_increase_max_pipeline_stages()
ide-tape: struct idetape_tape_t: shorten member names v2
ide-tape: struct idetape_tape_t: remove unused members
ide-tape: remove typedef idetape_chrdev_direction_t
ide-tape: simplify code branching in the interrupt handler
ide-tape: remove unreachable code chunk
ide-tape: remove struct idetape_read_position_result_t
ide-tape: refactor the debug logging facility
ide: add ide_read_error() inline helper
ide: add ide_read_[alt]status() inline helpers
...
Diffstat (limited to 'drivers/ide/legacy/falconide.c')
-rw-r--r-- | drivers/ide/legacy/falconide.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/ide/legacy/falconide.c b/drivers/ide/legacy/falconide.c index 85b69a82825f..f044048903b3 100644 --- a/drivers/ide/legacy/falconide.c +++ b/drivers/ide/legacy/falconide.c | |||
@@ -33,22 +33,8 @@ | |||
33 | * Offsets from the above base | 33 | * Offsets from the above base |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #define ATA_HD_DATA 0x00 | ||
37 | #define ATA_HD_ERROR 0x05 /* see err-bits */ | ||
38 | #define ATA_HD_NSECTOR 0x09 /* nr of sectors to read/write */ | ||
39 | #define ATA_HD_SECTOR 0x0d /* starting sector */ | ||
40 | #define ATA_HD_LCYL 0x11 /* starting cylinder */ | ||
41 | #define ATA_HD_HCYL 0x15 /* high byte of starting cyl */ | ||
42 | #define ATA_HD_SELECT 0x19 /* 101dhhhh , d=drive, hhhh=head */ | ||
43 | #define ATA_HD_STATUS 0x1d /* see status-bits */ | ||
44 | #define ATA_HD_CONTROL 0x39 | 36 | #define ATA_HD_CONTROL 0x39 |
45 | 37 | ||
46 | static int falconide_offsets[IDE_NR_PORTS] __initdata = { | ||
47 | ATA_HD_DATA, ATA_HD_ERROR, ATA_HD_NSECTOR, ATA_HD_SECTOR, ATA_HD_LCYL, | ||
48 | ATA_HD_HCYL, ATA_HD_SELECT, ATA_HD_STATUS, ATA_HD_CONTROL, -1 | ||
49 | }; | ||
50 | |||
51 | |||
52 | /* | 38 | /* |
53 | * falconide_intr_lock is used to obtain access to the IDE interrupt, | 39 | * falconide_intr_lock is used to obtain access to the IDE interrupt, |
54 | * which is shared between several drivers. | 40 | * which is shared between several drivers. |
@@ -57,6 +43,22 @@ static int falconide_offsets[IDE_NR_PORTS] __initdata = { | |||
57 | int falconide_intr_lock; | 43 | int falconide_intr_lock; |
58 | EXPORT_SYMBOL(falconide_intr_lock); | 44 | EXPORT_SYMBOL(falconide_intr_lock); |
59 | 45 | ||
46 | static void __init falconide_setup_ports(hw_regs_t *hw) | ||
47 | { | ||
48 | int i; | ||
49 | |||
50 | memset(hw, 0, sizeof(*hw)); | ||
51 | |||
52 | hw->io_ports[IDE_DATA_OFFSET] = ATA_HD_BASE; | ||
53 | |||
54 | for (i = 1; i < 8; i++) | ||
55 | hw->io_ports[i] = ATA_HD_BASE + 1 + i * 4; | ||
56 | |||
57 | hw->io_ports[IDE_CONTROL_OFFSET] = ATA_HD_CONTROL; | ||
58 | |||
59 | hw->irq = IRQ_MFP_IDE; | ||
60 | hw->ack_intr = NULL; | ||
61 | } | ||
60 | 62 | ||
61 | /* | 63 | /* |
62 | * Probe for a Falcon IDE interface | 64 | * Probe for a Falcon IDE interface |
@@ -64,16 +66,15 @@ EXPORT_SYMBOL(falconide_intr_lock); | |||
64 | 66 | ||
65 | static int __init falconide_init(void) | 67 | static int __init falconide_init(void) |
66 | { | 68 | { |
67 | if (MACH_IS_ATARI && ATARIHW_PRESENT(IDE)) { | ||
68 | hw_regs_t hw; | 69 | hw_regs_t hw; |
69 | ide_hwif_t *hwif; | 70 | ide_hwif_t *hwif; |
70 | 71 | ||
72 | if (!MACH_IS_ATARI || !ATARIHW_PRESENT(IDE)) | ||
73 | return 0; | ||
74 | |||
71 | printk(KERN_INFO "ide: Falcon IDE controller\n"); | 75 | printk(KERN_INFO "ide: Falcon IDE controller\n"); |
72 | 76 | ||
73 | ide_setup_ports(&hw, ATA_HD_BASE, falconide_offsets, | 77 | falconide_setup_ports(&hw); |
74 | 0, 0, NULL, | ||
75 | // falconide_iops, | ||
76 | IRQ_MFP_IDE); | ||
77 | 78 | ||
78 | hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]); | 79 | hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]); |
79 | if (hwif) { | 80 | if (hwif) { |
@@ -85,9 +86,8 @@ static int __init falconide_init(void) | |||
85 | 86 | ||
86 | ide_device_add(idx, NULL); | 87 | ide_device_add(idx, NULL); |
87 | } | 88 | } |
88 | } | ||
89 | 89 | ||
90 | return 0; | 90 | return 0; |
91 | } | 91 | } |
92 | 92 | ||
93 | module_init(falconide_init); | 93 | module_init(falconide_init); |