diff options
author | njl <njl@FreeBSD.org> | 2005-03-20 01:25:21 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2005-03-20 01:25:21 +0000 |
commit | 4dff4a6c79c8a039628cdca11bb3c6839b6a7644 (patch) | |
tree | 51badc94ac79d2fce7e2e21cfc047e40c0dd7349 /sys/dev/cpufreq | |
parent | 60d20350ea2326ee202ceb0a93adf694a1a73eda (diff) | |
download | FreeBSD-src-4dff4a6c79c8a039628cdca11bb3c6839b6a7644.zip FreeBSD-src-4dff4a6c79c8a039628cdca11bb3c6839b6a7644.tar.gz |
Only activate ICH speedstep if we're going to use it. No bugs were observed
due to this but it's cleaner this way.
Diffstat (limited to 'sys/dev/cpufreq')
-rw-r--r-- | sys/dev/cpufreq/ichss.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/cpufreq/ichss.c b/sys/dev/cpufreq/ichss.c index d38ed52..f28d477 100644 --- a/sys/dev/cpufreq/ichss.c +++ b/sys/dev/cpufreq/ichss.c @@ -150,7 +150,6 @@ ichss_pci_probe(device_t dev) { device_t child, parent; uint32_t pmbase; - uint16_t ss_en; /* * TODO: add a quirk to disable if we see the 82815_MC along @@ -198,14 +197,6 @@ ichss_pci_probe(device_t dev) bus_set_resource(child, SYS_RES_IOPORT, 1, pmbase + ICHSS_CTRL_OFFSET, 1); - /* Activate SpeedStep control if not already enabled. */ - ss_en = pci_read_config(dev, ICHSS_PMCFG_OFFSET, sizeof(ss_en)); - if ((ss_en & ICHSS_ENABLE) == 0) { - printf("ichss: enabling SpeedStep support\n"); - pci_write_config(dev, ICHSS_PMCFG_OFFSET, - ss_en | ICHSS_ENABLE, sizeof(ss_en)); - } - /* Attach the new CPU child now. */ device_probe_and_attach(child); @@ -217,6 +208,7 @@ ichss_probe(device_t dev) { device_t est_dev, perf_dev; int error, type; + uint16_t ss_en; if (resource_disabled("ichss", 0)) return (ENXIO); @@ -236,6 +228,14 @@ ichss_probe(device_t dev) if (est_dev && device_is_attached(est_dev)) return (ENXIO); + /* Activate SpeedStep control if not already enabled. */ + ss_en = pci_read_config(dev, ICHSS_PMCFG_OFFSET, sizeof(ss_en)); + if ((ss_en & ICHSS_ENABLE) == 0) { + printf("ichss: enabling SpeedStep support\n"); + pci_write_config(dev, ICHSS_PMCFG_OFFSET, + ss_en | ICHSS_ENABLE, sizeof(ss_en)); + } + device_set_desc(dev, "SpeedStep ICH"); return (-1000); } |