diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-02-03 08:29:43 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-02-03 08:29:43 -0500 |
commit | 3df2da96874402722d760e5d4eb2968737e5bb01 (patch) | |
tree | 7c04eb1c24f6865b3bed9125aa9abfd1fb1077cc /drivers/acpi | |
parent | e36f014edff70fc02b3d3d79cead1d58f289332e (diff) |
Revert "ACPI / LPSS: introduce a 'proxy' device to power on LPSS for DMA"
Revert commit 6c17ee44d524 (ACPI / LPSS: introduce a 'proxy' device
to power on LPSS for DMA), as it introduced registration and probe
ordering problems between devices on the LPSS that may lead to full
hard system hang on boot in some cases.
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpi_lpss.c | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 4f3febf8a589..e75737fd7eef 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * ACPI support for Intel Lynxpoint LPSS. | 2 | * ACPI support for Intel Lynxpoint LPSS. |
3 | * | 3 | * |
4 | * Copyright (C) 2013, 2014, Intel Corporation | 4 | * Copyright (C) 2013, Intel Corporation |
5 | * Authors: Mika Westerberg <mika.westerberg@linux.intel.com> | 5 | * Authors: Mika Westerberg <mika.westerberg@linux.intel.com> |
6 | * Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 6 | * Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
7 | * | 7 | * |
@@ -60,8 +60,6 @@ ACPI_MODULE_NAME("acpi_lpss"); | |||
60 | #define LPSS_CLK_DIVIDER BIT(2) | 60 | #define LPSS_CLK_DIVIDER BIT(2) |
61 | #define LPSS_LTR BIT(3) | 61 | #define LPSS_LTR BIT(3) |
62 | #define LPSS_SAVE_CTX BIT(4) | 62 | #define LPSS_SAVE_CTX BIT(4) |
63 | #define LPSS_DEV_PROXY BIT(5) | ||
64 | #define LPSS_PROXY_REQ BIT(6) | ||
65 | 63 | ||
66 | struct lpss_private_data; | 64 | struct lpss_private_data; |
67 | 65 | ||
@@ -72,10 +70,8 @@ struct lpss_device_desc { | |||
72 | void (*setup)(struct lpss_private_data *pdata); | 70 | void (*setup)(struct lpss_private_data *pdata); |
73 | }; | 71 | }; |
74 | 72 | ||
75 | static struct device *proxy_device; | ||
76 | |||
77 | static struct lpss_device_desc lpss_dma_desc = { | 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 | struct lpss_private_data { | 77 | struct lpss_private_data { |
@@ -150,24 +146,22 @@ static struct lpss_device_desc byt_pwm_dev_desc = { | |||
150 | }; | 146 | }; |
151 | 147 | ||
152 | static struct lpss_device_desc byt_uart_dev_desc = { | 148 | static struct lpss_device_desc byt_uart_dev_desc = { |
153 | .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX | | 149 | .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX, |
154 | LPSS_DEV_PROXY, | ||
155 | .prv_offset = 0x800, | 150 | .prv_offset = 0x800, |
156 | .setup = lpss_uart_setup, | 151 | .setup = lpss_uart_setup, |
157 | }; | 152 | }; |
158 | 153 | ||
159 | static struct lpss_device_desc byt_spi_dev_desc = { | 154 | static struct lpss_device_desc byt_spi_dev_desc = { |
160 | .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX | | 155 | .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX, |
161 | LPSS_DEV_PROXY, | ||
162 | .prv_offset = 0x400, | 156 | .prv_offset = 0x400, |
163 | }; | 157 | }; |
164 | 158 | ||
165 | static struct lpss_device_desc byt_sdio_dev_desc = { | 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 | static struct lpss_device_desc byt_i2c_dev_desc = { | 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 | .prv_offset = 0x800, | 165 | .prv_offset = 0x800, |
172 | .setup = byt_i2c_setup, | 166 | .setup = byt_i2c_setup, |
173 | }; | 167 | }; |
@@ -374,8 +368,6 @@ static int acpi_lpss_create_device(struct acpi_device *adev, | |||
374 | adev->driver_data = pdata; | 368 | adev->driver_data = pdata; |
375 | pdev = acpi_create_platform_device(adev); | 369 | pdev = acpi_create_platform_device(adev); |
376 | if (!IS_ERR_OR_NULL(pdev)) { | 370 | if (!IS_ERR_OR_NULL(pdev)) { |
377 | if (!proxy_device && dev_desc->flags & LPSS_DEV_PROXY) | ||
378 | proxy_device = &pdev->dev; | ||
379 | return 1; | 371 | return 1; |
380 | } | 372 | } |
381 | 373 | ||
@@ -600,14 +592,7 @@ static int acpi_lpss_runtime_suspend(struct device *dev) | |||
600 | if (pdata->dev_desc->flags & LPSS_SAVE_CTX) | 592 | if (pdata->dev_desc->flags & LPSS_SAVE_CTX) |
601 | acpi_lpss_save_ctx(dev, pdata); | 593 | acpi_lpss_save_ctx(dev, pdata); |
602 | 594 | ||
603 | ret = acpi_dev_runtime_suspend(dev); | 595 | return 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; | ||
611 | } | 596 | } |
612 | 597 | ||
613 | static int acpi_lpss_runtime_resume(struct device *dev) | 598 | static int acpi_lpss_runtime_resume(struct device *dev) |
@@ -615,12 +600,6 @@ static int acpi_lpss_runtime_resume(struct device *dev) | |||
615 | struct lpss_private_data *pdata = acpi_driver_data(ACPI_COMPANION(dev)); | 600 | struct lpss_private_data *pdata = acpi_driver_data(ACPI_COMPANION(dev)); |
616 | int ret; | 601 | int ret; |
617 | 602 | ||
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 | |||
624 | ret = acpi_dev_runtime_resume(dev); | 603 | ret = acpi_dev_runtime_resume(dev); |
625 | if (ret) | 604 | if (ret) |
626 | return ret; | 605 | return ret; |