diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-04-04 18:53:41 +0000 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2012-05-15 17:32:33 -0500 |
commit | de30122bb58fee7b0f94bcfabab595b6ad757336 (patch) | |
tree | e109b8799a2fe97e49424bec56cbe448154d1dd4 /net/eth.c | |
parent | 50a47d0523e8efebe912bef539a77ffd42116451 (diff) | |
download | u-boot-imx-de30122bb58fee7b0f94bcfabab595b6ad757336.zip u-boot-imx-de30122bb58fee7b0f94bcfabab595b6ad757336.tar.gz u-boot-imx-de30122bb58fee7b0f94bcfabab595b6ad757336.tar.bz2 |
net: move bootfile init into eth_initialize
All arches init this the same way, so move the logic into the core
net code to avoid duplicating it everywhere else.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'net/eth.c')
-rw-r--r-- | net/eth.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -245,6 +245,14 @@ int eth_unregister(struct eth_device *dev) return 0; } +static void eth_env_init(bd_t *bis) +{ + const char *s; + + if ((s = getenv("bootfile")) != NULL) + copy_filename(BootFile, s, sizeof(BootFile)); +} + int eth_initialize(bd_t *bis) { int num_devices = 0; @@ -260,6 +268,8 @@ int eth_initialize(bd_t *bis) phy_init(); #endif + eth_env_init(bis); + /* * If board-specific initialization exists, call it. * If not, call a CPU-specific one |