summaryrefslogtreecommitdiff
path: root/board/bf527-ad7160-eval
diff options
context:
space:
mode:
authorEric Miao <eric.miao@linaro.org>2012-01-18 22:56:33 +0000
committerJoe Hershberger <joe.hershberger@ni.com>2012-04-03 19:25:45 -0500
commit6937664426446b76308e7125e9f357e0f12c731a (patch)
tree17a90db811cc613f0ec22c725d6d9738f70f3df2 /board/bf527-ad7160-eval
parentcc79697c963548f27bceece9c2e8c24f5703c50a (diff)
downloadu-boot-imx-6937664426446b76308e7125e9f357e0f12c731a.zip
u-boot-imx-6937664426446b76308e7125e9f357e0f12c731a.tar.gz
u-boot-imx-6937664426446b76308e7125e9f357e0f12c731a.tar.bz2
net/eth.c: fix eth_write_hwaddr() to use dev->enetaddr as fall back
Ignore the return value of eth_getenv_enetaddr_by_index(), and if it fails, fall back to use dev->enetaddr, which could be filled up by the ethernet device driver: With the current code, introduced with below commit, eth_write_hwaddr() will fail immediately if there is no eth<n>addr in the environment variables. However, e.g. for an overo based product that uses the SMSC911x ethernet chip (with the MAC address set via EEPROM connected to the SMSC911x chip), the MAC address is still OK. On mx28 boards that are depending on the OCOTP bits to set the MAC address (like the Denx m28 board), the OCOTP bits should be used instead of failing on the environment variables. Actually, this was the original behavior, and was later changed by commit 7616e7850804c7c69e0a22c179dfcba9e8f3f587. Signed-off-by: Eric Miao <eric.miao@linaro.org> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Dirk Behme <dirk.behme@de.bosch.com> CC: Stefan Roese <sr@denx.de> CC: Eric Miao <eric.miao@linaro.org> CC: Wolfgang Denk <wd@denx.de> CC: Philip Balister <philip@balister.org> CC: Zach Sadecki <zach@itwatchdogs.com>
Diffstat (limited to 'board/bf527-ad7160-eval')
0 files changed, 0 insertions, 0 deletions