All of lore.kernel.org
 help / color / mirror / Atom feed
From: vinod.koul@intel.com (Vinod Koul)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 2/4] dmaengine: Add STM32 MDMA driver
Date: Thu, 28 Sep 2017 13:43:11 +0530	[thread overview]
Message-ID: <20170928081310.GA30097@localhost> (raw)
In-Reply-To: <1503671466-32029-3-git-send-email-pierre-yves.mordret@st.com>

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?

> +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

-- 
~Vinod

WARNING: multiple messages have this Message-ID (diff)
From: Vinod Koul <vinod.koul@intel.com>
To: Pierre-Yves MORDRET <pierre-yves.mordret@st.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 13:43:11 +0530	[thread overview]
Message-ID: <20170928081310.GA30097@localhost> (raw)
In-Reply-To: <1503671466-32029-3-git-send-email-pierre-yves.mordret@st.com>

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?

> +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

-- 
~Vinod

  reply	other threads:[~2017-09-28  8:13 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25 14:31 [PATCH v4 0/4] Add STM32 MDMA driver Pierre-Yves MORDRET
2017-08-25 14:31 ` Pierre-Yves MORDRET
2017-08-25 14:31 ` 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   ` Pierre-Yves MORDRET
2017-08-25 14:31   ` Pierre-Yves MORDRET
2017-08-25 14:31 ` [PATCH v4 2/4] dmaengine: Add STM32 MDMA driver Pierre-Yves MORDRET
2017-08-25 14:31   ` Pierre-Yves MORDRET
2017-08-25 14:31   ` Pierre-Yves MORDRET
2017-09-28  8:13   ` Vinod Koul [this message]
2017-09-28  8:13     ` Vinod Koul
2017-09-28 13:17     ` Pierre Yves MORDRET
2017-09-28 13:17       ` Pierre Yves MORDRET
2017-09-28 13:17       ` Pierre Yves MORDRET
2017-08-25 14:31 ` [PATCH v4 3/4] ARM: dts: stm32: Add MDMA support for STM32H743 SoC Pierre-Yves MORDRET
2017-08-25 14:31   ` Pierre-Yves MORDRET
2017-08-25 14:31   ` Pierre-Yves MORDRET
2017-09-26 17:44   ` Vinod Koul
2017-09-26 17:44     ` Vinod Koul
2017-09-27  7:14     ` Alexandre Torgue
2017-09-27  7:14       ` Alexandre Torgue
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-08-25 14:31   ` Pierre-Yves MORDRET
2017-08-25 14:31   ` Pierre-Yves MORDRET
2017-09-21  8:01 ` [PATCH v4 0/4] Add STM32 MDMA driver Pierre Yves MORDRET
2017-09-21  8:01   ` Pierre Yves MORDRET
2017-09-21  8:01   ` 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=20170928081310.GA30097@localhost \
    --to=vinod.koul@intel.com \
    --cc=linux-arm-kernel@lists.infradead.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.