* [PATCH] mmc: sdhci-pci-gli: Fix can not access GL9750 after reboot from Windows 10
@ 2020-05-04 6:39 Ben Chuang
2020-05-04 7:27 ` Adrian Hunter
2020-05-05 11:32 ` Ulf Hansson
0 siblings, 2 replies; 4+ messages in thread
From: Ben Chuang @ 2020-05-04 6:39 UTC (permalink / raw)
To: adrian.hunter, ulf.hansson
Cc: linux-mmc, linux-kernel, ben.chuang, renius.chen, custos.mentis,
Ben Chuang
From: Ben Chuang <ben.chuang@genesyslogic.com.tw>
Need to clear some bits in a vendor-defined register after reboot from
Windows 10.
Fixes: e51df6ce668a ("mmc: host: sdhci-pci: Add Genesys Logic GL975x support")
Reported-by: Grzegorz Kowal <custos.mentis@gmail.com>
Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
---
drivers/mmc/host/sdhci-pci-gli.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/mmc/host/sdhci-pci-gli.c b/drivers/mmc/host/sdhci-pci-gli.c
index ce15a05f23d4..8170b659f2af 100644
--- a/drivers/mmc/host/sdhci-pci-gli.c
+++ b/drivers/mmc/host/sdhci-pci-gli.c
@@ -26,6 +26,9 @@
#define SDHCI_GLI_9750_DRIVING_2 GENMASK(27, 26)
#define GLI_9750_DRIVING_1_VALUE 0xFFF
#define GLI_9750_DRIVING_2_VALUE 0x3
+#define SDHCI_GLI_9750_SEL_1 BIT(29)
+#define SDHCI_GLI_9750_SEL_2 BIT(31)
+#define SDHCI_GLI_9750_ALL_RST (BIT(24)|BIT(25)|BIT(28)|BIT(30))
#define SDHCI_GLI_9750_PLL 0x864
#define SDHCI_GLI_9750_PLL_TX2_INV BIT(23)
@@ -122,6 +125,8 @@ static void gli_set_9750(struct sdhci_host *host)
GLI_9750_DRIVING_1_VALUE);
driving_value |= FIELD_PREP(SDHCI_GLI_9750_DRIVING_2,
GLI_9750_DRIVING_2_VALUE);
+ driving_value &= ~(SDHCI_GLI_9750_SEL_1|SDHCI_GLI_9750_SEL_2|SDHCI_GLI_9750_ALL_RST);
+ driving_value |= SDHCI_GLI_9750_SEL_2;
sdhci_writel(host, driving_value, SDHCI_GLI_9750_DRIVING);
sw_ctrl_value &= ~SDHCI_GLI_9750_SW_CTRL_4;
--
2.26.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: sdhci-pci-gli: Fix can not access GL9750 after reboot from Windows 10
2020-05-04 6:39 [PATCH] mmc: sdhci-pci-gli: Fix can not access GL9750 after reboot from Windows 10 Ben Chuang
@ 2020-05-04 7:27 ` Adrian Hunter
2020-05-05 9:15 ` Grzegorz Kowal
2020-05-05 11:32 ` Ulf Hansson
1 sibling, 1 reply; 4+ messages in thread
From: Adrian Hunter @ 2020-05-04 7:27 UTC (permalink / raw)
To: Ben Chuang, ulf.hansson
Cc: linux-mmc, linux-kernel, ben.chuang, renius.chen, custos.mentis
On 4/05/20 9:39 am, Ben Chuang wrote:
> From: Ben Chuang <ben.chuang@genesyslogic.com.tw>
>
> Need to clear some bits in a vendor-defined register after reboot from
> Windows 10.
>
> Fixes: e51df6ce668a ("mmc: host: sdhci-pci: Add Genesys Logic GL975x support")
> Reported-by: Grzegorz Kowal <custos.mentis@gmail.com>
> 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 | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-pci-gli.c b/drivers/mmc/host/sdhci-pci-gli.c
> index ce15a05f23d4..8170b659f2af 100644
> --- a/drivers/mmc/host/sdhci-pci-gli.c
> +++ b/drivers/mmc/host/sdhci-pci-gli.c
> @@ -26,6 +26,9 @@
> #define SDHCI_GLI_9750_DRIVING_2 GENMASK(27, 26)
> #define GLI_9750_DRIVING_1_VALUE 0xFFF
> #define GLI_9750_DRIVING_2_VALUE 0x3
> +#define SDHCI_GLI_9750_SEL_1 BIT(29)
> +#define SDHCI_GLI_9750_SEL_2 BIT(31)
> +#define SDHCI_GLI_9750_ALL_RST (BIT(24)|BIT(25)|BIT(28)|BIT(30))
>
> #define SDHCI_GLI_9750_PLL 0x864
> #define SDHCI_GLI_9750_PLL_TX2_INV BIT(23)
> @@ -122,6 +125,8 @@ static void gli_set_9750(struct sdhci_host *host)
> GLI_9750_DRIVING_1_VALUE);
> driving_value |= FIELD_PREP(SDHCI_GLI_9750_DRIVING_2,
> GLI_9750_DRIVING_2_VALUE);
> + driving_value &= ~(SDHCI_GLI_9750_SEL_1|SDHCI_GLI_9750_SEL_2|SDHCI_GLI_9750_ALL_RST);
> + driving_value |= SDHCI_GLI_9750_SEL_2;
> sdhci_writel(host, driving_value, SDHCI_GLI_9750_DRIVING);
>
> sw_ctrl_value &= ~SDHCI_GLI_9750_SW_CTRL_4;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: sdhci-pci-gli: Fix can not access GL9750 after reboot from Windows 10
2020-05-04 7:27 ` Adrian Hunter
@ 2020-05-05 9:15 ` Grzegorz Kowal
0 siblings, 0 replies; 4+ messages in thread
From: Grzegorz Kowal @ 2020-05-05 9:15 UTC (permalink / raw)
To: Adrian Hunter
Cc: Ben Chuang, ulf.hansson, linux-mmc, linux-kernel, Ben Chuang,
renius.chen
Tested-by: Grzegorz Kowal <custos.mentis@gmail.com>
Thanks,
Grzegorz
On Mon, May 4, 2020 at 4:26 AM Adrian Hunter <adrian.hunter@intel.com> wrote:
>
> On 4/05/20 9:39 am, Ben Chuang wrote:
> > From: Ben Chuang <ben.chuang@genesyslogic.com.tw>
> >
> > Need to clear some bits in a vendor-defined register after reboot from
> > Windows 10.
> >
> > Fixes: e51df6ce668a ("mmc: host: sdhci-pci: Add Genesys Logic GL975x support")
> > Reported-by: Grzegorz Kowal <custos.mentis@gmail.com>
> > 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 | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/mmc/host/sdhci-pci-gli.c b/drivers/mmc/host/sdhci-pci-gli.c
> > index ce15a05f23d4..8170b659f2af 100644
> > --- a/drivers/mmc/host/sdhci-pci-gli.c
> > +++ b/drivers/mmc/host/sdhci-pci-gli.c
> > @@ -26,6 +26,9 @@
> > #define SDHCI_GLI_9750_DRIVING_2 GENMASK(27, 26)
> > #define GLI_9750_DRIVING_1_VALUE 0xFFF
> > #define GLI_9750_DRIVING_2_VALUE 0x3
> > +#define SDHCI_GLI_9750_SEL_1 BIT(29)
> > +#define SDHCI_GLI_9750_SEL_2 BIT(31)
> > +#define SDHCI_GLI_9750_ALL_RST (BIT(24)|BIT(25)|BIT(28)|BIT(30))
> >
> > #define SDHCI_GLI_9750_PLL 0x864
> > #define SDHCI_GLI_9750_PLL_TX2_INV BIT(23)
> > @@ -122,6 +125,8 @@ static void gli_set_9750(struct sdhci_host *host)
> > GLI_9750_DRIVING_1_VALUE);
> > driving_value |= FIELD_PREP(SDHCI_GLI_9750_DRIVING_2,
> > GLI_9750_DRIVING_2_VALUE);
> > + driving_value &= ~(SDHCI_GLI_9750_SEL_1|SDHCI_GLI_9750_SEL_2|SDHCI_GLI_9750_ALL_RST);
> > + driving_value |= SDHCI_GLI_9750_SEL_2;
> > sdhci_writel(host, driving_value, SDHCI_GLI_9750_DRIVING);
> >
> > sw_ctrl_value &= ~SDHCI_GLI_9750_SW_CTRL_4;
> >
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: sdhci-pci-gli: Fix can not access GL9750 after reboot from Windows 10
2020-05-04 6:39 [PATCH] mmc: sdhci-pci-gli: Fix can not access GL9750 after reboot from Windows 10 Ben Chuang
2020-05-04 7:27 ` Adrian Hunter
@ 2020-05-05 11:32 ` Ulf Hansson
1 sibling, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2020-05-05 11:32 UTC (permalink / raw)
To: Ben Chuang
Cc: Adrian Hunter, linux-mmc, Linux Kernel Mailing List, Ben Chuang,
renius.chen, custos.mentis
On Mon, 4 May 2020 at 08:41, Ben Chuang <benchuanggli@gmail.com> wrote:
>
> From: Ben Chuang <ben.chuang@genesyslogic.com.tw>
>
> Need to clear some bits in a vendor-defined register after reboot from
> Windows 10.
>
> Fixes: e51df6ce668a ("mmc: host: sdhci-pci: Add Genesys Logic GL975x support")
> Reported-by: Grzegorz Kowal <custos.mentis@gmail.com>
> Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
Applied for fixes, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/sdhci-pci-gli.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-pci-gli.c b/drivers/mmc/host/sdhci-pci-gli.c
> index ce15a05f23d4..8170b659f2af 100644
> --- a/drivers/mmc/host/sdhci-pci-gli.c
> +++ b/drivers/mmc/host/sdhci-pci-gli.c
> @@ -26,6 +26,9 @@
> #define SDHCI_GLI_9750_DRIVING_2 GENMASK(27, 26)
> #define GLI_9750_DRIVING_1_VALUE 0xFFF
> #define GLI_9750_DRIVING_2_VALUE 0x3
> +#define SDHCI_GLI_9750_SEL_1 BIT(29)
> +#define SDHCI_GLI_9750_SEL_2 BIT(31)
> +#define SDHCI_GLI_9750_ALL_RST (BIT(24)|BIT(25)|BIT(28)|BIT(30))
>
> #define SDHCI_GLI_9750_PLL 0x864
> #define SDHCI_GLI_9750_PLL_TX2_INV BIT(23)
> @@ -122,6 +125,8 @@ static void gli_set_9750(struct sdhci_host *host)
> GLI_9750_DRIVING_1_VALUE);
> driving_value |= FIELD_PREP(SDHCI_GLI_9750_DRIVING_2,
> GLI_9750_DRIVING_2_VALUE);
> + driving_value &= ~(SDHCI_GLI_9750_SEL_1|SDHCI_GLI_9750_SEL_2|SDHCI_GLI_9750_ALL_RST);
> + driving_value |= SDHCI_GLI_9750_SEL_2;
> sdhci_writel(host, driving_value, SDHCI_GLI_9750_DRIVING);
>
> sw_ctrl_value &= ~SDHCI_GLI_9750_SW_CTRL_4;
> --
> 2.26.2
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-05-05 11:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-04 6:39 [PATCH] mmc: sdhci-pci-gli: Fix can not access GL9750 after reboot from Windows 10 Ben Chuang
2020-05-04 7:27 ` Adrian Hunter
2020-05-05 9:15 ` Grzegorz Kowal
2020-05-05 11:32 ` Ulf Hansson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.