linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] clk: kirkwood: Add CLK_IGNORE_UNUSED to ethernet ge0 and ge1 clocks
Date: Tue, 1 Oct 2013 10:45:56 -0600	[thread overview]
Message-ID: <20131001164556.GA23874@obsidianresearch.com> (raw)
In-Reply-To: <524ADFAA.40805@gmail.com>

On Tue, Oct 01, 2013 at 04:43:54PM +0200, Sebastian Hesselbarth wrote:

> The local-mac-address property is a placeholder for the real mac
> address. Also, mv643xx_eth calls of_get_mac_address which fails for
> the invalid local-mac-address value of [00 00 00 00 00 00].
> 
> If you manage to setup local-mac-address in your bootloader, everything
> should be fine. 

FWIW, my environment is like this, and it works fine (this is recent,
3.10 didn't work). The driver now properly sets the MAC from the DT.

The driver will also need an update to call of_get_phy_mode and set
the interface properly, and the board files will need update to
specify the phy-mode property. I'm guessing things are working for
most people because the POR value happens to match the board?

> If we have a DT fixup that takes care of the above for non-DT
> bootloaders, everything should be fine.

Exactly, the problem is a broken DT on input to the kernel, the proper
action, IMHO, is to correct the DT in the kernel, so the hacking is
contained. Similar to how pci-fixups.c centralizes fixing of broken
firmware for PCI, and how CONFIG_ARM_ATAG_DTB_COMPAT centralizes it
for ATAG conversion.

BTW, why doesn't CONFIG_ARM_ATAG_DTB_COMPAT fix this? Do the boot
loaders on these systems not pass the mac at all??

> I still prefer Jason's approach and would give it a try on LAKML and
> devtree ML: Backup register contents if of_get_mac_address does not
> contain a valid address, and gate clocks.

FWIW, I would not use the language of 'backup' - this is a fixup
correcting an unsupported input DT.

IMHO, when this code triggers it should also:

printk(KERN_ERROR FW_BUG "local-mac-address is not set");

Jason

  reply	other threads:[~2013-10-01 16:45 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-30 21:03 [PATCH 0/4] Kirkwood: minor cleanups Ezequiel Garcia
2013-09-30 21:03 ` [PATCH 1/4] ARM: kirkwood: Remove unneeded MBus initialization Ezequiel Garcia
2013-10-08 16:19   ` Jason Cooper
2013-09-30 21:03 ` [PATCH 2/4] ARM: kirkwood: Remove unneeded PCIe clock adding Ezequiel Garcia
2013-10-01 16:01   ` Ezequiel Garcia
2013-10-01 17:45     ` Jason Gunthorpe
2013-10-01 19:20     ` Arnaud Ebalard
2013-10-08 16:22   ` Jason Cooper
2013-09-30 21:03 ` [PATCH 3/4] clk: kirkwood: Add CLK_IGNORE_UNUSED to ethernet ge0 and ge1 clocks Ezequiel Garcia
2013-09-30 21:31   ` Jason Gunthorpe
2013-09-30 21:34     ` Andrew Lunn
2013-09-30 21:44       ` Jason Gunthorpe
2013-10-01 14:35     ` Jason Cooper
2013-10-01  0:40   ` Jason Cooper
2013-10-01 13:42     ` Ezequiel Garcia
2013-10-01 13:49       ` Sebastian Hesselbarth
2013-10-01 14:22         ` Ezequiel Garcia
2013-10-01 14:43           ` Sebastian Hesselbarth
2013-10-01 16:45             ` Jason Gunthorpe [this message]
2013-10-01 16:49               ` Jason Cooper
2013-10-01 19:10               ` Sebastian Hesselbarth
2013-10-01 19:15                 ` Sebastian Hesselbarth
2013-10-02 12:02                 ` Jason Cooper
2013-10-02 12:05                   ` Sebastian Hesselbarth
2013-10-01 13:58       ` Jason Cooper
2013-10-01 14:17         ` Ezequiel Garcia
2013-10-01 15:01           ` Jason Cooper
2013-10-01 15:09             ` Thomas Petazzoni
2013-10-01 15:15               ` Jason Cooper
2013-10-01 15:33                 ` Thomas Petazzoni
2013-10-01 15:36                   ` Jason Cooper
2013-10-01 15:42                     ` Thomas Petazzoni
2013-10-01 15:53                       ` Jason Cooper
2013-10-01 15:59                         ` Sebastian Hesselbarth
2013-10-08 16:24   ` Jason Cooper
2013-09-30 21:03 ` [PATCH 4/4] ARM: kirkwood: Remove redundant ethernet clock enable Ezequiel Garcia
2013-09-30 21:16 ` [PATCH 0/4] Kirkwood: minor cleanups Andrew Lunn
2013-09-30 21:26   ` 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=20131001164556.GA23874@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).