All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kernel@stlinux.com,
	maxime.coquelin@st.com, ohad@wizery.com,
	linux-remoteproc@vger.kernel.org,
	Ludovic Barre <ludovic.barre@st.com>
Subject: Re: [PATCH 2/5] remoteproc: core: Add rproc OF look-up functions
Date: Thu, 14 Jul 2016 07:53:08 +0100	[thread overview]
Message-ID: <20160714065308.GA10504@dell> (raw)
In-Reply-To: <20160713191134.GL23833@tuxbot>

On Wed, 13 Jul 2016, Bjorn Andersson wrote:

> On Thu 05 May 06:29 PDT 2016, Lee Jones wrote:
> 
> Lee,
> 
> I ran into this topic again while looking into some unrelated things.
> 
> > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
> > +struct rproc *of_rproc_byindex(struct device_node *np, int index)
> > +{
> > +	struct rproc *rproc;
> > +	struct device_node *rproc_node;
> > +	struct platform_device *pdev;
> > +	struct klist_iter i;
> > +
> > +	if (index < 0)
> > +		return ERR_PTR(-EINVAL);
> > +
> > +	rproc_node = of_parse_phandle(np, "rprocs", index);
> > +	if (!rproc_node)
> 
> As I stated before I would like for you to use the existing rproc_list,
> as done in rproc_get_by_phandle() today.
> 
> But as you resend this patch, could you please make this check fallback
> to also checking for "ti,rproc", then simply drop the existing
> rproc_get_by_phandle() and change the call to
> of_rproc_byindex(dev->of_node, 0) in wkup_m3_ipc.c?
> 
> That way we're backwards compatible with the TI wakeup M3, without
> having to maintain the then non-standard generic rproc phandle resolver.

I started working on this yesterday.  Should be with you soon.

> > +		return ERR_PTR(-ENODEV);
> > +
> > +	pdev = of_find_device_by_node(rproc_node);
> > +	if (!pdev)
> > +		return ERR_PTR(-ENODEV);
> > +
> > +	klist_iter_init(&rprocs, &i);
> > +	while ((rproc = next_rproc(&i)) != NULL)
> > +		if (rproc->dev.parent == &pdev->dev)
> > +			break;
> > +	klist_iter_exit(&i);
> > +
> > +	return rproc;
> > +}
> > +EXPORT_SYMBOL(of_rproc_byindex);
> 
> Regards,
> Bjorn

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

WARNING: multiple messages have this Message-ID (diff)
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/5] remoteproc: core: Add rproc OF look-up functions
Date: Thu, 14 Jul 2016 07:53:08 +0100	[thread overview]
Message-ID: <20160714065308.GA10504@dell> (raw)
In-Reply-To: <20160713191134.GL23833@tuxbot>

On Wed, 13 Jul 2016, Bjorn Andersson wrote:

> On Thu 05 May 06:29 PDT 2016, Lee Jones wrote:
> 
> Lee,
> 
> I ran into this topic again while looking into some unrelated things.
> 
> > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
> > +struct rproc *of_rproc_byindex(struct device_node *np, int index)
> > +{
> > +	struct rproc *rproc;
> > +	struct device_node *rproc_node;
> > +	struct platform_device *pdev;
> > +	struct klist_iter i;
> > +
> > +	if (index < 0)
> > +		return ERR_PTR(-EINVAL);
> > +
> > +	rproc_node = of_parse_phandle(np, "rprocs", index);
> > +	if (!rproc_node)
> 
> As I stated before I would like for you to use the existing rproc_list,
> as done in rproc_get_by_phandle() today.
> 
> But as you resend this patch, could you please make this check fallback
> to also checking for "ti,rproc", then simply drop the existing
> rproc_get_by_phandle() and change the call to
> of_rproc_byindex(dev->of_node, 0) in wkup_m3_ipc.c?
> 
> That way we're backwards compatible with the TI wakeup M3, without
> having to maintain the then non-standard generic rproc phandle resolver.

I started working on this yesterday.  Should be with you soon.

> > +		return ERR_PTR(-ENODEV);
> > +
> > +	pdev = of_find_device_by_node(rproc_node);
> > +	if (!pdev)
> > +		return ERR_PTR(-ENODEV);
> > +
> > +	klist_iter_init(&rprocs, &i);
> > +	while ((rproc = next_rproc(&i)) != NULL)
> > +		if (rproc->dev.parent == &pdev->dev)
> > +			break;
> > +	klist_iter_exit(&i);
> > +
> > +	return rproc;
> > +}
> > +EXPORT_SYMBOL(of_rproc_byindex);
> 
> Regards,
> Bjorn

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2016-07-14  6:53 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-05 13:29 [PATCH 0/5] remoteproc: A few important improvements Lee Jones
2016-05-05 13:29 ` Lee Jones
2016-05-05 13:29 ` [PATCH 1/5] remoteproc: core: Task sync during rproc_fw_boot() Lee Jones
2016-05-05 13:29   ` Lee Jones
2016-05-06 18:44   ` Bjorn Andersson
2016-05-06 18:44     ` Bjorn Andersson
2016-05-05 13:29 ` [PATCH 2/5] remoteproc: core: Add rproc OF look-up functions Lee Jones
2016-05-05 13:29   ` Lee Jones
2016-05-06 18:48   ` Bjorn Andersson
2016-05-06 18:48     ` Bjorn Andersson
2016-05-10 14:16     ` Lee Jones
2016-05-10 14:16       ` Lee Jones
2016-05-10 18:48       ` Bjorn Andersson
2016-05-10 18:48         ` Bjorn Andersson
2016-07-13 19:11   ` Bjorn Andersson
2016-07-13 19:11     ` Bjorn Andersson
2016-07-14  6:53     ` Lee Jones [this message]
2016-07-14  6:53       ` Lee Jones
2016-05-05 13:29 ` [PATCH 3/5] remoteproc: core: Add ability to select a firmware from the client Lee Jones
2016-05-05 13:29   ` Lee Jones
2016-05-06 18:59   ` Bjorn Andersson
2016-05-06 18:59     ` Bjorn Andersson
2016-05-10 13:02     ` Lee Jones
2016-05-10 13:02       ` Lee Jones
2016-05-05 13:29 ` [PATCH 4/5] remoteproc: core: Supply framework to request, declare and fetch shared memory Lee Jones
2016-05-05 13:29   ` Lee Jones
2016-05-11 22:30   ` Bjorn Andersson
2016-05-11 22:30     ` Bjorn Andersson
2016-06-15 22:06   ` Bjorn Andersson
2016-06-15 22:06     ` Bjorn Andersson
2016-06-21  7:33     ` [STLinux Kernel] " loic pallardy
2016-06-21  7:33       ` loic pallardy
2016-06-21  7:33       ` loic pallardy
2016-06-22 16:21       ` Bjorn Andersson
2016-06-22 16:21         ` Bjorn Andersson
2016-05-05 13:29 ` [PATCH 5/5] remoteproc: core: Clip carveout if it's too big Lee Jones
2016-05-05 13:29   ` Lee Jones
2016-05-10 19:21   ` Bjorn Andersson
2016-05-10 19:21     ` Bjorn Andersson
2016-06-17 19:53     ` [STLinux Kernel] " loic pallardy
2016-06-17 19:53       ` loic pallardy
2016-06-17 19:53       ` loic pallardy

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=20160714065308.GA10504@dell \
    --to=lee.jones@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=kernel@stlinux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=ludovic.barre@st.com \
    --cc=maxime.coquelin@st.com \
    --cc=ohad@wizery.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 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.