X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fclocksource%2Facpi_pm.c;h=5ca1d80de182bfa3bb333f0aeca907f7929ed26c;hb=fca515fbfa5ecd9f7b54db311317e2c877d7831a;hp=d42060ede93024481916f3497d479a45e5848184;hpb=9f6632d6290785caf9e9f874c0a0cfaf2c178e59;p=linux-2.6 diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c index d42060ede9..5ca1d80de1 100644 --- a/drivers/clocksource/acpi_pm.c +++ b/drivers/clocksource/acpi_pm.c @@ -26,7 +26,7 @@ /* * The I/O port the PMTMR resides at. * The location is detected during setup_arch(), - * in arch/i386/acpi/boot.c + * in arch/i386/kernel/acpi/boot.c */ u32 pmtmr_ioport __read_mostly; @@ -71,7 +71,7 @@ static struct clocksource clocksource_acpi_pm = { .rating = 200, .read = acpi_pm_read, .mask = (cycle_t)ACPI_PM_MASK, - .mult = 0, /*to be caluclated*/ + .mult = 0, /*to be calculated*/ .shift = 22, .flags = CLOCK_SOURCE_IS_CONTINUOUS, @@ -90,7 +90,7 @@ __setup("acpi_pm_good", acpi_pm_good_setup); static inline void acpi_pm_need_workaround(void) { clocksource_acpi_pm.read = acpi_pm_read_slow; - clocksource_acpi_pm.rating = 110; + clocksource_acpi_pm.rating = 120; } /* @@ -105,14 +105,11 @@ static inline void acpi_pm_need_workaround(void) */ static void __devinit acpi_pm_check_blacklist(struct pci_dev *dev) { - u8 rev; - if (acpi_pm_good) return; - pci_read_config_byte(dev, PCI_REVISION_ID, &rev); /* the bug has been fixed in PIIX4M */ - if (rev < 3) { + if (dev->revision < 3) { printk(KERN_WARNING "* Found PM-Timer Bug on the chipset." " Due to workarounds for a bug,\n" "* this clock source is slow. Consider trying" @@ -218,3 +215,22 @@ pm_good: * but we still need to load before device_initcall */ fs_initcall(init_acpi_pm_clocksource); + +/* + * Allow an override of the IOPort. Stupid BIOSes do not tell us about + * the PMTimer, but we might know where it is. + */ +static int __init parse_pmtmr(char *arg) +{ + unsigned long base; + + if (strict_strtoul(arg, 16, &base)) + return -EINVAL; + + printk(KERN_INFO "PMTMR IOPort override: 0x%04x -> 0x%04lx\n", + (unsigned int)pmtmr_ioport, base); + pmtmr_ioport = base; + + return 1; +} +__setup("pmtmr=", parse_pmtmr);