From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Vinod Koul <vinod.koul@intel.com>
Cc: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Daniel Mack <daniel@zonque.org>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org
Subject: Re: [PATCH 4/4] dmaengine: pxa_dma: fix the maximum requestor line
Date: Mon, 15 Feb 2016 19:22:36 +0100 [thread overview]
Message-ID: <87bn7h25qr.fsf@belgarion.home> (raw)
In-Reply-To: <20160215173300.GN19598@localhost> (Vinod Koul's message of "Mon, 15 Feb 2016 23:03:00 +0530")
Vinod Koul <vinod.koul@intel.com> writes:
> On Mon, Feb 15, 2016 at 06:24:57PM +0100, Robert Jarzmik wrote:
>> Vinod Koul <vinod.koul@intel.com> writes:
>>
>> > On Thu, Feb 11, 2016 at 10:23:18PM +0100, Robert Jarzmik wrote:
>> >> @@ -1399,13 +1405,17 @@ static int pxad_probe(struct platform_device *op)
>> >> return PTR_ERR(pdev->base);
>> >>
>> >> of_id = of_match_device(pxad_dt_ids, &op->dev);
>> >> - if (of_id)
>> >> + if (of_id) {
>> >> of_property_read_u32(op->dev.of_node, "#dma-channels",
>> >> &dma_channels);
>> >> - else if (pdata && pdata->dma_channels)
>> >> + of_property_read_u32(op->dev.of_node, "#requestors",
>> >> + &nb_requestors);
>> >
>> > I think we should check the return value here. This might be err in case
>> > when we have older DT on platform, but still should work with default in
>> > that case
>>
>> Okay, but how should the code react to the err case, more specifically to
>> -EINVAL or -ENODATA ? As this property is optional as per the device-tree
>> description, the current code leaves nb_requestors = 0, as is specified in the
>> description, and fits the mmp_pdma case.
>>
>> What do you think should be done ? A warning message ? Something else ?
>
> Message is fine, but in order for not to regress we should set this to 32
> (IIRC default before this, right) and not zero.
Okay, got you.
For v2 I'll implement exactly this, ie. a warning message and a default to 32.
I'll amend the device-tree description also to match the 32 (and not the 0 I
wrote earlier).
Cheers.
--
Robert
prev parent reply other threads:[~2016-02-15 18:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 21:23 [PATCH 0/4] Fix pxa dma requestor lines Robert Jarzmik
2016-02-11 21:23 ` [PATCH 1/4] dma: mmp_pdma: Add the #requestors DT property documentation Robert Jarzmik
[not found] ` <1455225798-9510-2-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
2016-02-11 21:59 ` Arnd Bergmann
2016-02-12 20:55 ` Robert Jarzmik
2016-02-11 21:23 ` [PATCH 2/4] dmaengine: mmp-pdma: add number of requestors Robert Jarzmik
2016-02-11 21:23 ` [PATCH 3/4] ARM: pxa: add the number of DMA requestor lines Robert Jarzmik
2016-02-11 21:23 ` [PATCH 4/4] dmaengine: pxa_dma: fix the maximum requestor line Robert Jarzmik
[not found] ` <1455225798-9510-5-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
2016-02-15 16:35 ` Vinod Koul
2016-02-15 17:24 ` Robert Jarzmik
[not found] ` <87fuwt28eu.fsf-4ty26DBLk+jEm7gnYqmdkQ@public.gmane.org>
2016-02-15 17:33 ` Vinod Koul
2016-02-15 18:22 ` Robert Jarzmik [this message]
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=87bn7h25qr.fsf@belgarion.home \
--to=robert.jarzmik@free.fr \
--cc=daniel@zonque.org \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=haojian.zhuang@gmail.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.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;
as well as URLs for NNTP newsgroup(s).