From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] ARM: kirkwood: Ensure that kirkwood_ge0[01]_init() finds its clock
Date: Wed, 30 Jan 2013 16:05:18 -0700 [thread overview]
Message-ID: <20130130230518.GA7395@obsidianresearch.com> (raw)
In-Reply-To: <20130130224300.GU7717@titan.lakedaemon.net>
On Wed, Jan 30, 2013 at 05:43:00PM -0500, Jason Cooper wrote:
> > On 01/29/2013 09:32 PM, Jason Cooper wrote:
> > >On Tue, Jan 29, 2013 at 09:08:46PM +0100, Sebastian Hesselbarth wrote:
> > >>Leaves Issue 3, gbe forgets about its MAC address when gated or powered
> > >>down. That should be done with local-mac-address passed by DT enabled
> > >>u-boot or any other (dirty) ATAG hack ;)
> > >
> > >A patch to mv643xx_eth to pull this from DT should solve this.
>
> Somewhere, Jason Gunthorpe shared his patch to do this. I'll poke
> around for it and try to get it merged in.
Yes, you asked for the doc update and I haven't had a moment to get a
tree setup for that..
Here are some words though:
- local-mac-address : Optional, the MAC address to assign to the
device. If not specified then the MAC address in the HW
registers is used, but the driver can not be made modular.
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index 7048d7c..2b2cfcb 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -2891,6 +2891,8 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
struct mv643xx_eth_private *mp;
struct net_device *dev;
struct resource *res;
+ const u8 *mac;
+ int len;
int err;
if (pdev->dev.of_node) {
@@ -2912,6 +2914,10 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
else
pd->phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT;
+ mac = of_get_property(pdev->dev.of_node, "local-mac-address", &len);
+ if (mac && len == 6)
+ memcpy(pd->mac_addr, mac, sizeof pd->mac_addr);
+
np = of_parse_phandle(pdev->dev.of_node, "mdio", 0);
if (np) {
pd->shared = of_find_device_by_node(np);
--
1.7.5.4
next prev parent reply other threads:[~2013-01-30 23:05 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-27 10:40 [PATCH v2 0/2] Do not gate ge0/1 and runit clocks on Kirkwood Simon Baatz
2013-01-27 10:40 ` [PATCH v2 1/2] ARM: kirkwood: Ensure that kirkwood_ge0[01]_init() finds its clock Simon Baatz
2013-01-27 10:52 ` Sebastian Hesselbarth
2013-01-27 11:08 ` Simon Baatz
2013-01-27 11:18 ` Sebastian Hesselbarth
2013-01-27 14:19 ` Sebastian Hesselbarth
2013-01-27 14:46 ` Jason Cooper
2013-01-27 14:53 ` Sebastian Hesselbarth
2013-01-27 15:24 ` Jason Cooper
2013-01-28 22:31 ` Simon Baatz
2013-01-29 0:48 ` Jason Cooper
2013-01-29 19:42 ` Simon Baatz
2013-01-29 20:08 ` Sebastian Hesselbarth
2013-01-29 20:32 ` Jason Cooper
2013-01-29 20:48 ` Sebastian Hesselbarth
2013-01-29 21:23 ` Jason Cooper
2013-01-30 22:43 ` Jason Cooper
2013-01-30 23:05 ` Jason Gunthorpe [this message]
2013-01-31 0:29 ` Jason Cooper
2013-01-31 0:39 ` Jason Gunthorpe
2013-01-30 0:03 ` Simon Baatz
2013-01-30 0:51 ` Sebastian Hesselbarth
2013-01-30 4:26 ` Jason Cooper
2013-01-30 8:30 ` Simon Baatz
2013-01-30 10:16 ` Sebastian Hesselbarth
2013-01-30 14:53 ` Simon Baatz
2013-01-30 23:01 ` Jason Cooper
2013-01-30 23:15 ` Jason Gunthorpe
2013-01-31 0:40 ` Jason Cooper
2013-01-30 23:22 ` Sebastian Hesselbarth
2013-01-31 0:32 ` Jason Cooper
2013-01-31 22:26 ` Simon Baatz
2013-01-31 22:44 ` Simon Baatz
2013-01-31 22:49 ` Sebastian Hesselbarth
2013-02-01 0:11 ` Jason Cooper
2013-02-01 0:01 ` Jason Cooper
2013-02-01 0:19 ` Jason Gunthorpe
2013-02-01 6:14 ` Andrew Lunn
2013-02-01 6:46 ` Jason Gunthorpe
2013-02-02 23:04 ` Simon Baatz
2013-02-03 16:45 ` Jason Cooper
2013-01-28 18:28 ` Jason Gunthorpe
2013-01-29 6:56 ` Andrew Lunn
2013-01-29 17:29 ` Jason Gunthorpe
2013-01-28 18:22 ` Jason Gunthorpe
2013-01-28 19:46 ` Jason Cooper
2013-01-29 19:54 ` Simon Baatz
2013-01-29 21:13 ` Jason Cooper
2013-01-28 20:26 ` Jason Cooper
2013-01-27 10:40 ` [PATCH v2 2/2] clk: mvebu: Do not gate runit clock on Kirkwood Simon Baatz
2013-01-27 10:55 ` Sebastian Hesselbarth
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=20130130230518.GA7395@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.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 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).