From: Scott Wood <scottwood@freescale.com>
To: Yangbo Lu <yangbo.lu@freescale.com>,
linux-mmc@vger.kernel.org, ulf.hansson@linaro.org
Cc: X.Xie@freescale.com, LeoLi@freescale.com
Subject: Re: [v3, 2/5] mmc: sdhci-of-esdhc: get SVR from global utilities registers
Date: Tue, 8 Dec 2015 11:45:32 -0600 [thread overview]
Message-ID: <1449596732.15946.125.camel@freescale.com> (raw)
In-Reply-To: <1448594417-22515-3-git-send-email-yangbo.lu@freescale.com>
On Fri, 2015-11-27 at 11:20 +0800, Yangbo Lu wrote:
> Most of silicon errata about the eSDHC need to be identified through
> the SoC version/revision. This patch makes the driver get these
> information from SVR(system version register) of global utilities
> registers.
>
> Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
> ---
> Changes for v2:
> - Got SVR through iomap instead of dts
> Changes for v3:
> - Managed GUTS through syscon instead of iomap in eSDHC driver
> ---
> drivers/mmc/host/sdhci-of-esdhc.c | 19 +++++++++++++++++--
> 1 file changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of
> -esdhc.c
> index 83b1226..fce24b7 100644
> --- a/drivers/mmc/host/sdhci-of-esdhc.c
> +++ b/drivers/mmc/host/sdhci-of-esdhc.c
> @@ -19,6 +19,9 @@
> #include <linux/delay.h>
> #include <linux/module.h>
> #include <linux/mmc/host.h>
> +#include <linux/mfd/syscon.h>
> +#include <linux/regmap.h>
> +#include <linux/fsl-svr.h>
> #include "sdhci-pltfm.h"
> #include "sdhci-esdhc.h"
>
> @@ -28,6 +31,8 @@
> struct sdhci_esdhc {
> u8 vendor_ver;
> u8 spec_ver;
> + u32 soc_ver;
> + u8 soc_rev;
> };
>
> /**
> @@ -566,18 +571,28 @@ static void esdhc_init(struct platform_device *pdev,
> struct sdhci_host *host)
> {
> struct sdhci_pltfm_host *pltfm_host;
> struct sdhci_esdhc *esdhc;
> + struct regmap *guts_regmap;
> + u32 svr;
> u16 host_ver;
>
> pltfm_host = sdhci_priv(host);
> esdhc = devm_kzalloc(&pdev->dev, sizeof(struct sdhci_esdhc),
> GFP_KERNEL);
> + pltfm_host->priv = esdhc;
> +
> + guts_regmap = syscon_regmap_lookup_by_compatible("syscon");
> + if (IS_ERR(guts_regmap)) {
> + dev_err(&pdev->dev, "unable to find global utilities
> registers\n");
> + } else {
> + regmap_read(guts_regmap, SVR_OFFSET, &svr);
> + esdhc->soc_ver = SVR_SOC_VER(svr);
> + esdhc->soc_rev = SVR_REV(svr);
> + }
As this patchset stands you're going to be spitting out that error message on
everything that isn't t4240...
-Scott
next prev parent reply other threads:[~2015-12-08 18:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-27 3:20 [v3, 0/5] eSDHC patches introduction Yangbo Lu
2015-11-27 3:20 ` [v3, 1/5] powerpc/fsl: move mpc85xx.h to include/linux Yangbo Lu
2015-12-08 13:49 ` Ulf Hansson
2015-12-08 17:38 ` Scott Wood
2015-12-08 17:44 ` Scott Wood
2015-11-27 3:20 ` [v3, 2/5] mmc: sdhci-of-esdhc: get SVR from global utilities registers Yangbo Lu
2015-12-08 17:45 ` Scott Wood [this message]
2015-11-27 3:20 ` [v3, 3/5] mmc: kconfig: select MFD_SYSCON for MMC_SDHCI_OF_ESDHC Yangbo Lu
2015-12-08 13:49 ` Ulf Hansson
2015-12-08 17:40 ` Scott Wood
2015-11-27 3:20 ` [v3, 4/5] powerpc: dts: t4240: add syscon support for DCFG node Yangbo Lu
2015-12-08 17:46 ` Scott Wood
[not found] ` <BLUPR0301MB2065B5878A43F66982D6B30BF2E80@BLUPR0301MB2065.namprd03.prod.outlook.com>
2015-12-09 4:33 ` Scott Wood
[not found] ` <BLUPR0301MB206558CB317D48AC5CEF3642F2E80@BLUPR0301MB2065.namprd03.prod.outlook.com>
2015-12-09 17:00 ` Scott Wood
2015-12-11 8:26 ` Ulf Hansson
2015-12-11 8:29 ` Scott Wood
[not found] ` <BLUPR0301MB2065A179DCAF428EB79785B7F2E80@BLUPR0301MB2065.namprd03.prod.outlook.com>
2015-12-09 17:01 ` Scott Wood
2015-11-27 3:20 ` [v3, 5/5] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0 Yangbo Lu
2015-12-08 13:59 ` [v3, 0/5] eSDHC patches introduction Ulf Hansson
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=1449596732.15946.125.camel@freescale.com \
--to=scottwood@freescale.com \
--cc=LeoLi@freescale.com \
--cc=X.Xie@freescale.com \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=yangbo.lu@freescale.com \
/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