devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Suman Anna <s-anna@ti.com>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	devicetree@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	linux-kernel@vger.kernel.org, "Andrew F. Davis" <afd@ti.com>,
	Rob Herring <robh+dt@kernel.org>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	Sam Nelson <sam.nelson@ti.com>
Subject: Re: [PATCH v3 2/3] remoteproc/keystone: Add a remoteproc driver for Keystone 2 DSPs
Date: Mon, 26 Jun 2017 15:20:55 -0500	[thread overview]
Message-ID: <1f8d65fc-0acc-499e-a98e-953dce60750f@ti.com> (raw)
In-Reply-To: <20170626200608.GG18666@tuxbook>

On 06/26/2017 03:06 PM, Bjorn Andersson wrote:
> On Mon 26 Jun 08:54 PDT 2017, Suman Anna wrote:
> 
>> Hi Bjorn,
>>
>> On 06/25/2017 03:15 PM, Bjorn Andersson wrote:
>>> On Tue 13 Jun 16:45 PDT 2017, Suman Anna wrote:
>>>
>>>> +static int keystone_rproc_start(struct rproc *rproc)
>>>> +{
>>>> +	struct keystone_rproc *ksproc = rproc->priv;
>>>> +	int ret;
>>>> +
>>>> +	INIT_WORK(&ksproc->workqueue, handle_event);
>>>> +
>>>> +	ret = request_irq(ksproc->irq_ring, keystone_rproc_vring_interrupt, 0,
>>>> +			  dev_name(ksproc->dev), ksproc);
>>>> +	if (ret) {
>>>> +		dev_err(ksproc->dev, "failed to enable vring interrupt, ret = %d\n",
>>>> +			ret);
>>>> +		goto out;
>>>> +	}
>>>> +
>>>> +	ret = request_irq(ksproc->irq_fault, keystone_rproc_exception_interrupt,
>>>> +			  0, dev_name(ksproc->dev), ksproc);
>>>> +	if (ret) {
>>>> +		dev_err(ksproc->dev, "failed to enable exception interrupt, ret = %d\n",
>>>> +			ret);
>>>> +		goto free_vring_irq;
>>>> +	}
>>>
>>> I do prefer that your request any resources during probe() and
>>> potentially enable/disable them here. If below concern about using a
>>> GPIO driver is cleared already I'll take it as is though.
>>>
>>> [..]
>>>> +static void keystone_rproc_kick(struct rproc *rproc, int vqid)
>>>> +{
>>>> +	struct keystone_rproc *ksproc = rproc->priv;
>>>> +
>>>> +	if (WARN_ON(ksproc->kick_gpio < 0))
>>>> +		return;
>>>> +
>>>> +	gpio_set_value(ksproc->kick_gpio, 1);
>>>> +}
>>>> +
>>>
>>> This doesn't sound like a gpio-controller and the GPIO maintainer did
>>> reject an attempt by me to use the GPIO framework to abstract a similar
>>> thing. Do you already have this driver upstream or have you clarified
>>> with the maintainer that the GPIO framework is an acceptable abstraction
>>> for this?
>>
>> Yeah, this has been upstream since quite some time. See commit
>> 2134cb997f2f ("gpio: syscon: reuse for keystone 2 socs").
>>
> 
> Okay, sounds good. I have merged the series.
> 
> 
> I still would like to have resources allocated at probe() time, so I
> would appreciate a follow up patch moving the request_irq()s to probe,
> per above comment (but we can take that after v4.13).

OK thanks. This is a common theme across all the remoteproc drivers
supporting rpmsg, and I definitely need to disable them in probe since
the boot or the virtio/rpmsg devices are not guaranteed to be present in
the probe.

regards
Suman

  reply	other threads:[~2017-06-26 20:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-13 23:45 [PATCH v3 0/3] Add Keystone2 Remoteproc driver Suman Anna
     [not found] ` <20170613234513.7624-1-s-anna-l0cyMroinI0@public.gmane.org>
2017-06-13 23:45   ` [PATCH v3 1/3] dt-bindings: remoteproc: Add Keystone DSP remoteproc binding Suman Anna
2017-06-23 21:31   ` [PATCH v3 0/3] Add Keystone2 Remoteproc driver Suman Anna
2017-06-13 23:45 ` [PATCH v3 2/3] remoteproc/keystone: Add a remoteproc driver for Keystone 2 DSPs Suman Anna
     [not found]   ` <20170613234513.7624-3-s-anna-l0cyMroinI0@public.gmane.org>
2017-06-25 20:15     ` Bjorn Andersson
2017-06-26 15:54       ` Suman Anna
     [not found]         ` <1ccd9273-0fde-4241-6d99-1d03be2f5b57-l0cyMroinI0@public.gmane.org>
2017-06-26 20:06           ` Bjorn Andersson
2017-06-26 20:20             ` Suman Anna [this message]
     [not found]               ` <1f8d65fc-0acc-499e-a98e-953dce60750f-l0cyMroinI0@public.gmane.org>
2017-06-26 21:19                 ` Bjorn Andersson
2022-09-06  3:55         ` Dmitry Torokhov
2017-06-13 23:45 ` [PATCH v3 3/3] remoteproc/keystone: Ensure the DSPs are in reset in probe Suman Anna

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=1f8d65fc-0acc-499e-a98e-953dce60750f@ti.com \
    --to=s-anna@ti.com \
    --cc=afd@ti.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=grygorii.strashko@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=ohad@wizery.com \
    --cc=robh+dt@kernel.org \
    --cc=sam.nelson@ti.com \
    --cc=ssantosh@kernel.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 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).