From: Pierre Yves MORDRET <pierre-yves.mordret@st.com>
To: Vinod Koul <vinod.koul@intel.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
Russell King <linux@armlinux.org.uk>,
Dan Williams <dan.j.williams@intel.com>,
"M'boumba Cedric Madianga" <cedric.madianga@gmail.com>,
Fabrice GASNIER <fabrice.gasnier@st.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Fabien DESSENNE <fabien.dessenne@st.com>,
Amelie Delaunay <amelie.delaunay@st.com>,
<dmaengine@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 2/4] dmaengine: Add STM32 MDMA driver
Date: Thu, 28 Sep 2017 15:17:49 +0200 [thread overview]
Message-ID: <1a869018-31e7-9fd4-2017-9c8cdd8c7d88@st.com> (raw)
In-Reply-To: <20170928081310.GA30097@localhost>
On 09/28/2017 10:13 AM, Vinod Koul wrote:
> On Fri, Aug 25, 2017 at 04:31:04PM +0200, Pierre-Yves MORDRET wrote:
>> +static int stm32_mdma_probe(struct platform_device *pdev)
>> +{
>
> [snip]
>
>> + dmadev = devm_kzalloc(&pdev->dev, sizeof(*dmadev) + sizeof(u32) * count,
>> + GFP_KERNEL);
>> + if (!dmadev)
>> + return -ENOMEM;
>> +
>> + dmadev->nr_channels = nr_channels;
>> + dmadev->nr_requests = nr_requests;
>> + device_property_read_u32_array(&pdev->dev, "st,ahb-addr-masks",
>> + dmadev->ahb_addr_masks,
>> + count);
>> + dmadev->nr_ahb_addr_masks = count;
>> +
>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> + dmadev->base = devm_ioremap_resource(&pdev->dev, res);
>> + if (IS_ERR(dmadev->base))
>> + return PTR_ERR(dmadev->base);
>> +
>> + dmadev->clk = devm_clk_get(&pdev->dev, NULL);
>> + if (IS_ERR(dmadev->clk)) {
>> + dev_err(&pdev->dev, "Error: Missing controller clock\n");
>> + return PTR_ERR(dmadev->clk);
>> + }
>
> I am assuming if clk is not availble at this point of time you return clk
> error which maybe defer probe, right?
Yes. So I will add an "if" statement as I did for DMAMUX
if (ret == -EPROBE_DEFER)
dev_info .... (instead of dev_err)
>
>> +static struct platform_driver stm32_mdma_driver = {
>> + .driver = {
>> + .name = "stm32-mdma",
>> + .of_match_table = stm32_mdma_of_match,
>> + },
>> +};
>> +
>> +static int __init stm32_mdma_init(void)
>> +{
>> + return platform_driver_probe(&stm32_mdma_driver, stm32_mdma_probe);
>
> and you register platform_driver_probe() which per
> drivers/base/platform.c:760 is incompatible with defer probing.
> So this need a fix
>
Will change to platform_driver_register
Thanks and regards
next prev parent reply other threads:[~2017-09-28 13:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-25 14:31 [PATCH v4 0/4] " Pierre-Yves MORDRET
2017-08-25 14:31 ` [PATCH v4 1/4] dt-bindings: Document the STM32 MDMA bindings Pierre-Yves MORDRET
2017-08-25 14:31 ` [PATCH v4 2/4] dmaengine: Add STM32 MDMA driver Pierre-Yves MORDRET
2017-09-28 8:13 ` Vinod Koul
2017-09-28 13:17 ` Pierre Yves MORDRET [this message]
2017-08-25 14:31 ` [PATCH v4 3/4] ARM: dts: stm32: Add MDMA support for STM32H743 SoC Pierre-Yves MORDRET
2017-09-26 17:44 ` Vinod Koul
2017-09-27 7:14 ` Alexandre Torgue
2017-08-25 14:31 ` [PATCH v4 4/4] ARM: configs: stm32: Add MDMA support in STM32 defconfig Pierre-Yves MORDRET
2017-09-21 8:01 ` [PATCH v4 0/4] Add STM32 MDMA driver Pierre Yves MORDRET
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=1a869018-31e7-9fd4-2017-9c8cdd8c7d88@st.com \
--to=pierre-yves.mordret@st.com \
--cc=alexandre.torgue@st.com \
--cc=amelie.delaunay@st.com \
--cc=cedric.madianga@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=fabien.dessenne@st.com \
--cc=fabrice.gasnier@st.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=robh+dt@kernel.org \
--cc=vinod.koul@intel.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
all inboxes | Powered by JetHome®