From: Adrian Hunter <adrian.hunter@intel.com>
To: Ben Chuang <benchuanggli@gmail.com>, ulf.hansson@linaro.org
Cc: SeanHY.Chen@genesyslogic.com.tw, ben.chuang@genesyslogic.com.tw,
greg.tu@genesyslogic.com.tw, linux-kernel@vger.kernel.org,
linux-mmc@vger.kernel.org
Subject: Re: [RESEND, PATCH] mmc: sdhci-pci-gli: A workaround to allow GL9755 to enter ASPM L1.2
Date: Tue, 19 Apr 2022 14:45:30 +0300 [thread overview]
Message-ID: <19948f89-80fe-a726-2a03-db16bf5d66ef@intel.com> (raw)
In-Reply-To: <20220414094945.457500-1-benchuanggli@gmail.com>
On 14/04/22 12:49, Ben Chuang wrote:
> From: Ben Chuang <ben.chuang@genesyslogic.com.tw>
>
> When GL9755 enters ASPM L1 sub-states, it will stay at L1.1 and will not
> enter L1.2. The workaround is to toggle PM state to allow GL9755 to enter
> ASPM L1.2.
>
> Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/host/sdhci-pci-gli.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-pci-gli.c b/drivers/mmc/host/sdhci-pci-gli.c
> index 97035d77c18c..52230857388f 100644
> --- a/drivers/mmc/host/sdhci-pci-gli.c
> +++ b/drivers/mmc/host/sdhci-pci-gli.c
> @@ -137,6 +137,9 @@
> #define PCI_GLI_9755_SerDes 0x70
> #define PCI_GLI_9755_SCP_DIS BIT(19)
>
> +#define PCI_GLI_9755_PM_CTRL 0xFC
> +#define PCI_GLI_9755_PM_STATE GENMASK(1, 0)
> +
> #define GLI_MAX_TUNING_LOOP 40
>
> /* Genesys Logic chipset */
> @@ -597,6 +600,13 @@ static void gl9755_hw_setting(struct sdhci_pci_slot *slot)
> GLI_9755_CFG2_L1DLY_VALUE);
> pci_write_config_dword(pdev, PCI_GLI_9755_CFG2, value);
>
> + /* toggle PM state to allow GL9755 to enter ASPM L1.2 */
> + pci_read_config_dword(pdev, PCI_GLI_9755_PM_CTRL, &value);
> + value |= PCI_GLI_9755_PM_STATE;
> + pci_write_config_dword(pdev, PCI_GLI_9755_PM_CTRL, value);
> + value &= ~PCI_GLI_9755_PM_STATE;
> + pci_write_config_dword(pdev, PCI_GLI_9755_PM_CTRL, value);
> +
> gl9755_wt_off(pdev);
> }
>
next prev parent reply other threads:[~2022-04-19 11:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-14 9:49 Ben Chuang
2022-04-19 11:45 ` Adrian Hunter [this message]
2022-04-21 13:54 ` Ulf Hansson
2022-04-25 0:53 ` Ben Chuang
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=19948f89-80fe-a726-2a03-db16bf5d66ef@intel.com \
--to=adrian.hunter@intel.com \
--cc=SeanHY.Chen@genesyslogic.com.tw \
--cc=ben.chuang@genesyslogic.com.tw \
--cc=benchuanggli@gmail.com \
--cc=greg.tu@genesyslogic.com.tw \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.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
all inboxes | Powered by JetHome®