devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
To: Simon Horman <horms@verge.net.au>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	netdev@vger.kernel.org, magnus.damm@gmail.com,
	devicetree-discuss@lists.ozlabs.org, kda@linux-powerpc.org
Subject: Re: [PATCHi v2] net: sh_eth: Add support of device tree probe
Date: Wed, 27 Feb 2013 09:39:15 +0900	[thread overview]
Message-ID: <512D55B3.3070707@renesas.com> (raw)
In-Reply-To: <20130222184918.GC31345@verge.net.au>

Hi, Simon.

This does not apply yet to upstream.
I will send a patch without of_device_is_available function.

Best regards,
   Nobuhiro

(2013/02/23 3:49), Simon Horman wrote:
> On Thu, Feb 14, 2013 at 11:56:57AM +0900, Nobuhiro Iwamatsu wrote:
>> (2013/02/14 10:24), Kuninori Morimoto wrote:
>>>
>>> Hi Iwamatsu-san
>>>
>>> Thank you for this patch.
>>>
>>> Small comment from me
>>>
>>>> +#ifdef CONFIG_OF
>>> (snip)
>>>> +sh_eth_parse_dt(struct device *dev, struct net_device *ndev)
>>>> +{
>>>> +	int ret;
>>>> +	struct device_node *np = dev->of_node;
>>>> +	struct sh_eth_plat_data *pdata;
>>> ...
>>>> +#else
>>>> +static struct sh_eth_plat_data *
>>>> +sh_eth_parse_dt(struct device *dev, struct net_device *ndev)
>>>> +{
>>>> +	return NULL;
>>>> +}
>>>> +#endif
>>>
>>> (snip)
>>>
>>>>   static int sh_eth_drv_probe(struct platform_device *pdev)
>>>>   {
>>> ...
>>>> +#ifdef CONFIG_OF
>>>> +	if (np&&   of_device_is_available(np)) {
>>>> +		pd = sh_eth_parse_dt(&pdev->dev, ndev);
>>>> +		if (pdev->dev.platform_data) {
>>>> +			struct sh_eth_plat_data *tmp =
>>>> +				pdev->dev.platform_data;
>>>> +			pd->set_mdio_gate = tmp->set_mdio_gate;
>>>> +			pd->needs_init = tmp->needs_init;
>>>> +		}
>>>> +	} else
>>>> +#endif
>>>
>>> sh_eth_parse_dt() was defined for both CONFIG_OF and !CONFIG_OF.
>>> But it is called only from CONFIG_OF ?
>>>
>>
>> Because of_device_is_available needs CONFIG_OF.
>> I already send a patch which add empty function of of_device_is_available.
>> If this was apply, this ifdef becomes without need.
>
> Hi Iwamatsu-san,
>
> could you let me know of the status of that patch?
> Has it been queued-up or merged? If so, where and when?
>
>

  reply	other threads:[~2013-02-27  0:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-14  0:51 [PATCHi v2] net: sh_eth: Add support of device tree probe Nobuhiro Iwamatsu
2013-02-14  1:24 ` Kuninori Morimoto
2013-02-14  2:56   ` Nobuhiro Iwamatsu
2013-02-22 18:49     ` Simon Horman
2013-02-27  0:39       ` Nobuhiro Iwamatsu [this message]
2013-03-04  8:05     ` Grant Likely
2013-03-04 21:37       ` Nobuhiro Iwamatsu
2013-02-14 23:07   ` Nobuhiro Iwamatsu
2013-02-14  1:47 ` Magnus Damm
2013-02-14  3:18   ` Nobuhiro Iwamatsu
2013-02-15 16:32 ` Mark Rutland
2013-03-05  0:43   ` Simon Horman
2013-03-18  0:53   ` Nobuhiro Iwamatsu

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=512D55B3.3070707@renesas.com \
    --to=nobuhiro.iwamatsu.yj@renesas.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=horms@verge.net.au \
    --cc=kda@linux-powerpc.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=magnus.damm@gmail.com \
    --cc=netdev@vger.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).