diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/pci/siimage.c | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index 4ff89c7d990a..cbca5f05ff87 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -1,8 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/siimage.c Version 1.07 Nov 30, 2003 | 2 | * linux/drivers/ide/pci/siimage.c Version 1.11 Jan 27, 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org> | 4 | * Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org> |
5 | * Copyright (C) 2003 Red Hat <alan@redhat.com> | 5 | * Copyright (C) 2003 Red Hat <alan@redhat.com> |
6 | * Copyright (C) 2007 MontaVista Software, Inc. | ||
6 | * | 7 | * |
7 | * May be copied or modified under the terms of the GNU General Public License | 8 | * May be copied or modified under the terms of the GNU General Public License |
8 | * | 9 | * |
@@ -205,41 +206,39 @@ static void siimage_tuneproc (ide_drive_t *drive, byte mode_wanted) | |||
205 | unsigned long tfaddr = siimage_selreg(hwif, 0x02); | 206 | unsigned long tfaddr = siimage_selreg(hwif, 0x02); |
206 | 207 | ||
207 | /* cheat for now and use the docs */ | 208 | /* cheat for now and use the docs */ |
208 | switch(mode_wanted) { | 209 | switch (mode_wanted) { |
209 | case 4: | 210 | case 4: |
210 | speedp = 0x10c1; | 211 | speedp = 0x10c1; |
211 | speedt = 0x10c1; | 212 | speedt = 0x10c1; |
212 | break; | 213 | break; |
213 | case 3: | 214 | case 3: |
214 | speedp = 0x10C3; | 215 | speedp = 0x10c3; |
215 | speedt = 0x10C3; | 216 | speedt = 0x10c3; |
216 | break; | 217 | break; |
217 | case 2: | 218 | case 2: |
218 | speedp = 0x1104; | 219 | speedp = 0x1104; |
219 | speedt = 0x1281; | 220 | speedt = 0x1281; |
220 | break; | 221 | break; |
221 | case 1: | 222 | case 1: |
222 | speedp = 0x2283; | 223 | speedp = 0x2283; |
223 | speedt = 0x1281; | 224 | speedt = 0x2283; |
224 | break; | 225 | break; |
225 | case 0: | 226 | case 0: |
226 | default: | 227 | default: |
227 | speedp = 0x328A; | 228 | speedp = 0x328a; |
228 | speedt = 0x328A; | 229 | speedt = 0x328a; |
229 | break; | 230 | break; |
230 | } | 231 | } |
231 | if (hwif->mmio) | 232 | |
232 | { | 233 | if (hwif->mmio) { |
233 | hwif->OUTW(speedt, addr); | 234 | hwif->OUTW(speedp, addr); |
234 | hwif->OUTW(speedp, tfaddr); | 235 | hwif->OUTW(speedt, tfaddr); |
235 | /* Now set up IORDY */ | 236 | /* Now set up IORDY */ |
236 | if(mode_wanted == 3 || mode_wanted == 4) | 237 | if(mode_wanted == 3 || mode_wanted == 4) |
237 | hwif->OUTW(hwif->INW(tfaddr-2)|0x200, tfaddr-2); | 238 | hwif->OUTW(hwif->INW(tfaddr-2)|0x200, tfaddr-2); |
238 | else | 239 | else |
239 | hwif->OUTW(hwif->INW(tfaddr-2)&~0x200, tfaddr-2); | 240 | hwif->OUTW(hwif->INW(tfaddr-2)&~0x200, tfaddr-2); |
240 | } | 241 | } else { |
241 | else | ||
242 | { | ||
243 | pci_write_config_word(hwif->pci_dev, addr, speedp); | 242 | pci_write_config_word(hwif->pci_dev, addr, speedp); |
244 | pci_write_config_word(hwif->pci_dev, tfaddr, speedt); | 243 | pci_write_config_word(hwif->pci_dev, tfaddr, speedt); |
245 | pci_read_config_word(hwif->pci_dev, tfaddr-2, &speedp); | 244 | pci_read_config_word(hwif->pci_dev, tfaddr-2, &speedp); |