All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Hershberger <joe.hershberger@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 01/11] net: dw: Add read_rom_hwaddr net_op hook
Date: Tue, 29 Nov 2016 15:24:43 -0600	[thread overview]
Message-ID: <CANr=Z=YbPuyzaYNzvdB673_3VCdsA3J2QZRHEMCb4_j51TX06A@mail.gmail.com> (raw)
In-Reply-To: <CAPnjgZ2UQU0Cbf8Z89MA7vovvtyi6V31KUCHj+GwoVyn4V748Q@mail.gmail.com>

Hi Simon,

On Thu, Nov 17, 2016 at 7:13 PM, Simon Glass <sjg@chromium.org> wrote:
> Hi Oliver,
>
> On 8 November 2016 at 08:54, Olliver Schinagl <oliver@schinagl.nl> wrote:
>> Add the read_rom_hwaddr net_op hook so that it can be called from boards
>> to read the mac from a ROM chip.
>>
>> Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
>> ---
>>  drivers/net/designware.c | 18 ++++++++++++++++++
>>  1 file changed, 18 insertions(+)
>>
>> diff --git a/drivers/net/designware.c b/drivers/net/designware.c
>> index 9e6d726..aa87f30 100644
>> --- a/drivers/net/designware.c
>> +++ b/drivers/net/designware.c
>> @@ -230,6 +230,23 @@ static int _dw_write_hwaddr(struct dw_eth_dev *priv, u8 *mac_id)
>>         return 0;
>>  }
>>
>> +__weak int dw_board_read_rom_hwaddr(unsigned char *enetaddr)
>> +{
>> +       return -ENOSYS;
>> +}
>
> Instead of a weak function I think this should use driver model, with
> a driver supplied by the board to read this value. It should be
> possible to supply the 'hardware-address reading' device to any
> Ethernet driver, not just dwmmc.

How do we reconcile something like that with the concern of using the
device tree for boards using only Linux bindings, and sharing the
device tree with Linux? Linux probably doesn't care about this and so
won't have a binding for defining this relationship. This is a fairly
generic question. Where have we landed on this?

Thanks,
-Joe

  reply	other threads:[~2016-11-29 21:24 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <[PATCH v2 0/5] Retrieve MAC address from EEPROM>
2016-11-08 15:54 ` [U-Boot] [PATCH v3] Retrieve MAC address from EEPROM Olliver Schinagl
2016-11-08 15:54   ` [U-Boot] [PATCH 01/11] net: dw: Add read_rom_hwaddr net_op hook Olliver Schinagl
2016-11-15  2:55     ` Joe Hershberger
2016-11-18  1:13     ` Simon Glass
2016-11-29 21:24       ` Joe Hershberger [this message]
2016-11-29 21:40         ` Simon Glass
2016-11-29 22:23           ` Joe Hershberger
2016-11-08 15:54   ` [U-Boot] [PATCH 02/11] net: sunxi-emac: Write HW address via function Olliver Schinagl
2016-11-15  2:57     ` Joe Hershberger
2016-11-08 15:54   ` [U-Boot] [PATCH 03/11] net: sunxi-emac: Add write_hwaddr net_op hook Olliver Schinagl
2016-11-15  2:57     ` Joe Hershberger
2016-11-08 15:54   ` [U-Boot] [PATCH 04/11] net: sunxi-emac: Add read_rom_hwaddr " Olliver Schinagl
2016-11-15  3:16     ` Joe Hershberger
2016-11-08 15:54   ` [U-Boot] [PATCH 05/11] net: Add ability to set MAC address via EEPROM to Kconfig Olliver Schinagl
2016-11-08 15:54   ` [U-Boot] [PATCH 06/11] arm: sunxi: Use read_rom_hwaddr() to obtain MAC address Olliver Schinagl
2016-11-15  3:21     ` Joe Hershberger
2016-11-08 15:54   ` [U-Boot] [PATCH 07/11] net: sunxi: Do not inject ethernet addresses into the env Olliver Schinagl
2016-11-15  3:25     ` Joe Hershberger
2016-11-15  9:26       ` Hans de Goede
2016-11-15 10:17         ` Olliver Schinagl
2016-11-15 10:27           ` Hans de Goede
2016-11-15 10:35             ` Olliver Schinagl
2016-11-15 10:29           ` Olliver Schinagl
2016-11-15 10:49             ` Hans de Goede
2016-11-15 11:58               ` Olliver Schinagl
2016-11-08 15:54   ` [U-Boot] [PATCH 08/11] net: sunxi: Allow sunxi boards to set the MAC from an EEPROM Olliver Schinagl
2016-11-10 11:51     ` Michal Simek
2016-11-10 12:11       ` Olliver Schinagl
2016-11-15  3:27         ` Joe Hershberger
2016-11-15  7:22           ` Michal Simek
2016-11-15  8:05             ` Olliver Schinagl
2016-11-08 15:54   ` [U-Boot] [PATCH 09/11] net: sunxi: Enable eeprom on OLinuXino Lime boards Olliver Schinagl
2016-11-08 15:54   ` [U-Boot] [PATCH 10/11] tools: Allow crc8 to be used Olliver Schinagl
2016-11-11 16:17     ` Simon Glass
2016-11-08 15:54   ` [U-Boot] [PATCH 11/11] tools: Add tool to add crc8 to a mac address Olliver Schinagl
2016-11-11 16:18     ` Simon Glass
2016-11-15  3:31       ` Joe Hershberger
2016-11-15  8:10         ` Olliver Schinagl
2016-11-15  9:59       ` Olliver Schinagl
2016-11-10 11:37   ` [U-Boot] [PATCH v3] Retrieve MAC address from EEPROM Michal Simek
2016-11-10 12:08     ` Olliver Schinagl
2016-11-10 12:26       ` Michal Simek
2016-11-10 12:31         ` Olliver Schinagl
2016-11-10 12:37           ` Michal Simek
2016-11-10 12:43             ` Olliver Schinagl
2016-11-10 13:24               ` Michal Simek

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='CANr=Z=YbPuyzaYNzvdB673_3VCdsA3J2QZRHEMCb4_j51TX06A@mail.gmail.com' \
    --to=joe.hershberger@gmail.com \
    --cc=u-boot@lists.denx.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 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.