From: Shan-Chun Hung <shanchun1218@gmail.com>
To: Philipp Zabel <p.zabel@pengutronix.de>,
ulf.hansson@linaro.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, adrian.hunter@intel.com,
pbrobinson@gmail.com, serghox@gmail.com, mcgrof@kernel.org,
prabhakar.mahadev-lad.rj@bp.renesas.com,
forbidden405@outlook.com, tmaimon77@gmail.com,
andy.shevchenko@gmail.com, linux-arm-kernel@lists.infradead.org,
linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: ychuang3@nuvoton.com, schung@nuvoton.com
Subject: Re: [PATCH 2/2] mmc: sdhci-of-ma35d1: Add Novoton MA35D1 SDHCI driver
Date: Sat, 22 Jun 2024 17:15:24 +0800 [thread overview]
Message-ID: <3c4e0d8f-8d1e-4667-87c3-f070f3649a2c@gmail.com> (raw)
In-Reply-To: <bd0e85f42ef74f6f927020cbee6879351d1c3e9e.camel@pengutronix.de>
Dear Philipp,
Thanks for your review.
On 2024/6/21 下午 07:45, Philipp Zabel wrote:
> On Mi, 2024-06-19 at 13:46 +0800, Shan-Chun Hung wrote:
>> This adds the SDHCI driver for the MA35 series SoC. It is based upon the
>> SDHCI interface, but requires some extra initialization.
>>
>> Signed-off-by: schung<schung@nuvoton.com>
>> ---
>> drivers/mmc/host/Kconfig | 13 ++
>> drivers/mmc/host/Makefile | 1 +
>> drivers/mmc/host/sdhci-of-ma35d1.c | 297 +++++++++++++++++++++++++++++
>> 3 files changed, 311 insertions(+)
>> create mode 100644 drivers/mmc/host/sdhci-of-ma35d1.c
>>
> [...]
>> diff --git a/drivers/mmc/host/sdhci-of-ma35d1.c b/drivers/mmc/host/sdhci-of-ma35d1.c
>> new file mode 100644
>> index 000000000000..7714a5ab463d
>> --- /dev/null
>> +++ b/drivers/mmc/host/sdhci-of-ma35d1.c
>> @@ -0,0 +1,297 @@
> [...]
>> +static int ma35_probe(struct platform_device *pdev)
>> +{
>> + struct device *dev = &pdev->dev;
>> + struct sdhci_pltfm_host *pltfm_host;
>> + struct sdhci_host *host;
>> + struct ma35_priv *priv;
>> + int err;
>> + u32 extra, ctl;
>> +
>> + host = sdhci_pltfm_init(pdev, &sdhci_ma35_pdata,
>> + sizeof(struct ma35_priv));
>> + if (IS_ERR(host))
>> + return PTR_ERR(host);
>> +
>> + /*
>> + * extra adma table cnt for cross 128M boundary handling.
>> + */
>> + extra = DIV_ROUND_UP_ULL(dma_get_required_mask(&pdev->dev), SZ_128M);
>> + if (extra > SDHCI_MAX_SEGS)
>> + extra = SDHCI_MAX_SEGS;
>> + host->adma_table_cnt += extra;
>> + pltfm_host = sdhci_priv(host);
>> + priv = sdhci_pltfm_priv(pltfm_host);
>> +
>> + if (dev->of_node) {
>> + pltfm_host->clk = devm_clk_get(&pdev->dev, NULL);
>> + if (IS_ERR(pltfm_host->clk)) {
>> + err = PTR_ERR(pltfm_host->clk);
>> + dev_err(&pdev->dev, "failed to get clk: %d\n", err);
>> + goto free_pltfm;
>> + }
>> + err = clk_prepare_enable(pltfm_host->clk);
>> + if (err)
>> + goto free_pltfm;
>> + }
>> +
>> + err = mmc_of_parse(host->mmc);
>> + if (err)
>> + goto err_clk;
>> +
>> + priv->rst = devm_reset_control_get(&pdev->dev, NULL);
> Please use devm_reset_control_get_exclusive() instead.
>
> regards
> Philipp
OK, I will fix it.
Best Regards
Shan-Chun
next prev parent reply other threads:[~2024-06-22 9:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-19 5:46 [PATCH 0/2] Add support for Nuvovon MA35D1 SDHCI Shan-Chun Hung
2024-06-19 5:46 ` [PATCH 1/2] dt-bindings: mmc: nuvoton,ma35d1-sdhci: Document MA35D1 SDHCI controller Shan-Chun Hung
2024-06-19 7:16 ` Rob Herring (Arm)
2024-06-19 7:29 ` Krzysztof Kozlowski
2024-06-20 23:53 ` Shan-Chun Hung
2024-06-21 6:04 ` Krzysztof Kozlowski
2024-06-21 6:44 ` Shan-Chun Hung
2024-06-19 5:46 ` [PATCH 2/2] mmc: sdhci-of-ma35d1: Add Novoton MA35D1 SDHCI driver Shan-Chun Hung
2024-06-19 10:18 ` Dragan Simic
2024-06-19 16:17 ` Shan-Chun Hung
2024-06-19 16:18 ` [PATCH 2/2] mmc: sdhci-of-ma35d1: Add Nuvoton " Markus Elfring
2024-06-20 6:49 ` Shan-Chun Hung
2024-06-20 6:58 ` Krzysztof Kozlowski
2024-06-20 8:59 ` Shan-Chun Hung
2024-06-19 19:09 ` [PATCH 2/2] mmc: sdhci-of-ma35d1: Add Novoton " Andy Shevchenko
2024-06-21 8:06 ` Shan-Chun Hung
2024-06-21 11:25 ` Andy Shevchenko
2024-06-24 0:28 ` Shan-Chun Hung
2024-06-21 11:45 ` Philipp Zabel
2024-06-22 9:15 ` Shan-Chun Hung [this message]
2024-06-19 15:40 ` [PATCH 0/2] Add support for Nuvovon MA35D1 SDHCI Markus Elfring
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=3c4e0d8f-8d1e-4667-87c3-f070f3649a2c@gmail.com \
--to=shanchun1218@gmail.com \
--cc=adrian.hunter@intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=forbidden405@outlook.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=pbrobinson@gmail.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=robh@kernel.org \
--cc=schung@nuvoton.com \
--cc=serghox@gmail.com \
--cc=tmaimon77@gmail.com \
--cc=ulf.hansson@linaro.org \
--cc=ychuang3@nuvoton.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).