All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Shawn Lin <shawn.lin@rock-chips.com>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>,
	Michal Simek <michal.simek@xilinx.com>,
	soren.brinkmann@xilinx.com, Rob Herring <robh+dt@kernel.org>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Doug Anderson <dianders@chromium.org>,
	Brian Norris <briannorris@chromium.org>,
	Heiko Stuebner <heiko@sntech.de>,
	linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v4 5/5] mmc: sdhci-of-arasan: implement enhanced strobe callback
Date: Fri, 20 May 2016 14:44:34 +0300	[thread overview]
Message-ID: <573EF8A2.5070305@intel.com> (raw)
In-Reply-To: <1463733377-986-1-git-send-email-shawn.lin@rock-chips.com>

On 20/05/16 11:36, Shawn Lin wrote:
> Currently sdhci-arasan 5.1 can support enhanced strobe function,
> and we now limit it just for "arasan,sdhci-5.1". Add
> mmc-hs400-enhanced-strobe in DT to enable the function if we're
> sure our controller can support it.
> 
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
> Reviewed-by: Doug Anderson <dianders@chromium.org>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
> 
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
> 
>  drivers/mmc/host/sdhci-of-arasan.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
> index b6f4c1d..533e2bc 100644
> --- a/drivers/mmc/host/sdhci-of-arasan.c
> +++ b/drivers/mmc/host/sdhci-of-arasan.c
> @@ -25,7 +25,9 @@
>  #include "sdhci-pltfm.h"
>  
>  #define SDHCI_ARASAN_CLK_CTRL_OFFSET	0x2c
> +#define SDHCI_ARASAN_VENDOR_REGISTER	0x78
>  
> +#define VENDOR_ENHANCED_STROBE		BIT(0)
>  #define CLK_CTRL_TIMEOUT_SHIFT		16
>  #define CLK_CTRL_TIMEOUT_MASK		(0xf << CLK_CTRL_TIMEOUT_SHIFT)
>  #define CLK_CTRL_TIMEOUT_MIN_EXP	13
> @@ -79,6 +81,21 @@ static void sdhci_arasan_set_clock(struct sdhci_host *host, unsigned int clock)
>  	}
>  }
>  
> +static void sdhci_arasan_hs400_enhanced_strobe(struct mmc_host *mmc,
> +					struct mmc_ios *ios)
> +{
> +	u32 vendor;
> +	struct sdhci_host *host = mmc_priv(mmc);
> +
> +	vendor = readl(host->ioaddr + SDHCI_ARASAN_VENDOR_REGISTER);
> +	if (ios->enhanced_strobe)
> +		vendor |= VENDOR_ENHANCED_STROBE;
> +	else
> +		vendor &= ~VENDOR_ENHANCED_STROBE;
> +
> +	writel(vendor, host->ioaddr + SDHCI_ARASAN_VENDOR_REGISTER);
> +}
> +
>  static struct sdhci_ops sdhci_arasan_ops = {
>  	.set_clock = sdhci_arasan_set_clock,
>  	.get_max_clock = sdhci_pltfm_clk_get_max_clock,
> @@ -245,6 +262,9 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
>  			dev_err(&pdev->dev, "phy_power_on err.\n");
>  			goto err_phy_power;
>  		}
> +
> +		host->mmc_host_ops.hs400_enhanced_strobe =
> +					sdhci_arasan_hs400_enhanced_strobe;
>  	}
>  
>  	ret = sdhci_add_host(host);
> 


      reply	other threads:[~2016-05-20 11:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-20  8:34 [PATCH v4 0/5] Add enhanced strobe support for emmc version 5.1 or later Shawn Lin
2016-05-20  8:34 ` Shawn Lin
2016-05-20  8:35 ` [PATCH v4 1/5] Documentation: mmc: add mmc-hs400-enhanced-strobe Shawn Lin
2016-05-20  8:35 ` [PATCH v4 2/5] mmc: core: add mmc-hs400-enhanced-strobe support Shawn Lin
2016-05-20  8:36 ` [PATCH v4 3/5] mmc: core: implement enhanced strobe support Shawn Lin
2016-05-20  9:58   ` Adrian Hunter
2016-05-20 11:55     ` Shawn Lin
2016-05-20  8:36 ` [PATCH v4 4/5] mmc: debugfs: add HS400 enhanced strobe description Shawn Lin
2016-05-20  8:36 ` [PATCH v4 5/5] mmc: sdhci-of-arasan: implement enhanced strobe callback Shawn Lin
2016-05-20 11:44   ` Adrian Hunter [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=573EF8A2.5070305@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=briannorris@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=heiko@sntech.de \
    --cc=jh80.chung@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=michal.simek@xilinx.com \
    --cc=robh+dt@kernel.org \
    --cc=shawn.lin@rock-chips.com \
    --cc=soren.brinkmann@xilinx.com \
    --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 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.