devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Markus Pargmann <mpa@pengutronix.de>
To: Tony Lindgren <tony@atomide.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Wolfram Sang" <wsa@the-dreams.de>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Mugunthan V N" <mugunthanvnm@ti.com>,
	linux-omap@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de
Subject: Re: [PATCH v6 5/7] net: cpsw: Add am33xx MACID readout
Date: Tue, 9 Sep 2014 08:05:22 +0200	[thread overview]
Message-ID: <20140909060522.GD24081@pengutronix.de> (raw)
In-Reply-To: <20140908165116.GH3238@atomide.com>

[-- Attachment #1: Type: text/plain, Size: 2050 bytes --]

On Mon, Sep 08, 2014 at 09:51:17AM -0700, Tony Lindgren wrote:
> * Markus Pargmann <mpa@pengutronix.de> [140907 10:20]:
> > This patch adds a function to get the MACIDs from the am33xx SoC
> > control module registers which hold unique vendor MACIDs. This is only
> > used if of_get_mac_address() fails to get a valid mac address.
> ...
> 
> > @@ -1928,8 +1960,16 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
> >  			 PHY_ID_FMT, mdio->name, phyid);
> >  
> >  		mac_addr = of_get_mac_address(slave_node);
> > -		if (mac_addr)
> > +		if (mac_addr) {
> >  			memcpy(slave_data->mac_addr, mac_addr, ETH_ALEN);
> > +		} else {
> > +			if (of_machine_is_compatible("ti,am33xx")) {
> > +				ret = cpsw_am33xx_cm_get_macid(&pdev->dev, i,
> > +							slave_data->mac_addr);
> > +				if (ret)
> > +					return ret;
> > +			}
> > +		}
> >  
> >  		slave_data->phy_if = of_get_phy_mode(slave_node);
> >  		if (slave_data->phy_if < 0) {
> 
> Thanks for updating this, this looks more future proof for adding
> the dra7 related patch.
> 
> For the long run, it probably makes sense to add SoC specific
> compatible values such as "ti,cpsw-am3350" and so on. Then the
> mac address functions can be initialized based on the of_device_id
> entry for .data. The wiring is cleary SoC specific here.

The hardware doesn't differ across the SoCs, so I thought it may be
better to keep one compatible and parse the machine compatible for the
MACID location. But different compatible values are also ok.

> 
> So for the purpose of this series, I'm fine with this series,
> please feel free to add for this patch:
> 
> Acked-by: Tony Lindgren <tony@atomide.com>

Thanks.

Best regards,

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2014-09-09  6:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-07 17:19 [PATCH v6 0/7] DT doc: net: cpsw mac-address is optional Markus Pargmann
2014-09-07 17:19 ` [PATCH v6 1/7] " Markus Pargmann
2014-09-07 17:19 ` [PATCH v6 2/7] net: cpsw: Add missing return value Markus Pargmann
2014-09-07 17:19 ` [PATCH v6 3/7] net: cpsw: header, Add missing include Markus Pargmann
2014-09-07 17:19 ` [PATCH v6 4/7] net: cpsw: Replace pr_err by dev_err Markus Pargmann
2014-09-07 17:19 ` [PATCH v6 5/7] net: cpsw: Add am33xx MACID readout Markus Pargmann
2014-09-08 16:51   ` Tony Lindgren
2014-09-09  6:05     ` Markus Pargmann [this message]
2014-09-09 14:48       ` Tony Lindgren
2014-09-07 17:19 ` [PATCH v6 6/7] am33xx: define syscon control module device node Markus Pargmann
2014-09-07 17:19 ` [PATCH v6 7/7] arm: dts: am33xx, Add syscon phandle to cpsw node Markus Pargmann

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=20140909060522.GD24081@pengutronix.de \
    --to=mpa@pengutronix.de \
    --cc=bcousson@baylibre.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mugunthanvnm@ti.com \
    --cc=rostedt@goodmis.org \
    --cc=tony@atomide.com \
    --cc=wsa@the-dreams.de \
    /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).