aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_efar.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2011-10-13 11:44:14 -0400
committerJeff Garzik <jgarzik@redhat.com>2011-10-14 13:38:40 -0400
commita0da19149f589e3e6fd5bab527b3326368ab92bc (patch)
tree4a9ebe34cb7691cfaa84413b70f399dbe3e65c6b /drivers/ata/pata_efar.c
parent5a2985486745b62c644462fbbafc6cbaac748065 (diff)
pata_efar: fix register naming used in efar_set_piomode()
Rename 'idetm_port' and 'idetm_data' variables to 'master_port' and 'master_data' respectively to match register naming used in efar_set_dmamode() and in ata_piix.c. Fix efar_set_piomode() documentation while at it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_efar.c')
-rw-r--r--drivers/ata/pata_efar.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c
index aca47e4e29ea..f0243ed206f7 100644
--- a/drivers/ata/pata_efar.c
+++ b/drivers/ata/pata_efar.c
@@ -73,7 +73,7 @@ static DEFINE_SPINLOCK(efar_lock);
73/** 73/**
74 * efar_set_piomode - Initialize host controller PATA PIO timings 74 * efar_set_piomode - Initialize host controller PATA PIO timings
75 * @ap: Port whose timings we are configuring 75 * @ap: Port whose timings we are configuring
76 * @adev: um 76 * @adev: Device to program
77 * 77 *
78 * Set PIO mode for device, in host controller PCI config space. 78 * Set PIO mode for device, in host controller PCI config space.
79 * 79 *
@@ -85,9 +85,9 @@ static void efar_set_piomode (struct ata_port *ap, struct ata_device *adev)
85{ 85{
86 unsigned int pio = adev->pio_mode - XFER_PIO_0; 86 unsigned int pio = adev->pio_mode - XFER_PIO_0;
87 struct pci_dev *dev = to_pci_dev(ap->host->dev); 87 struct pci_dev *dev = to_pci_dev(ap->host->dev);
88 unsigned int idetm_port= ap->port_no ? 0x42 : 0x40; 88 unsigned int master_port = ap->port_no ? 0x42 : 0x40;
89 unsigned long flags; 89 unsigned long flags;
90 u16 idetm_data; 90 u16 master_data;
91 u8 udma_enable; 91 u8 udma_enable;
92 int control = 0; 92 int control = 0;
93 93
@@ -113,20 +113,20 @@ static void efar_set_piomode (struct ata_port *ap, struct ata_device *adev)
113 113
114 spin_lock_irqsave(&efar_lock, flags); 114 spin_lock_irqsave(&efar_lock, flags);
115 115
116 pci_read_config_word(dev, idetm_port, &idetm_data); 116 pci_read_config_word(dev, master_port, &master_data);
117 117
118 /* Set PPE, IE, and TIME as appropriate */ 118 /* Set PPE, IE, and TIME as appropriate */
119 if (adev->devno == 0) { 119 if (adev->devno == 0) {
120 idetm_data &= 0xCCF0; 120 master_data &= 0xCCF0;
121 idetm_data |= control; 121 master_data |= control;
122 idetm_data |= (timings[pio][0] << 12) | 122 master_data |= (timings[pio][0] << 12) |
123 (timings[pio][1] << 8); 123 (timings[pio][1] << 8);
124 } else { 124 } else {
125 int shift = 4 * ap->port_no; 125 int shift = 4 * ap->port_no;
126 u8 slave_data; 126 u8 slave_data;
127 127
128 idetm_data &= 0xFF0F; 128 master_data &= 0xFF0F;
129 idetm_data |= (control << 4); 129 master_data |= (control << 4);
130 130
131 /* Slave timing in separate register */ 131 /* Slave timing in separate register */
132 pci_read_config_byte(dev, 0x44, &slave_data); 132 pci_read_config_byte(dev, 0x44, &slave_data);
@@ -135,8 +135,8 @@ static void efar_set_piomode (struct ata_port *ap, struct ata_device *adev)
135 pci_write_config_byte(dev, 0x44, slave_data); 135 pci_write_config_byte(dev, 0x44, slave_data);
136 } 136 }
137 137
138 idetm_data |= 0x4000; /* Ensure SITRE is set */ 138 master_data |= 0x4000; /* Ensure SITRE is set */
139 pci_write_config_word(dev, idetm_port, idetm_data); 139 pci_write_config_word(dev, master_port, master_data);
140 140
141 pci_read_config_byte(dev, 0x48, &udma_enable); 141 pci_read_config_byte(dev, 0x48, &udma_enable);
142 udma_enable &= ~(1 << (2 * ap->port_no + adev->devno)); 142 udma_enable &= ~(1 << (2 * ap->port_no + adev->devno));