Commit e7394c776f22a8893e157842fe2ded100280a3a1
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
Merge tag 'pm+acpi-3.19-fin' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI power management fix from Rafael Wysocki: "This is a revert of an ACPI Low-power Subsystem (LPSS) driver change that was supposed to improve power management of the LPSS DMA controller, but introduced more serious problems. Since fixing them turns out to be non-trivial, it is better to revert the commit in question at this point and try to fix the original issue differently in the next cycle" * tag 'pm+acpi-3.19-fin' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "ACPI / LPSS: introduce a 'proxy' device to power on LPSS for DMA"
Showing 1 changed file Side-by-side Diff
drivers/acpi/acpi_lpss.c
1 | 1 | /* |
2 | 2 | * ACPI support for Intel Lynxpoint LPSS. |
3 | 3 | * |
4 | - * Copyright (C) 2013, 2014, Intel Corporation | |
4 | + * Copyright (C) 2013, Intel Corporation | |
5 | 5 | * Authors: Mika Westerberg <mika.westerberg@linux.intel.com> |
6 | 6 | * Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
7 | 7 | * |
... | ... | @@ -60,8 +60,6 @@ |
60 | 60 | #define LPSS_CLK_DIVIDER BIT(2) |
61 | 61 | #define LPSS_LTR BIT(3) |
62 | 62 | #define LPSS_SAVE_CTX BIT(4) |
63 | -#define LPSS_DEV_PROXY BIT(5) | |
64 | -#define LPSS_PROXY_REQ BIT(6) | |
65 | 63 | |
66 | 64 | struct lpss_private_data; |
67 | 65 | |
68 | 66 | |
... | ... | @@ -72,10 +70,8 @@ |
72 | 70 | void (*setup)(struct lpss_private_data *pdata); |
73 | 71 | }; |
74 | 72 | |
75 | -static struct device *proxy_device; | |
76 | - | |
77 | 73 | static struct lpss_device_desc lpss_dma_desc = { |
78 | - .flags = LPSS_CLK | LPSS_PROXY_REQ, | |
74 | + .flags = LPSS_CLK, | |
79 | 75 | }; |
80 | 76 | |
81 | 77 | struct lpss_private_data { |
82 | 78 | |
83 | 79 | |
84 | 80 | |
... | ... | @@ -150,24 +146,22 @@ |
150 | 146 | }; |
151 | 147 | |
152 | 148 | static struct lpss_device_desc byt_uart_dev_desc = { |
153 | - .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX | | |
154 | - LPSS_DEV_PROXY, | |
149 | + .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX, | |
155 | 150 | .prv_offset = 0x800, |
156 | 151 | .setup = lpss_uart_setup, |
157 | 152 | }; |
158 | 153 | |
159 | 154 | static struct lpss_device_desc byt_spi_dev_desc = { |
160 | - .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX | | |
161 | - LPSS_DEV_PROXY, | |
155 | + .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX, | |
162 | 156 | .prv_offset = 0x400, |
163 | 157 | }; |
164 | 158 | |
165 | 159 | static struct lpss_device_desc byt_sdio_dev_desc = { |
166 | - .flags = LPSS_CLK | LPSS_DEV_PROXY, | |
160 | + .flags = LPSS_CLK, | |
167 | 161 | }; |
168 | 162 | |
169 | 163 | static struct lpss_device_desc byt_i2c_dev_desc = { |
170 | - .flags = LPSS_CLK | LPSS_SAVE_CTX | LPSS_DEV_PROXY, | |
164 | + .flags = LPSS_CLK | LPSS_SAVE_CTX, | |
171 | 165 | .prv_offset = 0x800, |
172 | 166 | .setup = byt_i2c_setup, |
173 | 167 | }; |
... | ... | @@ -374,8 +368,6 @@ |
374 | 368 | adev->driver_data = pdata; |
375 | 369 | pdev = acpi_create_platform_device(adev); |
376 | 370 | if (!IS_ERR_OR_NULL(pdev)) { |
377 | - if (!proxy_device && dev_desc->flags & LPSS_DEV_PROXY) | |
378 | - proxy_device = &pdev->dev; | |
379 | 371 | return 1; |
380 | 372 | } |
381 | 373 | |
382 | 374 | |
... | ... | @@ -600,26 +592,13 @@ |
600 | 592 | if (pdata->dev_desc->flags & LPSS_SAVE_CTX) |
601 | 593 | acpi_lpss_save_ctx(dev, pdata); |
602 | 594 | |
603 | - ret = acpi_dev_runtime_suspend(dev); | |
604 | - if (ret) | |
605 | - return ret; | |
606 | - | |
607 | - if (pdata->dev_desc->flags & LPSS_PROXY_REQ && proxy_device) | |
608 | - return pm_runtime_put_sync_suspend(proxy_device); | |
609 | - | |
610 | - return 0; | |
595 | + return acpi_dev_runtime_suspend(dev); | |
611 | 596 | } |
612 | 597 | |
613 | 598 | static int acpi_lpss_runtime_resume(struct device *dev) |
614 | 599 | { |
615 | 600 | struct lpss_private_data *pdata = acpi_driver_data(ACPI_COMPANION(dev)); |
616 | 601 | int ret; |
617 | - | |
618 | - if (pdata->dev_desc->flags & LPSS_PROXY_REQ && proxy_device) { | |
619 | - ret = pm_runtime_get_sync(proxy_device); | |
620 | - if (ret) | |
621 | - return ret; | |
622 | - } | |
623 | 602 | |
624 | 603 | ret = acpi_dev_runtime_resume(dev); |
625 | 604 | if (ret) |