aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/tc86c001.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-18 18:30:08 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-18 18:30:08 -0400
commit31e8a465a265886a207427e5652aafb9a591c3fa (patch)
tree138a3c6fcb7ecba2c636586566d84e9eeeacf305 /drivers/ide/pci/tc86c001.c
parentfc212bb1fb538f9453d9ea2cca09749e602055a6 (diff)
ide: use I/O ops directly part #2 (take 2)
v2: - bump host driver versions (as suggested by Sergei) - use I/O ops directly in drivers/ide/setup-pci.c Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/tc86c001.c')
-rw-r--r--drivers/ide/pci/tc86c001.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/ide/pci/tc86c001.c b/drivers/ide/pci/tc86c001.c
index 9f50927e9098..04fe9b7f6e72 100644
--- a/drivers/ide/pci/tc86c001.c
+++ b/drivers/ide/pci/tc86c001.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * drivers/ide/pci/tc86c001.c Version 1.00 Dec 12, 2006 2 * drivers/ide/pci/tc86c001.c Version 1.01 Sep 5, 2007
3 * 3 *
4 * Copyright (C) 2002 Toshiba Corporation 4 * Copyright (C) 2002 Toshiba Corporation
5 * Copyright (C) 2005-2006 MontaVista Software, Inc. <source@mvista.com> 5 * Copyright (C) 2005-2006 MontaVista Software, Inc. <source@mvista.com>
@@ -17,7 +17,7 @@ static void tc86c001_set_mode(ide_drive_t *drive, const u8 speed)
17{ 17{
18 ide_hwif_t *hwif = HWIF(drive); 18 ide_hwif_t *hwif = HWIF(drive);
19 unsigned long scr_port = hwif->config_data + (drive->dn ? 0x02 : 0x00); 19 unsigned long scr_port = hwif->config_data + (drive->dn ? 0x02 : 0x00);
20 u16 mode, scr = hwif->INW(scr_port); 20 u16 mode, scr = inw(scr_port);
21 21
22 switch (speed) { 22 switch (speed) {
23 case XFER_UDMA_4: mode = 0x00c0; break; 23 case XFER_UDMA_4: mode = 0x00c0; break;
@@ -65,7 +65,7 @@ static int tc86c001_timer_expiry(ide_drive_t *drive)
65 ide_hwif_t *hwif = HWIF(drive); 65 ide_hwif_t *hwif = HWIF(drive);
66 ide_expiry_t *expiry = ide_get_hwifdata(hwif); 66 ide_expiry_t *expiry = ide_get_hwifdata(hwif);
67 ide_hwgroup_t *hwgroup = HWGROUP(drive); 67 ide_hwgroup_t *hwgroup = HWGROUP(drive);
68 u8 dma_stat = hwif->INB(hwif->dma_status); 68 u8 dma_stat = inb(hwif->dma_status);
69 69
70 /* Restore a higher level driver's expiry handler first. */ 70 /* Restore a higher level driver's expiry handler first. */
71 hwgroup->expiry = expiry; 71 hwgroup->expiry = expiry;
@@ -73,7 +73,7 @@ static int tc86c001_timer_expiry(ide_drive_t *drive)
73 if ((dma_stat & 5) == 1) { /* DMA active and no interrupt */ 73 if ((dma_stat & 5) == 1) { /* DMA active and no interrupt */
74 unsigned long sc_base = hwif->config_data; 74 unsigned long sc_base = hwif->config_data;
75 unsigned long twcr_port = sc_base + (drive->dn ? 0x06 : 0x04); 75 unsigned long twcr_port = sc_base + (drive->dn ? 0x06 : 0x04);
76 u8 dma_cmd = hwif->INB(hwif->dma_command); 76 u8 dma_cmd = inb(hwif->dma_command);
77 77
78 printk(KERN_WARNING "%s: DMA interrupt possibly stuck, " 78 printk(KERN_WARNING "%s: DMA interrupt possibly stuck, "
79 "attempting recovery...\n", drive->name); 79 "attempting recovery...\n", drive->name);
@@ -135,7 +135,7 @@ static int tc86c001_busproc(ide_drive_t *drive, int state)
135 u16 scr1; 135 u16 scr1;
136 136
137 /* System Control 1 Register bit 11 (ATA Hard Reset) read */ 137 /* System Control 1 Register bit 11 (ATA Hard Reset) read */
138 scr1 = hwif->INW(sc_base + 0x00); 138 scr1 = inw(sc_base + 0x00);
139 139
140 switch (state) { 140 switch (state) {
141 case BUSSTATE_ON: 141 case BUSSTATE_ON:
@@ -165,7 +165,7 @@ static int tc86c001_busproc(ide_drive_t *drive, int state)
165static void __devinit init_hwif_tc86c001(ide_hwif_t *hwif) 165static void __devinit init_hwif_tc86c001(ide_hwif_t *hwif)
166{ 166{
167 unsigned long sc_base = pci_resource_start(hwif->pci_dev, 5); 167 unsigned long sc_base = pci_resource_start(hwif->pci_dev, 5);
168 u16 scr1 = hwif->INW(sc_base + 0x00);; 168 u16 scr1 = inw(sc_base + 0x00);
169 169
170 /* System Control 1 Register bit 15 (Soft Reset) set */ 170 /* System Control 1 Register bit 15 (Soft Reset) set */
171 outw(scr1 | 0x8000, sc_base + 0x00); 171 outw(scr1 | 0x8000, sc_base + 0x00);
@@ -205,7 +205,7 @@ static void __devinit init_hwif_tc86c001(ide_hwif_t *hwif)
205 * System Control 1 Register bit 13 (PDIAGN): 205 * System Control 1 Register bit 13 (PDIAGN):
206 * 0=80-pin cable, 1=40-pin cable 206 * 0=80-pin cable, 1=40-pin cable
207 */ 207 */
208 scr1 = hwif->INW(sc_base + 0x00); 208 scr1 = inw(sc_base + 0x00);
209 hwif->cbl = (scr1 & 0x2000) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; 209 hwif->cbl = (scr1 & 0x2000) ? ATA_CBL_PATA40 : ATA_CBL_PATA80;
210 } 210 }
211} 211}