aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/sc1200.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-07-19 19:11:56 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-07-19 19:11:56 -0400
commit31c4df441cce6b9ec541e7f722f50bfbc617dd76 (patch)
treec1b617168a9edd7d23c2ba3b3fc23acb0235bd89 /drivers/ide/pci/sc1200.c
parent8987d21ba6a426b0685257866ce366055930b57f (diff)
sc1200: remove stale Power Management code
* Nowadays core IDE code handles restoring of PIO and DMA modes (ide-io.c:ide_start_power_step() etc) so remove open-coded version from sc1200_resume(). There should be no change in behavior because settings done by sc1200_resume() were always overridden by generic_ide_resume() and ide_{start,stop}_power_step(). * Bump driver version. Cc: Mark Lord <mlord@pobox.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/sc1200.c')
-rw-r--r--drivers/ide/pci/sc1200.c39
1 files changed, 2 insertions, 37 deletions
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c
index 7dbc44cc722a..9ac8889f8ad3 100644
--- a/drivers/ide/pci/sc1200.c
+++ b/drivers/ide/pci/sc1200.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/ide/pci/sc1200.c Version 0.94 Mar 10 2007 2 * linux/drivers/ide/pci/sc1200.c Version 0.95 Jun 16 2007
3 * 3 *
4 * Copyright (C) 2000-2002 Mark Lord <mlord@pobox.com> 4 * Copyright (C) 2000-2002 Mark Lord <mlord@pobox.com>
5 * Copyright (C) 2007 Bartlomiej Zolnierkiewicz 5 * Copyright (C) 2007 Bartlomiej Zolnierkiewicz
@@ -390,7 +390,7 @@ static int sc1200_resume (struct pci_dev *dev)
390 // loop over all interfaces that are part of this pci device: 390 // loop over all interfaces that are part of this pci device:
391 // 391 //
392 while ((hwif = lookup_pci_dev(hwif, dev)) != NULL) { 392 while ((hwif = lookup_pci_dev(hwif, dev)) != NULL) {
393 unsigned int basereg, r, d, format; 393 unsigned int basereg, r;
394 sc1200_saved_state_t *ss = (sc1200_saved_state_t *)hwif->config_data; 394 sc1200_saved_state_t *ss = (sc1200_saved_state_t *)hwif->config_data;
395 395
396 // 396 //
@@ -402,41 +402,6 @@ static int sc1200_resume (struct pci_dev *dev)
402 pci_write_config_dword(hwif->pci_dev, basereg + (r<<2), ss->regs[r]); 402 pci_write_config_dword(hwif->pci_dev, basereg + (r<<2), ss->regs[r]);
403 } 403 }
404 } 404 }
405 //
406 // Re-program drive PIO modes
407 //
408 pci_read_config_dword(hwif->pci_dev, basereg+4, &format);
409 format = (format >> 31) & 1;
410 if (format)
411 format += sc1200_get_pci_clock();
412 for (d = 0; d < 2; ++d) {
413 ide_drive_t *drive = &(hwif->drives[d]);
414 if (drive->present) {
415 unsigned int pio, timings;
416 pci_read_config_dword(hwif->pci_dev, basereg+(drive->select.b.unit << 3), &timings);
417 for (pio = 0; pio <= 4; ++pio) {
418 if (sc1200_pio_timings[format][pio] == timings)
419 break;
420 }
421 if (pio > 4)
422 pio = 255; /* autotune */
423 (void)sc1200_tuneproc(drive, pio);
424 }
425 }
426 //
427 // Re-program drive DMA modes
428 //
429 for (d = 0; d < MAX_DRIVES; ++d) {
430 ide_drive_t *drive = &(hwif->drives[d]);
431 if (drive->present && !__ide_dma_bad_drive(drive)) {
432 int enable_dma = drive->using_dma;
433 hwif->dma_off_quietly(drive);
434 if (sc1200_config_dma(drive))
435 enable_dma = 0;
436 if (enable_dma)
437 hwif->dma_host_on(drive);
438 }
439 }
440 } 405 }
441 return 0; 406 return 0;
442} 407}