From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
barebox@lists.infradead.org, Jason Cooper <jason@lakedaemon.net>,
Willy Tarreau <w@1wt.eu>
Subject: Re: [PATCH 5/6] net: Add driver for Armada 370/XP 10/100/1000 Mbps network controller
Date: Thu, 31 Jul 2014 10:43:39 -0300 [thread overview]
Message-ID: <20140731134339.GA2865@arch.cereza> (raw)
In-Reply-To: <20140731054237.GP23235@pengutronix.de>
On 31 Jul 07:42 AM, Sascha Hauer wrote:
> On Tue, Jul 29, 2014 at 05:45:00PM -0300, Ezequiel Garcia wrote:
> > +
> > +static int mvneta_probe(struct device_d *dev)
> > +{
> > + struct mvneta_port *priv;
> > + int ret;
> > +
> > + priv = xzalloc(sizeof(*priv));
> > +
> > + priv->reg = dev_get_mem_region(dev, 0);
>
> Any special reason to use dev_get_mem_region() here? Normally you should
> use dev_request_mem_region() which allocates the resource for exclusive
> use. dev_get_mem_region() should only be used in very special cases.
>
Yes, there's a reason for it. The ethernet unit on these SoCs have a register
for the MDIO. Since it's the same for Kirkwood, Armada 370/XP and Armada 375,
the MDIO is handled by a different driver (mvmdio), so it can be shared among
the ethernet drivers.
This comes with a little price, though: we can't request the region on either
mvmdio or the ethernet driver, for the former is within the latter.
> Please check the return value.
>
Sure, I will.
--
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2014-07-31 13:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 20:44 [PATCH 0/6] Add network support for Armada 370/XP Ezequiel Garcia
2014-07-29 20:44 ` [PATCH 1/6] net: phy: Add fallbacks for the obsoletes phy DT properties Ezequiel Garcia
2014-07-29 20:44 ` [PATCH 2/6] net: phy: mdio-mvebu: Make the clock property required Ezequiel Garcia
2014-07-29 20:44 ` [PATCH 3/6] net: phy: Add minimal support for QSGMII PHY Ezequiel Garcia
2014-07-29 20:44 ` [PATCH 4/6] net: phy: Support Marvell 88EE1545 PHY Ezequiel Garcia
2014-07-29 21:37 ` Ezequiel Garcia
2014-07-31 17:25 ` Sebastian Hesselbarth
2014-08-02 17:40 ` Ezequiel Garcia
2014-08-02 17:48 ` Sebastian Hesselbarth
2014-08-02 20:33 ` Ezequiel Garcia
2014-07-29 20:45 ` [PATCH 5/6] net: Add driver for Armada 370/XP 10/100/1000 Mbps network controller Ezequiel Garcia
2014-07-31 5:42 ` Sascha Hauer
2014-07-31 13:43 ` Ezequiel Garcia [this message]
2014-07-29 20:45 ` [PATCH 6/6] configs: Add network options to Armada 370/XP boards Ezequiel Garcia
2014-07-31 5:49 ` [PATCH 0/6] Add network support for Armada 370/XP Sascha Hauer
2014-08-02 17:41 ` Ezequiel Garcia
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=20140731134339.GA2865@arch.cereza \
--to=ezequiel.garcia@free-electrons.com \
--cc=barebox@lists.infradead.org \
--cc=jason@lakedaemon.net \
--cc=s.hauer@pengutronix.de \
--cc=thomas.petazzoni@free-electrons.com \
--cc=w@1wt.eu \
/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