summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDirk Behme <dirk.behme@googlemail.com>2010-01-03 08:33:58 +0100
committerWolfgang Denk <wd@denx.de>2010-01-17 20:14:47 +0100
commit6a45e384955262882375a2785426dc65aeb636c4 (patch)
treea1648daf66d4be1d71427f8e2f35123180f9de04 /net
parent2740544881f652566756815dda4da0bcd946e9de (diff)
downloadtalos-obmc-uboot-6a45e384955262882375a2785426dc65aeb636c4.tar.gz
talos-obmc-uboot-6a45e384955262882375a2785426dc65aeb636c4.zip
Make getenv_IPaddr() global
There are boards out there that do not have network support in U-Boot (CONFIG_CMD_NET not set), but they do so in Linux. This makes it desirable to be able to port network configuration (like the IP address) to the Linux kernel. We should not make the passing of the IP configuration to Linux dependent on U-Boot features / settings. For this, make getenv_IPaddr() global. This fixes build error u-boot/lib_xxx/board.c:360: undefined reference to `getenv_IPaddr' on various architectures. Signed-off-by: Dirk Behme <dirk.behme@googlemail.com> Acked-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'net')
-rw-r--r--net/net.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/net/net.c b/net/net.c
index 595abd9223..7d2220d48d 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1890,27 +1890,6 @@ void ip_to_string (IPaddr_t x, char *s)
);
}
-IPaddr_t string_to_ip(char *s)
-{
- IPaddr_t addr;
- char *e;
- int i;
-
- if (s == NULL)
- return(0);
-
- for (addr=0, i=0; i<4; ++i) {
- ulong val = s ? simple_strtoul(s, &e, 10) : 0;
- addr <<= 8;
- addr |= (val & 0xFF);
- if (s) {
- s = (*e) ? e+1 : e;
- }
- }
-
- return (htonl(addr));
-}
-
void VLAN_to_string(ushort x, char *s)
{
x = ntohs(x);
@@ -1939,11 +1918,6 @@ ushort string_to_VLAN(char *s)
return htons(id);
}
-IPaddr_t getenv_IPaddr (char *var)
-{
- return (string_to_ip(getenv(var)));
-}
-
ushort getenv_VLAN(char *var)
{
return (string_to_VLAN(getenv(var)));
OpenPOWER on IntegriCloud