aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/clocksource/acpi_pm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c
index 5ca1d80de182..860d033bc74f 100644
--- a/drivers/clocksource/acpi_pm.c
+++ b/drivers/clocksource/acpi_pm.c
@@ -151,13 +151,13 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_LE,
151 */ 151 */
152static int verify_pmtmr_rate(void) 152static int verify_pmtmr_rate(void)
153{ 153{
154 u32 value1, value2; 154 cycle_t value1, value2;
155 unsigned long count, delta; 155 unsigned long count, delta;
156 156
157 mach_prepare_counter(); 157 mach_prepare_counter();
158 value1 = read_pmtmr(); 158 value1 = clocksource_acpi_pm.read();
159 mach_countup(&count); 159 mach_countup(&count);
160 value2 = read_pmtmr(); 160 value2 = clocksource_acpi_pm.read();
161 delta = (value2 - value1) & ACPI_PM_MASK; 161 delta = (value2 - value1) & ACPI_PM_MASK;
162 162
163 /* Check that the PMTMR delta is within 5% of what we expect */ 163 /* Check that the PMTMR delta is within 5% of what we expect */
@@ -177,7 +177,7 @@ static int verify_pmtmr_rate(void)
177 177
178static int __init init_acpi_pm_clocksource(void) 178static int __init init_acpi_pm_clocksource(void)
179{ 179{
180 u32 value1, value2; 180 cycle_t value1, value2;
181 unsigned int i; 181 unsigned int i;
182 182
183 if (!pmtmr_ioport) 183 if (!pmtmr_ioport)
@@ -187,9 +187,9 @@ static int __init init_acpi_pm_clocksource(void)
187 clocksource_acpi_pm.shift); 187 clocksource_acpi_pm.shift);
188 188
189 /* "verify" this timing source: */ 189 /* "verify" this timing source: */
190 value1 = read_pmtmr(); 190 value1 = clocksource_acpi_pm.read();
191 for (i = 0; i < 10000; i++) { 191 for (i = 0; i < 10000; i++) {
192 value2 = read_pmtmr(); 192 value2 = clocksource_acpi_pm.read();
193 if (value2 == value1) 193 if (value2 == value1)
194 continue; 194 continue;
195 if (value2 > value1) 195 if (value2 > value1)
@@ -197,11 +197,11 @@ static int __init init_acpi_pm_clocksource(void)
197 if ((value2 < value1) && ((value2) < 0xFFF)) 197 if ((value2 < value1) && ((value2) < 0xFFF))
198 goto pm_good; 198 goto pm_good;
199 printk(KERN_INFO "PM-Timer had inconsistent results:" 199 printk(KERN_INFO "PM-Timer had inconsistent results:"
200 " 0x%#x, 0x%#x - aborting.\n", value1, value2); 200 " 0x%#llx, 0x%#llx - aborting.\n", value1, value2);
201 return -EINVAL; 201 return -EINVAL;
202 } 202 }
203 printk(KERN_INFO "PM-Timer had no reasonable result:" 203 printk(KERN_INFO "PM-Timer had no reasonable result:"
204 " 0x%#x - aborting.\n", value1); 204 " 0x%#llx - aborting.\n", value1);
205 return -ENODEV; 205 return -ENODEV;
206 206
207pm_good: 207pm_good: