aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/atiixp.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/atiixp.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/ide/atiixp.c')
-rw-r--r--drivers/ide/atiixp.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/ide/atiixp.c b/drivers/ide/atiixp.c
index 837322b10a4c..15f0ead89f5c 100644
--- a/drivers/ide/atiixp.c
+++ b/drivers/ide/atiixp.c
@@ -42,19 +42,20 @@ static DEFINE_SPINLOCK(atiixp_lock);
42 42
43/** 43/**
44 * atiixp_set_pio_mode - set host controller for PIO mode 44 * atiixp_set_pio_mode - set host controller for PIO mode
45 * @hwif: port
45 * @drive: drive 46 * @drive: drive
46 * @pio: PIO mode number
47 * 47 *
48 * Set the interface PIO mode. 48 * Set the interface PIO mode.
49 */ 49 */
50 50
51static void atiixp_set_pio_mode(ide_drive_t *drive, const u8 pio) 51static void atiixp_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
52{ 52{
53 struct pci_dev *dev = to_pci_dev(drive->hwif->dev); 53 struct pci_dev *dev = to_pci_dev(hwif->dev);
54 unsigned long flags; 54 unsigned long flags;
55 int timing_shift = (drive->dn ^ 1) * 8; 55 int timing_shift = (drive->dn ^ 1) * 8;
56 u32 pio_timing_data; 56 u32 pio_timing_data;
57 u16 pio_mode_data; 57 u16 pio_mode_data;
58 const u8 pio = drive->pio_mode - XFER_PIO_0;
58 59
59 spin_lock_irqsave(&atiixp_lock, flags); 60 spin_lock_irqsave(&atiixp_lock, flags);
60 61
@@ -74,21 +75,22 @@ static void atiixp_set_pio_mode(ide_drive_t *drive, const u8 pio)
74 75
75/** 76/**
76 * atiixp_set_dma_mode - set host controller for DMA mode 77 * atiixp_set_dma_mode - set host controller for DMA mode
78 * @hwif: port
77 * @drive: drive 79 * @drive: drive
78 * @speed: DMA mode
79 * 80 *
80 * Set a ATIIXP host controller to the desired DMA mode. This involves 81 * Set a ATIIXP host controller to the desired DMA mode. This involves
81 * programming the right timing data into the PCI configuration space. 82 * programming the right timing data into the PCI configuration space.
82 */ 83 */
83 84
84static void atiixp_set_dma_mode(ide_drive_t *drive, const u8 speed) 85static void atiixp_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive)
85{ 86{
86 struct pci_dev *dev = to_pci_dev(drive->hwif->dev); 87 struct pci_dev *dev = to_pci_dev(hwif->dev);
87 unsigned long flags; 88 unsigned long flags;
88 int timing_shift = (drive->dn ^ 1) * 8; 89 int timing_shift = (drive->dn ^ 1) * 8;
89 u32 tmp32; 90 u32 tmp32;
90 u16 tmp16; 91 u16 tmp16;
91 u16 udma_ctl = 0; 92 u16 udma_ctl = 0;
93 const u8 speed = drive->dma_mode;
92 94
93 spin_lock_irqsave(&atiixp_lock, flags); 95 spin_lock_irqsave(&atiixp_lock, flags);
94 96