From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 09/12] da850: read MAC address from I2C EEPROM on AM18xx EVM
Date: Tue, 02 Aug 2011 18:30:36 +0200 [thread overview]
Message-ID: <20110802163036.39B711208DCE@gemini.denx.de> (raw)
In-Reply-To: <1312299792-16415-10-git-send-email-nagabhushana.netagunte@ti.com>
Dear nagabhushana.netagunte at ti.com,
In message <1312299792-16415-10-git-send-email-nagabhushana.netagunte@ti.com> you wrote:
> From: Nagabhushana Netagunte <nagabhushana.netagunte@ti.com>
>
> The AM18xx EVM contains MAC address in I2C EEPROM compared
> da850/omap-l138 Logic PD EVM which maintains in SPI flash. ...
Sorry, I cannot parse this. Please reformulate.
> if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
> - /* Set Ethernet MAC address from EEPROM */
> - ret = get_mac_addr_spi(addr);
> - if (ret != 0)
> - return -EINVAL;
> + /* Read Ethernet MAC address from EEPROM */
> + if (dvevm_read_mac_address(addr)) {
> + /* Set Ethernet MAC address from EEPROM */
> + davinci_sync_env_enetaddr(addr);
> + } else {
> + /* Set Ethernet MAC address from SPI flash */
> + ret = get_mac_addr_spi(addr);
> + if (ret != 0)
> + return -EINVAL;
> + }
This is a pretty bad idea, as it will slow down booting and may cause
undefined behaviour if anybody decides to put an EEPROm on a board
where you assume there is none.
Please find a different way to test which board you have (or provide a
separate configuration). Implement this test just once, in early init
code, so that not each and every driver or feature as to test this
himself again and again.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Spock, did you see the looks on their faces?"
"Yes, Captain, a sort of vacant contentment."
next prev parent reply other threads:[~2011-08-02 16:30 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-02 15:43 [U-Boot] [PATCH 00/12] feature additions and fixes for da850 nagabhushana.netagunte at ti.com
2011-08-02 15:43 ` [U-Boot] [PATCH 01/12] da850: indicate cache usage disable in config file nagabhushana.netagunte at ti.com
2011-08-02 16:06 ` Wolfgang Denk
2011-08-02 19:37 ` Laurence Withers
2011-08-09 13:44 ` Netagunte, Nagabhushana
2011-08-09 13:54 ` Netagunte, Nagabhushana
2011-08-02 15:43 ` [U-Boot] [PATCH 02/12] da8xx: add support for multiple PLL controllers nagabhushana.netagunte at ti.com
2011-08-02 15:43 ` [U-Boot] [PATCH 03/12] da850: add NOR boot mode support nagabhushana.netagunte at ti.com
2011-08-02 16:12 ` Wolfgang Denk
2011-08-09 14:03 ` Netagunte, Nagabhushana
2011-08-10 10:50 ` Detlev Zundel
2011-08-17 12:43 ` Netagunte, Nagabhushana
2011-08-02 15:43 ` [U-Boot] [PATCH 04/12] da850: modify the U-Boot prompt string nagabhushana.netagunte at ti.com
2011-08-02 15:43 ` [U-Boot] [PATCH 05/12] da850: add support to read mac address from spi flash nagabhushana.netagunte at ti.com
2011-08-02 16:20 ` Wolfgang Denk
2011-08-09 14:05 ` Netagunte, Nagabhushana
2011-08-02 16:23 ` Wolfgang Denk
2011-08-09 14:08 ` Netagunte, Nagabhushana
2011-08-02 15:43 ` [U-Boot] [PATCH 06/12] da850: add support to wake up DSP during board init nagabhushana.netagunte at ti.com
2011-08-02 16:25 ` Wolfgang Denk
2011-08-09 14:10 ` Netagunte, Nagabhushana
2011-08-02 15:43 ` [U-Boot] [PATCH 07/12] da850: add support for Spectrum Digital AM18xx EVM nagabhushana.netagunte at ti.com
2011-08-02 15:43 ` [U-Boot] [PATCH 08/12] da850: pass board revision info to kernel nagabhushana.netagunte at ti.com
2011-08-02 16:27 ` Wolfgang Denk
2011-08-09 13:52 ` Netagunte, Nagabhushana
2011-08-02 15:43 ` [U-Boot] [PATCH 09/12] da850: read MAC address from I2C EEPROM on AM18xx EVM nagabhushana.netagunte at ti.com
2011-08-02 16:30 ` Wolfgang Denk [this message]
2011-08-09 13:47 ` Netagunte, Nagabhushana
2011-09-15 10:50 ` Netagunte, Nagabhushana
2011-08-02 15:43 ` [U-Boot] [PATCH 10/12] da850: fix the channel number for EMAC teardown init nagabhushana.netagunte at ti.com
2011-08-02 15:43 ` [U-Boot] [PATCH 11/12] da850: modifications for Logic PD Rev.3 AM18xx EVM nagabhushana.netagunte at ti.com
2011-08-02 16:32 ` Wolfgang Denk
2011-08-09 13:45 ` Netagunte, Nagabhushana
2011-08-02 15:43 ` [U-Boot] [PATCH 12/12] da850: print DDR frequency from u-boot nagabhushana.netagunte at ti.com
2011-08-02 16:33 ` Wolfgang Denk
2011-08-09 13:40 ` Netagunte, Nagabhushana
2011-08-10 10:47 ` Detlev Zundel
2011-08-17 12:47 ` Netagunte, Nagabhushana
2011-08-17 15:37 ` Stefano Babic
2011-08-17 15:48 ` Detlev Zundel
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=20110802163036.39B711208DCE@gemini.denx.de \
--to=wd@denx.de \
--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