diff options
Diffstat (limited to 'drivers/ata/pata_hpt37x.c')
-rw-r--r-- | drivers/ata/pata_hpt37x.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c index 84d9c5568567..c5ddd937dbf2 100644 --- a/drivers/ata/pata_hpt37x.c +++ b/drivers/ata/pata_hpt37x.c | |||
@@ -8,12 +8,10 @@ | |||
8 | * Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org> | 8 | * Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org> |
9 | * Portions Copyright (C) 2001 Sun Microsystems, Inc. | 9 | * Portions Copyright (C) 2001 Sun Microsystems, Inc. |
10 | * Portions Copyright (C) 2003 Red Hat Inc | 10 | * Portions Copyright (C) 2003 Red Hat Inc |
11 | * Portions Copyright (C) 2005-2006 MontaVista Software, Inc. | 11 | * Portions Copyright (C) 2005-2007 MontaVista Software, Inc. |
12 | * | 12 | * |
13 | * TODO | 13 | * TODO |
14 | * PLL mode | 14 | * Look into engine reset on timeout errors. Should not be required. |
15 | * Look into engine reset on timeout errors. Should not be | ||
16 | * required. | ||
17 | */ | 15 | */ |
18 | 16 | ||
19 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
@@ -26,7 +24,7 @@ | |||
26 | #include <linux/libata.h> | 24 | #include <linux/libata.h> |
27 | 25 | ||
28 | #define DRV_NAME "pata_hpt37x" | 26 | #define DRV_NAME "pata_hpt37x" |
29 | #define DRV_VERSION "0.6.7" | 27 | #define DRV_VERSION "0.6.9" |
30 | 28 | ||
31 | struct hpt_clock { | 29 | struct hpt_clock { |
32 | u8 xfer_speed; | 30 | u8 xfer_speed; |
@@ -1092,9 +1090,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
1092 | int dpll, adjust; | 1090 | int dpll, adjust; |
1093 | 1091 | ||
1094 | /* Compute DPLL */ | 1092 | /* Compute DPLL */ |
1095 | dpll = 2; | 1093 | dpll = (port->udma_mask & 0xC0) ? 3 : 2; |
1096 | if (port->udma_mask & 0xE0) | ||
1097 | dpll = 3; | ||
1098 | 1094 | ||
1099 | f_low = (MHz[clock_slot] * 48) / MHz[dpll]; | 1095 | f_low = (MHz[clock_slot] * 48) / MHz[dpll]; |
1100 | f_high = f_low + 2; | 1096 | f_high = f_low + 2; |
@@ -1116,7 +1112,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
1116 | pci_write_config_dword(dev, 0x5C, (f_high << 16) | f_low | 0x100); | 1112 | pci_write_config_dword(dev, 0x5C, (f_high << 16) | f_low | 0x100); |
1117 | } | 1113 | } |
1118 | if (adjust == 8) { | 1114 | if (adjust == 8) { |
1119 | printk(KERN_WARNING "hpt37x: DPLL did not stabilize.\n"); | 1115 | printk(KERN_ERR "pata_hpt37x: DPLL did not stabilize!\n"); |
1120 | return -ENODEV; | 1116 | return -ENODEV; |
1121 | } | 1117 | } |
1122 | if (dpll == 3) | 1118 | if (dpll == 3) |
@@ -1124,7 +1120,8 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
1124 | else | 1120 | else |
1125 | private_data = (void *)hpt37x_timings_50; | 1121 | private_data = (void *)hpt37x_timings_50; |
1126 | 1122 | ||
1127 | printk(KERN_INFO "hpt37x: Bus clock %dMHz, using DPLL.\n", MHz[dpll]); | 1123 | printk(KERN_INFO "pata_hpt37x: bus clock %dMHz, using %dMHz DPLL.\n", |
1124 | MHz[clock_slot], MHz[dpll]); | ||
1128 | } else { | 1125 | } else { |
1129 | private_data = (void *)chip_table->clocks[clock_slot]; | 1126 | private_data = (void *)chip_table->clocks[clock_slot]; |
1130 | /* | 1127 | /* |
@@ -1137,7 +1134,8 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
1137 | port = &info_hpt370_33; | 1134 | port = &info_hpt370_33; |
1138 | if (clock_slot < 2 && port == &info_hpt370a) | 1135 | if (clock_slot < 2 && port == &info_hpt370a) |
1139 | port = &info_hpt370a_33; | 1136 | port = &info_hpt370a_33; |
1140 | printk(KERN_INFO "hpt37x: %s: Bus clock %dMHz.\n", chip_table->name, MHz[clock_slot]); | 1137 | printk(KERN_INFO "pata_hpt37x: %s using %dMHz bus clock.\n", |
1138 | chip_table->name, MHz[clock_slot]); | ||
1141 | } | 1139 | } |
1142 | 1140 | ||
1143 | /* Now kick off ATA set up */ | 1141 | /* Now kick off ATA set up */ |