diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 20:30:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 20:30:26 -0400 |
commit | 8ab68ab420d5fc084b8cdd76a72df72c5e1cdb5d (patch) | |
tree | 6aef86d06a5eda99f09ac00c1af4084c2d49d2ac /drivers/ide/legacy/falconide.c | |
parent | f05c463be51898e745c4aa8245b05e25d73fa975 (diff) | |
parent | 7b255436df0543856faaae4704034fe83bc20717 (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: (35 commits)
siimage: coding style cleanup (take 2)
ide-cd: clean up cdrom_analyze_sense_data()
ide-cd: fix test unsigned var < 0
ide: add TSSTcorp CDDVDW SH-S202H to ivb_list[]
piix: add Asus Eee 701 controller to short cable list
ARM: always select HAVE_IDE
remove the broken ETRAX_IDE driver
ide: remove ->dma_prdtable field from ide_hwif_t
ide: remove ->dma_vendor{1,3} fields from ide_hwif_t
scc_pata: add ->dma_host_set and ->dma_start methods
ide: skip "VLB sync" if host uses MMIO
ide: add ide_pad_transfer() helper
ide: remove ->INW and ->OUTW methods
ide: use IDE I/O helpers directly in ide_tf_{load,read}()
ns87415: add ->tf_read method
scc_pata: add ->tf_{load,read} methods
ide-h8300: add ->tf_{load,read} methods
ide-cris: add ->tf_{load,read} methods
ide: add ->tf_load and ->tf_read methods
ide: move ide_tf_{load,read} to ide-iops.c
...
Diffstat (limited to 'drivers/ide/legacy/falconide.c')
-rw-r--r-- | drivers/ide/legacy/falconide.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/ide/legacy/falconide.c b/drivers/ide/legacy/falconide.c index 56cdaa0eeea5..83555ca513b5 100644 --- a/drivers/ide/legacy/falconide.c +++ b/drivers/ide/legacy/falconide.c | |||
@@ -44,6 +44,28 @@ | |||
44 | int falconide_intr_lock; | 44 | int falconide_intr_lock; |
45 | EXPORT_SYMBOL(falconide_intr_lock); | 45 | EXPORT_SYMBOL(falconide_intr_lock); |
46 | 46 | ||
47 | static void falconide_input_data(ide_drive_t *drive, struct request *rq, | ||
48 | void *buf, unsigned int len) | ||
49 | { | ||
50 | unsigned long data_addr = drive->hwif->io_ports.data_addr; | ||
51 | |||
52 | if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS) | ||
53 | return insw(data_addr, buf, (len + 1) / 2); | ||
54 | |||
55 | insw_swapw(data_addr, buf, (len + 1) / 2); | ||
56 | } | ||
57 | |||
58 | static void falconide_output_data(ide_drive_t *drive, struct request *rq, | ||
59 | void *buf, unsigned int len) | ||
60 | { | ||
61 | unsigned long data_addr = drive->hwif->io_ports.data_addr; | ||
62 | |||
63 | if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS) | ||
64 | return outsw(data_adr, buf, (len + 1) / 2); | ||
65 | |||
66 | outsw_swapw(data_addr, buf, (len + 1) / 2); | ||
67 | } | ||
68 | |||
47 | static void __init falconide_setup_ports(hw_regs_t *hw) | 69 | static void __init falconide_setup_ports(hw_regs_t *hw) |
48 | { | 70 | { |
49 | int i; | 71 | int i; |
@@ -90,6 +112,10 @@ static int __init falconide_init(void) | |||
90 | ide_init_port_data(hwif, index); | 112 | ide_init_port_data(hwif, index); |
91 | ide_init_port_hw(hwif, &hw); | 113 | ide_init_port_hw(hwif, &hw); |
92 | 114 | ||
115 | /* Atari has a byte-swapped IDE interface */ | ||
116 | hwif->input_data = falconide_input_data; | ||
117 | hwif->output_data = falconide_output_data; | ||
118 | |||
93 | ide_get_lock(NULL, NULL); | 119 | ide_get_lock(NULL, NULL); |
94 | ide_device_add(idx, NULL); | 120 | ide_device_add(idx, NULL); |
95 | ide_release_lock(); | 121 | ide_release_lock(); |