aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2008-01-10 17:03:42 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-10 17:03:42 -0500
commit93c0b5608086a103892aa78b7b83d7ecab60f7ab (patch)
treedf68dd4f3bfb28f98e0c0b9f2c7a1979a201d97c /drivers/ide/pci
parentb98f8803ccfe9d156d37a6eb471a620904085c80 (diff)
trm290: do hook dma_host_{on,off} methods (take 2)
Using default methods caused the chip's DMA PRD count registers, inadvertently starting DMA! While fixing it, also do: - get rid of the 'ide_' prefixes in several functions for which the prefix in the method's name has been 'ide_' ectomized already; - align the code hooking the IDE DMA methods in init_hwif_trm290()... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r--drivers/ide/pci/trm290.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c
index 0895e753a35d..0151d7fdfb8a 100644
--- a/drivers/ide/pci/trm290.c
+++ b/drivers/ide/pci/trm290.c
@@ -1,7 +1,8 @@
1/* 1/*
2 * linux/drivers/ide/pci/trm290.c Version 1.02 Mar. 18, 2000 2 * linux/drivers/ide/pci/trm290.c Version 1.05 Dec. 26, 2007
3 * 3 *
4 * Copyright (c) 1997-1998 Mark Lord 4 * Copyright (c) 1997-1998 Mark Lord
5 * Copyright (c) 2007 MontaVista Software, Inc. <source@mvista.com>
5 * May be copied or modified under the terms of the GNU General Public License 6 * May be copied or modified under the terms of the GNU General Public License
6 * 7 *
7 * June 22, 2004 - get rid of check_region 8 * June 22, 2004 - get rid of check_region
@@ -177,7 +178,7 @@ static void trm290_selectproc (ide_drive_t *drive)
177 trm290_prepare_drive(drive, drive->using_dma); 178 trm290_prepare_drive(drive, drive->using_dma);
178} 179}
179 180
180static void trm290_ide_dma_exec_cmd(ide_drive_t *drive, u8 command) 181static void trm290_dma_exec_cmd(ide_drive_t *drive, u8 command)
181{ 182{
182 BUG_ON(HWGROUP(drive)->handler != NULL); /* paranoia check */ 183 BUG_ON(HWGROUP(drive)->handler != NULL); /* paranoia check */
183 ide_set_handler(drive, &ide_dma_intr, WAIT_CMD, NULL); 184 ide_set_handler(drive, &ide_dma_intr, WAIT_CMD, NULL);
@@ -185,7 +186,7 @@ static void trm290_ide_dma_exec_cmd(ide_drive_t *drive, u8 command)
185 outb(command, IDE_COMMAND_REG); 186 outb(command, IDE_COMMAND_REG);
186} 187}
187 188
188static int trm290_ide_dma_setup(ide_drive_t *drive) 189static int trm290_dma_setup(ide_drive_t *drive)
189{ 190{
190 ide_hwif_t *hwif = drive->hwif; 191 ide_hwif_t *hwif = drive->hwif;
191 struct request *rq = hwif->hwgroup->rq; 192 struct request *rq = hwif->hwgroup->rq;
@@ -215,7 +216,7 @@ static int trm290_ide_dma_setup(ide_drive_t *drive)
215 return 0; 216 return 0;
216} 217}
217 218
218static void trm290_ide_dma_start(ide_drive_t *drive) 219static void trm290_dma_start(ide_drive_t *drive)
219{ 220{
220} 221}
221 222
@@ -240,6 +241,14 @@ static int trm290_ide_dma_test_irq (ide_drive_t *drive)
240 return (status == 0x00ff); 241 return (status == 0x00ff);
241} 242}
242 243
244static void trm290_dma_host_on(ide_drive_t *drive)
245{
246}
247
248static void trm290_dma_host_off(ide_drive_t *drive)
249{
250}
251
243static void __devinit init_hwif_trm290(ide_hwif_t *hwif) 252static void __devinit init_hwif_trm290(ide_hwif_t *hwif)
244{ 253{
245 unsigned int cfgbase = 0; 254 unsigned int cfgbase = 0;
@@ -280,11 +289,13 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif)
280 289
281 ide_setup_dma(hwif, (hwif->config_data + 4) ^ (hwif->channel ? 0x0080 : 0x0000), 3); 290 ide_setup_dma(hwif, (hwif->config_data + 4) ^ (hwif->channel ? 0x0080 : 0x0000), 3);
282 291
283 hwif->dma_setup = &trm290_ide_dma_setup; 292 hwif->dma_host_off = &trm290_dma_host_off;
284 hwif->dma_exec_cmd = &trm290_ide_dma_exec_cmd; 293 hwif->dma_host_on = &trm290_dma_host_on;
285 hwif->dma_start = &trm290_ide_dma_start; 294 hwif->dma_setup = &trm290_dma_setup;
286 hwif->ide_dma_end = &trm290_ide_dma_end; 295 hwif->dma_exec_cmd = &trm290_dma_exec_cmd;
287 hwif->ide_dma_test_irq = &trm290_ide_dma_test_irq; 296 hwif->dma_start = &trm290_dma_start;
297 hwif->ide_dma_end = &trm290_ide_dma_end;
298 hwif->ide_dma_test_irq = &trm290_ide_dma_test_irq;
288 299
289 hwif->selectproc = &trm290_selectproc; 300 hwif->selectproc = &trm290_selectproc;
290#if 1 301#if 1