public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/7] fec_imx27: driver for FEC ethernet controller on i.MX27
Date: Mon, 16 Nov 2009 18:59:16 -0800	[thread overview]
Message-ID: <4B021184.6070401@gmail.com> (raw)
In-Reply-To: <528f13590911161846q6a91df8awa309d4e1f990d134@mail.gmail.com>

Hi Alfred,

alfred steele wrote:
>> Thanks for your submission!
>>     
> What is the current design on the mxc fec interface's attainment of a
> MAC address. From the kernel driver it looks like it looks at the
> IIM(IC identification registers) on the MXC platform(like mx51/35) to
> look for a programmed mac address and then the set the fec mac to the
> same .
>
> Looks like with the current mxc_fec driver there is not support for
> the same. I am thinking of a mechanism to hardcode a fake MAC which
> would subsequently be picked up by the kernel without using the
> bd_info structure.
> Any comments/suggestions?
>
> -Alfred.
>   
I don't know much about this driver, but it appears to be doing things 
incorrectly.  The correct flow is as follows.  It is documented in 
'doc/README.enetaddr':

1. The driver's initialize() function read from NVRAM if available.  MAC 
address is stuffed into dev->enetaddr.  The initialize() function should 
not try to get the address from the environment, which is where the 
imx27 driver goes wrong.
2. After all drivers have been initialized, eth_initialize() ( in 
net/eth.c) reads from the environment.  If the value in the environment 
is valid and the value in dev->enetaddr is valid and both are different, 
the user is warned.  The value in the environment overwrites the value 
in dev->enetaddr
3. When a network operation is performed, the driver's init() function 
is called, which is where the address is programmed into the device.

As you can see, if the device is never used, step 3 is never exected and 
the device is never programmed.  This is how it's supposed to work, 
since the U-boot design philosophy dictates that hardware is never 
touched unless it is used in U-boot.  I'm pretty sure hard-coding a fake 
MAC address would run afoul of this rule.

regards,
Ben

  reply	other threads:[~2009-11-17  2:59 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-19 23:55 [U-Boot] [PATCH 00/10][v2] Support for LogicPD i.MX27-LITEKIT development board Ilya Yanok
2009-05-19 23:55 ` [U-Boot] [PATCH 1/7] mx27: basic cpu support Ilya Yanok
2009-05-23  0:22   ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-26 19:25     ` Wolfgang Denk
2009-05-28 22:57   ` Wolfgang Denk
2009-05-28 23:04   ` Wolfgang Denk
2009-05-19 23:55 ` [U-Boot] [PATCH 2/7] serial_mx31: allow it to work with mx27 too and rename to serial_mxc Ilya Yanok
2009-05-23  0:25   ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-19 23:55 ` [U-Boot] [PATCH 3/7] fec_imx27: driver for FEC ethernet controller on i.MX27 Ilya Yanok
2009-05-26  5:38   ` Ben Warren
2009-06-07 23:08     ` Ilya Yanok
2009-11-17  2:46     ` alfred steele
2009-11-17  2:59       ` Ben Warren [this message]
2009-11-19  1:54         ` alfred steele
2009-11-19  3:30           ` Ben Warren
2009-11-17  6:34       ` Wolfgang Denk
2009-06-15 14:01   ` Johan
2009-06-15 19:59     ` Eric Lammerts
2009-06-16  7:12       ` Johan
2009-06-17 22:19         ` Ilya Yanok
2009-06-19 23:59         ` Wolfgang Denk
2009-06-23 17:37       ` [U-Boot] [PATCH 3/7] fec_imx27: driver for FEC Ethernet " Bill Cook
2009-05-19 23:55 ` [U-Boot] [PATCH 4/7] mxc_nand: add nand driver for MX2/MX3 Ilya Yanok
2009-05-28 23:06   ` Wolfgang Denk
2009-05-29  6:22     ` Magnus Lilja
2009-05-29  8:40       ` Wolfgang Denk
2009-05-19 23:55 ` [U-Boot] [PATCH 5/7] mxc-mmc: sdhc host driver for MX2 and MX3 proccessor Ilya Yanok
2009-05-19 23:56 ` [U-Boot] [PATCH 6/7] arm: add support for CONFIG_GENERIC_MMC Ilya Yanok
2009-05-23  0:27   ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-28 15:56     ` Andy Fleming
2009-06-02 23:09       ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-19 23:56 ` [U-Boot] [PATCH 7/7] imx27lite: add support for imx27lite board from LogicPD Ilya Yanok
2009-05-28 22:27   ` Wolfgang Denk
2009-05-19 23:58 ` [U-Boot] [PATCH 0/7][v2] Support for LogicPD i.MX27-LITEKIT development board Ilya Yanok
  -- strict thread matches above, loose matches on Subject: below --
2009-06-08  0:12 [U-Boot] [PATCH 0/7][v3] " Ilya Yanok
2009-06-08  0:12 ` [U-Boot] [PATCH 3/7] fec_imx27: driver for FEC ethernet controller on i.MX27 Ilya Yanok
2009-06-08  2:15 Fabio Estevam
2009-06-08 13:29 ` Ilya Yanok
2009-06-08 21:08 Fabio Estevam

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=4B021184.6070401@gmail.com \
    --to=biggerbadderben@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox