aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/sc1200.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/ide/sc1200.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/ide/sc1200.c')
-rw-r--r--drivers/ide/sc1200.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/ide/sc1200.c b/drivers/ide/sc1200.c
index d467478d68da..356b9b504ffd 100644
--- a/drivers/ide/sc1200.c
+++ b/drivers/ide/sc1200.c
@@ -14,6 +14,7 @@
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/slab.h>
17#include <linux/pci.h> 18#include <linux/pci.h>
18#include <linux/init.h> 19#include <linux/init.h>
19#include <linux/ide.h> 20#include <linux/ide.h>
@@ -122,13 +123,13 @@ out:
122 return mask; 123 return mask;
123} 124}
124 125
125static void sc1200_set_dma_mode(ide_drive_t *drive, const u8 mode) 126static void sc1200_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive)
126{ 127{
127 ide_hwif_t *hwif = drive->hwif;
128 struct pci_dev *dev = to_pci_dev(hwif->dev); 128 struct pci_dev *dev = to_pci_dev(hwif->dev);
129 unsigned int reg, timings; 129 unsigned int reg, timings;
130 unsigned short pci_clock; 130 unsigned short pci_clock;
131 unsigned int basereg = hwif->channel ? 0x50 : 0x40; 131 unsigned int basereg = hwif->channel ? 0x50 : 0x40;
132 const u8 mode = drive->dma_mode;
132 133
133 static const u32 udma_timing[3][3] = { 134 static const u32 udma_timing[3][3] = {
134 { 0x00921250, 0x00911140, 0x00911030 }, 135 { 0x00921250, 0x00911140, 0x00911030 },
@@ -193,10 +194,10 @@ static int sc1200_dma_end(ide_drive_t *drive)
193 * will have valid default PIO timings set up before we get here. 194 * will have valid default PIO timings set up before we get here.
194 */ 195 */
195 196
196static void sc1200_set_pio_mode(ide_drive_t *drive, const u8 pio) 197static void sc1200_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
197{ 198{
198 ide_hwif_t *hwif = drive->hwif;
199 int mode = -1; 199 int mode = -1;
200 const u8 pio = drive->pio_mode - XFER_PIO_0;
200 201
201 /* 202 /*
202 * bad abuse of ->set_pio_mode interface 203 * bad abuse of ->set_pio_mode interface