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/q40ide.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/q40ide.c')
-rw-r--r-- | drivers/ide/legacy/q40ide.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/ide/legacy/q40ide.c b/drivers/ide/legacy/q40ide.c index f9210458aea0..6f535d00e638 100644 --- a/drivers/ide/legacy/q40ide.c +++ b/drivers/ide/legacy/q40ide.c | |||
@@ -72,7 +72,27 @@ static void q40_ide_setup_ports(hw_regs_t *hw, unsigned long base, | |||
72 | hw->ack_intr = ack_intr; | 72 | hw->ack_intr = ack_intr; |
73 | } | 73 | } |
74 | 74 | ||
75 | static void q40ide_input_data(ide_drive_t *drive, struct request *rq, | ||
76 | void *buf, unsigned int len) | ||
77 | { | ||
78 | unsigned long data_addr = drive->hwif->io_ports.data_addr; | ||
79 | |||
80 | if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS) | ||
81 | return insw(data_addr, buf, (len + 1) / 2); | ||
75 | 82 | ||
83 | insw_swapw(data_addr, buf, (len + 1) / 2); | ||
84 | } | ||
85 | |||
86 | static void q40ide_output_data(ide_drive_t *drive, struct request *rq, | ||
87 | void *buf, unsigned int len) | ||
88 | { | ||
89 | unsigned long data_addr = drive->hwif->io_ports.data_addr; | ||
90 | |||
91 | if (drive->media == ide_disk && rq && rq->cmd_type == REQ_TYPE_FS) | ||
92 | return outsw(data_addr, buf, (len + 1) / 2); | ||
93 | |||
94 | outsw_swapw(data_addr, buf, (len + 1) / 2); | ||
95 | } | ||
76 | 96 | ||
77 | /* | 97 | /* |
78 | * the static array is needed to have the name reported in /proc/ioports, | 98 | * the static array is needed to have the name reported in /proc/ioports, |
@@ -123,6 +143,10 @@ static int __init q40ide_init(void) | |||
123 | ide_init_port_data(hwif, hwif->index); | 143 | ide_init_port_data(hwif, hwif->index); |
124 | ide_init_port_hw(hwif, &hw); | 144 | ide_init_port_hw(hwif, &hw); |
125 | 145 | ||
146 | /* Q40 has a byte-swapped IDE interface */ | ||
147 | hwif->input_data = q40ide_input_data; | ||
148 | hwif->output_data = q40ide_output_data; | ||
149 | |||
126 | idx[i] = hwif->index; | 150 | idx[i] = hwif->index; |
127 | } | 151 | } |
128 | } | 152 | } |