From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: linux-acpi@vger.kernel.org, Len Brown <lenb@kernel.org>,
Curtis Malainey <cujomalainey@chromium.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] ACPI / LPSS: Save/restore LPSS private registers also on Lynxpoint
Date: Mon, 26 Aug 2019 11:08:33 +0200 [thread overview]
Message-ID: <2273274.i4Yan65riR@kreacher> (raw)
In-Reply-To: <20190822083200.18150-1-jarkko.nikula@linux.intel.com>
On Thursday, August 22, 2019 10:32:00 AM CEST Jarkko Nikula wrote:
> My assumption in the commit b53548f9d9e4 ("spi: pxa2xx: Remove LPSS private
> register restoring during resume") that Intel Lynxpoint and compatible
> based chipsets may not need LPSS private registers saving and restoring
> over suspend/resume cycle turned out to be false on Intel Broadwell.
>
> Curtis Malainey sent a patch bringing above change back and reported the
> LPSS SPI Chip Select control was lost over suspend/resume cycle on
> Broadwell machine.
>
> Instead of reverting above commit lets add LPSS private register
> saving/restoring also for all LPSS SPI, I2C and UART controllers on
> Lynxpoint and compatible chipset to make sure context is not lost in
> case nothing else preserves it like firmware or if LPSS is always on.
>
> Fixes: b53548f9d9e4 ("spi: pxa2xx: Remove LPSS private register restoring during resume")
> Reported-by: Curtis Malainey <cujomalainey@chromium.org>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> ---
> drivers/acpi/acpi_lpss.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
> index d696f165a50e..60bbc5090abe 100644
> --- a/drivers/acpi/acpi_lpss.c
> +++ b/drivers/acpi/acpi_lpss.c
> @@ -219,12 +219,13 @@ static void bsw_pwm_setup(struct lpss_private_data *pdata)
> }
>
> static const struct lpss_device_desc lpt_dev_desc = {
> - .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_LTR,
> + .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_LTR
> + | LPSS_SAVE_CTX,
> .prv_offset = 0x800,
> };
>
> static const struct lpss_device_desc lpt_i2c_dev_desc = {
> - .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_LTR,
> + .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_LTR | LPSS_SAVE_CTX,
> .prv_offset = 0x800,
> };
>
> @@ -236,7 +237,8 @@ static struct property_entry uart_properties[] = {
> };
>
> static const struct lpss_device_desc lpt_uart_dev_desc = {
> - .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_LTR,
> + .flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_LTR
> + | LPSS_SAVE_CTX,
> .clk_con_id = "baudclk",
> .prv_offset = 0x800,
> .setup = lpss_uart_setup,
>
Applied, thanks!
prev parent reply other threads:[~2019-08-26 9:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-22 8:32 [PATCH] ACPI / LPSS: Save/restore LPSS private registers also on Lynxpoint Jarkko Nikula
2019-08-22 9:05 ` Andy Shevchenko
2019-08-22 16:51 ` Curtis Malainey
2019-08-26 9:08 ` Rafael J. Wysocki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2273274.i4Yan65riR@kreacher \
--to=rjw@rjwysocki.net \
--cc=andriy.shevchenko@linux.intel.com \
--cc=cujomalainey@chromium.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox