devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: "LH.Kuo" <lhjeff911@gmail.com>,
	ulf.hansson@linaro.org, robh+dt@kernel.org,
	linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
	devicetree@vger.kernel.org
Cc: dvorkin@tibbo.com, qinjian@cqplus1.com, wells.lu@sunplus.com,
	"LH.Kuo" <lh.kuo@sunplus.com>
Subject: Re: [PATCH 1/2] mmc: Add SD/SDIO driver for Sunplus SP7021
Date: Tue, 02 Nov 2021 15:34:20 +0100	[thread overview]
Message-ID: <a79a72c25dc4ab3a07ec74459edb1e8169be8504.camel@pengutronix.de> (raw)
In-Reply-To: <1635487055-18494-2-git-send-email-lh.kuo@sunplus.com>

On Fri, 2021-10-29 at 13:57 +0800, LH.Kuo wrote:
[...]
> --- /dev/null
> +++ b/drivers/mmc/host/sunplus_sd2.c
> @@ -0,0 +1,1069 @@
[...]
> +static void spsdc_controller_init(struct spsdc_host *host)
> +{
> +	u32 value;
> +	int ret = reset_control_assert(host->rstc);
> +
> +	if (!ret) {
> +		mdelay(1);

Consider using usleep_range(), see Documentation/timers/timers-howto.rst

[...]
> +static int spsdc_drv_probe(struct platform_device *pdev)
> +{
> +	int ret = 0;
> +	struct mmc_host *mmc;
> +	struct resource *resource;
> +	struct spsdc_host *host;
> +	unsigned int mode;
> +
> +	mmc = mmc_alloc_host(sizeof(*host), &pdev->dev);
> +	if (!mmc) {
> +		ret = -ENOMEM;
> +		goto probe_free_host;
> +	}
> +
> +	host = mmc_priv(mmc);
> +	host->mmc = mmc;
> +	host->power_state = MMC_POWER_OFF;
> +	host->dma_int_threshold = 1024;
> +	host->dmapio_mode = SPSDC_DMA_MODE;
> +
> +	host->clk = devm_clk_get(&pdev->dev, NULL);
> +	if (IS_ERR(host->clk)) {
> +		spsdc_pr(ERROR, "Can not find clock source\n");
> +		ret = PTR_ERR(host->clk);
> +		goto probe_free_host;
> +	}
> +
> +	host->rstc = devm_reset_control_get(&pdev->dev, NULL);

Please use devm_reset_control_get_exclusive() instead.

regards
Philipp

  parent reply	other threads:[~2021-11-02 14:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29  5:57 [PATCH 0/2] Add SD/SDIO control driver for Sunplus SP7021 SoC LH.Kuo
2021-10-29  5:57 ` [PATCH 1/2] mmc: Add SD/SDIO driver for Sunplus SP7021 LH.Kuo
2021-10-30  0:00   ` Randy Dunlap
2021-11-02 14:34   ` Philipp Zabel [this message]
2021-10-29  5:57 ` [PATCH 2/2] devicetree bindings mmc Add bindings doc " LH.Kuo
2021-11-09  7:58 ` [PATCH v2 0/2] Add SD/SDIO control driver for Sunplus SP7021 SoC LH.Kuo
2021-11-09  7:58   ` [PATCH v2 1/2] mmc: Add SD/SDIO driver for Sunplus SP7021 LH.Kuo
2021-11-10  2:33     ` Randy Dunlap
     [not found]       ` <d25f2bff024b40fd9691960221c0bebe@sphcmbx02.sunplus.com.tw>
2021-11-10  5:44         ` Randy Dunlap
2021-11-09  7:58   ` [PATCH v2 2/2] devicetree bindings mmc Add bindings doc " LH.Kuo
2021-11-29  1:37     ` Rob Herring
     [not found]       ` <f5607fa7ad9c49a7bfcce02eac834838@sphcmbx02.sunplus.com.tw>
2021-11-29 16:29         ` Rob Herring
     [not found]           ` <1eb97e1aca9c4c8d8f1e17c51f2792ac@sphcmbx02.sunplus.com.tw>
2022-01-04 20:31             ` Rob Herring

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=a79a72c25dc4ab3a07ec74459edb1e8169be8504.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=devicetree@vger.kernel.org \
    --cc=dvorkin@tibbo.com \
    --cc=lh.kuo@sunplus.com \
    --cc=lhjeff911@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=qinjian@cqplus1.com \
    --cc=robh+dt@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=wells.lu@sunplus.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;
as well as URLs for NNTP newsgroup(s).