aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-28 17:44:37 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-28 17:44:37 -0400
commitf04ff9cbb6389a6db64659cf917a1b6ac159f9f2 (patch)
treedbf7cd9b22818190c461da5d468439549959e334 /drivers/ide
parent70f91e0d1410f77e0a22aa78fa2d591f1fd691a5 (diff)
ide-h8300: add ->{in,out}put_data methods (take 2)
v2: * Update ->{in,out}_data methods to take 'struct request *rq' argument. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/h8300/ide-h8300.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/ide/h8300/ide-h8300.c b/drivers/ide/h8300/ide-h8300.c
index fd23f12e17aa..90702f79d560 100644
--- a/drivers/ide/h8300/ide-h8300.c
+++ b/drivers/ide/h8300/ide-h8300.c
@@ -56,6 +56,18 @@ static void mm_insw(unsigned long addr, void *buf, u32 len)
56 *bp = bswap(*(volatile u16 *)addr); 56 *bp = bswap(*(volatile u16 *)addr);
57} 57}
58 58
59static void h8300_input_data(ide_drive_t *drive, struct request *rq,
60 void *buf, unsigned int len)
61{
62 mm_insw(drive->hwif->io_ports.data_addr, buf, (len + 1) / 2);
63}
64
65static void h8300_output_data(ide_drive_t *drive, struct request *rq,
66 void *buf, unsigned int len)
67{
68 mm_outsw(drive->hwif->io_ports.data_addr, buf, (len + 1) / 2);
69}
70
59#define H8300_IDE_GAP (2) 71#define H8300_IDE_GAP (2)
60 72
61static inline void hw_setup(hw_regs_t *hw) 73static inline void hw_setup(hw_regs_t *hw)
@@ -74,6 +86,9 @@ static inline void hwif_setup(ide_hwif_t *hwif)
74{ 86{
75 default_hwif_iops(hwif); 87 default_hwif_iops(hwif);
76 88
89 hwif->input_data = h8300_input_data;
90 hwif->output_data = h8300_output_data;
91
77 hwif->OUTW = mm_outw; 92 hwif->OUTW = mm_outw;
78 hwif->OUTSW = mm_outsw; 93 hwif->OUTSW = mm_outsw;
79 hwif->INW = mm_inw; 94 hwif->INW = mm_inw;