From: "Jyan Chou [周芷安]" <jyanchou@realtek.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
"ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
"jh80.chung@samsung.com" <jh80.chung@samsung.com>,
"riteshh@codeaurora.org" <riteshh@codeaurora.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"asutoshd@codeaurora.org" <asutoshd@codeaurora.org>
Cc: "p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"arnd@arndb.de" <arnd@arndb.de>,
"briannorris@chromium.org" <briannorris@chromium.org>,
"doug@schmorgal.com" <doug@schmorgal.com>,
"tonyhuang.sunplus@gmail.com" <tonyhuang.sunplus@gmail.com>,
"abel.vesa@linaro.org" <abel.vesa@linaro.org>,
"william.qiu@starfivetech.com" <william.qiu@starfivetech.com>
Subject: RE: [PATCH V5][3/4] mmc: Add dw mobile mmc cmdq rtk driver
Date: Thu, 9 Nov 2023 07:34:47 +0000 [thread overview]
Message-ID: <6da3391700204ebc8d2c0bb5e927d2c8@realtek.com> (raw)
In-Reply-To: <9c083c35-a8fb-4ee3-90a3-96af7efec11f@linaro.org>
Hi Krzysztof,
>> Add Realtek mmc driver to make good use Synopsys DesignWare mmc cmdq
>> host driver.
>>
>> Signed-off-by: Jyan Chou <jyanchou@realtek.com>
>>
>> ---
>> v4 -> v5:
>> - Fix linux coding style issues.
>> - Modify the use of sizeof(*).
>> - Remove useless function and parameter passing.
>> - Replace platform_get_resource by devm_platform_ioremap_resource().
> It's merge window. Sending big patchset every day won't get you far.
Thanks for your remind.
>>
>> v3 -> v4:
>> - Modify dma setting's code to fix linux coding style.
>> - Drop useless function messages.
>> - Remove MODULE_ALIAS().
>>
>> v0 -> v1:
>> - Fix the compiler complains.
>> ---
>> +
>> +static int dw_mci_rtk_parse_dt(struct dw_mci *host) {
>> + struct dw_mci_rtkemmc_host *priv;
>> + const u32 *prop;
>> + int size, ret;
>> +
>> + priv = devm_kzalloc(host->dev, sizeof(*priv), GFP_KERNEL);
>> + if (!priv)
>> + return -ENOMEM;
>> +
>> + priv->pinctrl = devm_pinctrl_get(host->dev);
>> + if (IS_ERR(priv->pinctrl))
>> + dev_dbg(host->dev, "no pinctrl\n");
>> +
>> + priv->pins_default = pinctrl_lookup_state(priv->pinctrl,
>> + PINCTRL_STATE_DEFAULT);
>> + if (IS_ERR(priv->pins_default))
>> + dev_warn(host->dev, "could not get default state\n");
>> +
>> + priv->pins_sdr50 = pinctrl_lookup_state(priv->pinctrl,
>> + "sdr50");
>> + if (IS_ERR(priv->pins_sdr50))
>> + dev_warn(host->dev, "could not get sdr50 state\n");
>> +
>> + priv->pins_hs200 = pinctrl_lookup_state(priv->pinctrl,
>> + "hs200");
>> + if (IS_ERR(priv->pins_hs200))
>> + dev_warn(host->dev, "could not get hs200 state\n");
>> +
>> + priv->pins_hs400 = pinctrl_lookup_state(priv->pinctrl,
>> + "hs400");
>> + if (IS_ERR(priv->pins_hs400))
>> + dev_warn(host->dev, "could not get hs400 state\n");
>> +
>> + priv->pins_tune0 = pinctrl_lookup_state(priv->pinctrl,
>> + "tune0");
>> + if (IS_ERR(priv->pins_tune0))
>> + dev_warn(host->dev, "could not get tune0 state\n");
>> +
>> + priv->pins_tune1 = pinctrl_lookup_state(priv->pinctrl,
>> + "tune1");
>> + if (IS_ERR(priv->pins_tune1))
>> + dev_warn(host->dev, "could not get tune1 state\n");
>> +
>> + priv->pins_tune2 = pinctrl_lookup_state(priv->pinctrl,
>> + "tune2");
>> + if (IS_ERR(priv->pins_tune2))
>> + dev_warn(host->dev, "could not get tune2 state\n");
>> +
>> + priv->pins_tune3 = pinctrl_lookup_state(priv->pinctrl,
>> + "tune3");
>> + if (IS_ERR(priv->pins_tune3))
>> + dev_warn(host->dev, "could not get tune3 state\n");
>> +
>> + priv->pins_tune4 = pinctrl_lookup_state(priv->pinctrl,
>> + "tune4");
>> +
>> + if (IS_ERR(priv->pins_tune4))
>> + dev_warn(host->dev, "could not get tune4 state\n");
>> +
>> + priv->vp0 = devm_clk_get(host->dev, "vp0");
>> + if (IS_ERR(priv->vp0))
>> + dev_err_probe(host->dev, ret, "could not get vp0
>> + clk\n");
>> +
>> + priv->vp1 = devm_clk_get(host->dev, "vp1");
>> + if (IS_ERR(priv->vp1))
>> + dev_err_probe(host->dev, ret, "could not get vp1
>> + clk\n");
>> +
>> + if (of_property_read_bool(host->dev->of_node, "supports-cqe"))
>> + priv->is_cqe = 1;
>> + else
>> + priv->is_cqe = 0;
>> +
>> + prop = of_get_property(host->dev->of_node, "rdq-ctrl", &size);
> NAK
I will remove useless bindings.
>> + if (prop)
>> + priv->rdq_ctrl = of_read_number(prop, 1);
>> + else
>> + priv->rdq_ctrl = 0;
>> +
>> + priv->emmc_mode = 3;
>> +
>> + priv->m2tmx =
>> + syscon_regmap_lookup_by_phandle(host->dev->of_node,
>> + "realtek,m2tmx");
> NAK, for the same reasons I mentioned for other patch.
> I will keep NAK-ing till you start testing your DTS.
Sorry, I am not sure whether I modify the correct thing you said. I will add
realtek,m2tmx in bindings.
>> + if (IS_ERR_OR_NULL(priv->m2tmx))
>> + dev_err_probe(host->dev, ret, "can not get m2mtx
>> + node.\n");
>> +
>> + host->priv = priv;
>> +
>> + return 0;
>> +}
-----Original Message-----
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sent: Thursday, November 2, 2023 4:57 PM
To: Jyan Chou [周芷安] <jyanchou@realtek.com>; ulf.hansson@linaro.org; adrian.hunter@intel.com; jh80.chung@samsung.com; riteshh@codeaurora.org; robh+dt@kernel.org; krzysztof.kozlowski+dt@linaro.org; conor+dt@kernel.org; asutoshd@codeaurora.org
Cc: p.zabel@pengutronix.de; linux-mmc@vger.kernel.org; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; arnd@arndb.de; briannorris@chromium.org; doug@schmorgal.com; tonyhuang.sunplus@gmail.com; abel.vesa@linaro.org; william.qiu@starfivetech.com
Subject: Re: [PATCH V5][3/4] mmc: Add dw mobile mmc cmdq rtk driver
External mail.
On 02/11/2023 09:15, Jyan Chou wrote:
> Add Realtek mmc driver to make good use Synopsys DesignWare mmc cmdq
> host driver.
>
> Signed-off-by: Jyan Chou <jyanchou@realtek.com>
>
> ---
> v4 -> v5:
> - Fix linux coding style issues.
> - Modify the use of sizeof(*).
> - Remove useless function and parameter passing.
> - Replace platform_get_resource by devm_platform_ioremap_resource().
It's merge window. Sending big patchset every day won't get you far.
>
> v3 -> v4:
> - Modify dma setting's code to fix linux coding style.
> - Drop useless function messages.
> - Remove MODULE_ALIAS().
>
> v0 -> v1:
> - Seperate different support into single patch.
> - Fix the compiler complains.
> ---
> +
> +static int dw_mci_rtk_parse_dt(struct dw_mci *host) {
> + struct dw_mci_rtkemmc_host *priv;
> + const u32 *prop;
> + int size, ret;
> +
> + priv = devm_kzalloc(host->dev, sizeof(*priv), GFP_KERNEL);
> + if (!priv)
> + return -ENOMEM;
> +
> + priv->pinctrl = devm_pinctrl_get(host->dev);
> + if (IS_ERR(priv->pinctrl))
> + dev_dbg(host->dev, "no pinctrl\n");
> +
> + priv->pins_default = pinctrl_lookup_state(priv->pinctrl,
> + PINCTRL_STATE_DEFAULT);
> + if (IS_ERR(priv->pins_default))
> + dev_warn(host->dev, "could not get default state\n");
> +
> + priv->pins_sdr50 = pinctrl_lookup_state(priv->pinctrl,
> + "sdr50");
> + if (IS_ERR(priv->pins_sdr50))
> + dev_warn(host->dev, "could not get sdr50 state\n");
> +
> + priv->pins_hs200 = pinctrl_lookup_state(priv->pinctrl,
> + "hs200");
> + if (IS_ERR(priv->pins_hs200))
> + dev_warn(host->dev, "could not get hs200 state\n");
> +
> + priv->pins_hs400 = pinctrl_lookup_state(priv->pinctrl,
> + "hs400");
> + if (IS_ERR(priv->pins_hs400))
> + dev_warn(host->dev, "could not get hs400 state\n");
> +
> + priv->pins_tune0 = pinctrl_lookup_state(priv->pinctrl,
> + "tune0");
> + if (IS_ERR(priv->pins_tune0))
> + dev_warn(host->dev, "could not get tune0 state\n");
> +
> + priv->pins_tune1 = pinctrl_lookup_state(priv->pinctrl,
> + "tune1");
> + if (IS_ERR(priv->pins_tune1))
> + dev_warn(host->dev, "could not get tune1 state\n");
> +
> + priv->pins_tune2 = pinctrl_lookup_state(priv->pinctrl,
> + "tune2");
> + if (IS_ERR(priv->pins_tune2))
> + dev_warn(host->dev, "could not get tune2 state\n");
> +
> + priv->pins_tune3 = pinctrl_lookup_state(priv->pinctrl,
> + "tune3");
> + if (IS_ERR(priv->pins_tune3))
> + dev_warn(host->dev, "could not get tune3 state\n");
> +
> + priv->pins_tune4 = pinctrl_lookup_state(priv->pinctrl,
> + "tune4");
> +
> + if (IS_ERR(priv->pins_tune4))
> + dev_warn(host->dev, "could not get tune4 state\n");
> +
> + priv->vp0 = devm_clk_get(host->dev, "vp0");
> + if (IS_ERR(priv->vp0))
> + dev_err_probe(host->dev, ret, "could not get vp0
> + clk\n");
> +
> + priv->vp1 = devm_clk_get(host->dev, "vp1");
> + if (IS_ERR(priv->vp1))
> + dev_err_probe(host->dev, ret, "could not get vp1
> + clk\n");
> +
> + if (of_property_read_bool(host->dev->of_node, "supports-cqe"))
> + priv->is_cqe = 1;
> + else
> + priv->is_cqe = 0;
> +
> + prop = of_get_property(host->dev->of_node, "rdq-ctrl", &size);
NAK
> + if (prop)
> + priv->rdq_ctrl = of_read_number(prop, 1);
> + else
> + priv->rdq_ctrl = 0;
> +
> + priv->emmc_mode = 3;
> +
> + priv->m2tmx =
> + syscon_regmap_lookup_by_phandle(host->dev->of_node,
> + "realtek,m2tmx");
NAK, for the same reasons I mentioned for other patch.
I will keep NAK-ing till you start testing your DTS.
> + if (IS_ERR_OR_NULL(priv->m2tmx))
> + dev_err_probe(host->dev, ret, "can not get m2mtx
> + node.\n");
> +
> + host->priv = priv;
> +
> + return 0;
> +}
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-11-09 7:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 8:15 [PATCH V5][0/4] Add DesignWare Mobile mmc driver Jyan Chou
2023-11-02 8:15 ` [PATCH V5][1/4] mmc: solve DMA boundary limitation of CQHCI driver Jyan Chou
2023-11-02 8:15 ` [PATCH V5][2/4] mmc: Add Synopsys DesignWare mmc cmdq host driver Jyan Chou
2023-11-02 8:53 ` Krzysztof Kozlowski
2023-11-09 7:10 ` Jyan Chou [周芷安]
2023-11-02 8:15 ` [PATCH V5][3/4] mmc: Add dw mobile mmc cmdq rtk driver Jyan Chou
2023-11-02 8:57 ` Krzysztof Kozlowski
2023-11-09 7:34 ` Jyan Chou [周芷安] [this message]
2023-11-09 8:27 ` Krzysztof Kozlowski
2023-11-02 8:15 ` [PATCH V5][4/4] dt-bindings: mmc: Add dt-bindings for realtek mmc driver Jyan Chou
2023-11-02 8:53 ` Krzysztof Kozlowski
2023-11-09 7:27 ` Jyan Chou [周芷安]
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=6da3391700204ebc8d2c0bb5e927d2c8@realtek.com \
--to=jyanchou@realtek.com \
--cc=abel.vesa@linaro.org \
--cc=adrian.hunter@intel.com \
--cc=arnd@arndb.de \
--cc=asutoshd@codeaurora.org \
--cc=briannorris@chromium.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=doug@schmorgal.com \
--cc=jh80.chung@samsung.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=riteshh@codeaurora.org \
--cc=robh+dt@kernel.org \
--cc=tonyhuang.sunplus@gmail.com \
--cc=ulf.hansson@linaro.org \
--cc=william.qiu@starfivetech.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