From: plagnioj@jcrosoft.com (Jean-Christophe PLAGNIOL-VILLARD)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] stmmac: Add device-tree support
Date: Mon, 12 Mar 2012 16:17:02 +0100 [thread overview]
Message-ID: <20120312151702.GD13869@game.jcrosoft.org> (raw)
In-Reply-To: <201203121625.50283.sr@denx.de>
On 16:25 Mon 12 Mar , Stefan Roese wrote:
> 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?
yes
Best Regards,
J.
WARNING: multiple messages have this Message-ID (diff)
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Stefan Roese <sr@denx.de>
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:17:02 +0100 [thread overview]
Message-ID: <20120312151702.GD13869@game.jcrosoft.org> (raw)
In-Reply-To: <201203121625.50283.sr@denx.de>
On 16:25 Mon 12 Mar , Stefan Roese wrote:
> 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?
yes
Best Regards,
J.
next prev parent reply other threads:[~2012-03-12 15:17 UTC|newest]
Thread overview: 36+ 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:05 ` Stefan Roese
2012-03-12 14:34 ` Rob Herring
2012-03-12 14:34 ` Rob Herring
2012-03-12 15:06 ` Stefan Roese
2012-03-12 15:06 ` Stefan Roese
2012-03-12 15:14 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 15:14 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 15:30 ` Giuseppe CAVALLARO
2012-03-12 15:30 ` Giuseppe CAVALLARO
2012-03-12 16:23 ` Stefan Roese
2012-03-12 16:23 ` Stefan Roese
2012-03-12 16:46 ` Giuseppe CAVALLARO
2012-03-12 16:46 ` Giuseppe CAVALLARO
2012-03-12 20:07 ` Rob Herring
2012-03-12 20:07 ` Rob Herring
2012-03-12 17:02 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 17:02 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 14:38 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 14:38 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 15:25 ` Stefan Roese
2012-03-12 15:25 ` Stefan Roese
2012-03-12 15:17 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-03-12 15:17 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-14 11:38 ` Giuseppe CAVALLARO
2012-03-14 11:38 ` Giuseppe CAVALLARO
2012-03-14 13:07 ` Arnd Bergmann
2012-03-14 13:07 ` Arnd Bergmann
2012-03-14 13:16 ` Giuseppe CAVALLARO
2012-03-14 13:16 ` Giuseppe CAVALLARO
2012-03-14 13:37 ` Stefan Roese
2012-03-14 13:37 ` Stefan Roese
2012-03-14 16:26 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-14 16:26 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-15 8:45 ` Giuseppe CAVALLARO
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=20120312151702.GD13869@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=linux-arm-kernel@lists.infradead.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 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.