netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: "Jean-Christophe PLAGNIOL-VILLARD" <plagnioj@jcrosoft.com>
Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	devicetree-discuss@ozlabs.org,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Viresh Kumar <viresh.kumar@st.com>
Subject: Re: [PATCH] stmmac: Add device-tree support
Date: Mon, 12 Mar 2012 16:25:50 +0100	[thread overview]
Message-ID: <201203121625.50283.sr@denx.de> (raw)
In-Reply-To: <20120312143825.GB13869@game.jcrosoft.org>

On Monday 12 March 2012 15:38:25 Jean-Christophe PLAGNIOL-VILLARD wrote:
> > @@ -58,6 +94,22 @@ static int stmmac_pltfr_probe(struct platform_device
> > *pdev)
> > 
> >  		ret = -ENOMEM;
> >  		goto out_release_region;
> >  	
> >  	}
> > 
> > +
> > +#ifdef CONFIG_OF
> > +	plat_dat = devm_kzalloc(&pdev->dev, sizeof(struct
> > plat_stmmacenet_data), +				GFP_KERNEL);
> > +	if (!plat_dat) {
> > +		pr_err("%s: ERROR: no memory", __func__);
> > +		ret = -ENOMEM;
> > +		goto out_unmap;
> > +	}
> > +
> > +	ret = stmmac_probe_config_dt(pdev, plat_dat, &mac);
> > +	if (ret) {
> > +		pr_err("%s: main dt probe failed", __func__);
> > +		goto out_unmap;
> > +	}
> > +#else
> 
> This must be check at runtime, we can boot a kernel with or without DT.

Are you referring to using "if (pdev->dev.of_node)" to distinguish between DT 
and non-DT version instead of this #ifdef?

Thanks,
Stefan

  reply	other threads:[~2012-03-12 15:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-12 14:05 [PATCH] stmmac: Add device-tree support Stefan Roese
2012-03-12 14:34 ` Rob Herring
2012-03-12 15:06   ` Stefan Roese
2012-03-12 15:14     ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 15:30     ` Giuseppe CAVALLARO
2012-03-12 16:23       ` Stefan Roese
2012-03-12 16:46         ` Giuseppe CAVALLARO
2012-03-12 20:07           ` Rob Herring
2012-03-12 17:02       ` Jean-Christophe PLAGNIOL-VILLARD
     [not found] ` <1331561157-3820-1-git-send-email-sr-ynQEQJNshbs@public.gmane.org>
2012-03-12 14:38   ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 15:25     ` Stefan Roese [this message]
2012-03-12 15:17       ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-14 11:38     ` Giuseppe CAVALLARO
2012-03-14 13:07       ` Arnd Bergmann
2012-03-14 13:16         ` Giuseppe CAVALLARO
2012-03-14 13:37           ` Stefan Roese
2012-03-14 16:26       ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-15  8:45         ` Giuseppe CAVALLARO

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=201203121625.50283.sr@denx.de \
    --to=sr@denx.de \
    --cc=devicetree-discuss@ozlabs.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=plagnioj@jcrosoft.com \
    --cc=viresh.kumar@st.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).