aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/intel_ips.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/x86/intel_ips.c')
-rw-r--r--drivers/platform/x86/intel_ips.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c
index afe82e50dfe..9024480a822 100644
--- a/drivers/platform/x86/intel_ips.c
+++ b/drivers/platform/x86/intel_ips.c
@@ -1342,8 +1342,10 @@ static struct ips_mcp_limits *ips_detect_cpu(struct ips_driver *ips)
1342 limits = &ips_lv_limits; 1342 limits = &ips_lv_limits;
1343 else if (strstr(boot_cpu_data.x86_model_id, "CPU U")) 1343 else if (strstr(boot_cpu_data.x86_model_id, "CPU U"))
1344 limits = &ips_ulv_limits; 1344 limits = &ips_ulv_limits;
1345 else 1345 else {
1346 dev_info(&ips->dev->dev, "No CPUID match found.\n"); 1346 dev_info(&ips->dev->dev, "No CPUID match found.\n");
1347 goto out;
1348 }
1347 1349
1348 rdmsrl(TURBO_POWER_CURRENT_LIMIT, turbo_power); 1350 rdmsrl(TURBO_POWER_CURRENT_LIMIT, turbo_power);
1349 tdp = turbo_power & TURBO_TDP_MASK; 1351 tdp = turbo_power & TURBO_TDP_MASK;
@@ -1432,6 +1434,12 @@ static int ips_probe(struct pci_dev *dev, const struct pci_device_id *id)
1432 1434
1433 spin_lock_init(&ips->turbo_status_lock); 1435 spin_lock_init(&ips->turbo_status_lock);
1434 1436
1437 ret = pci_enable_device(dev);
1438 if (ret) {
1439 dev_err(&dev->dev, "can't enable PCI device, aborting\n");
1440 goto error_free;
1441 }
1442
1435 if (!pci_resource_start(dev, 0)) { 1443 if (!pci_resource_start(dev, 0)) {
1436 dev_err(&dev->dev, "TBAR not assigned, aborting\n"); 1444 dev_err(&dev->dev, "TBAR not assigned, aborting\n");
1437 ret = -ENXIO; 1445 ret = -ENXIO;
@@ -1444,11 +1452,6 @@ static int ips_probe(struct pci_dev *dev, const struct pci_device_id *id)
1444 goto error_free; 1452 goto error_free;
1445 } 1453 }
1446 1454
1447 ret = pci_enable_device(dev);
1448 if (ret) {
1449 dev_err(&dev->dev, "can't enable PCI device, aborting\n");
1450 goto error_free;
1451 }
1452 1455
1453 ips->regmap = ioremap(pci_resource_start(dev, 0), 1456 ips->regmap = ioremap(pci_resource_start(dev, 0),
1454 pci_resource_len(dev, 0)); 1457 pci_resource_len(dev, 0));