summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-02-01 21:31:37 +0100
committerWolfgang Denk <wd@denx.de>2009-02-01 21:31:37 +0100
commitee924e00300bd1136589b2d5f8ad1f008df01bd4 (patch)
tree4f517ecc2faf55dbaa3145835eef2eac2e0a4033 /include
parentf4b6f45dcba989f5a900edc07ececae80c79abdf (diff)
parentfc01ea1e27d5b124f0a1868d0ce569f156d58dfe (diff)
downloadu-boot-imx-ee924e00300bd1136589b2d5f8ad1f008df01bd4.zip
u-boot-imx-ee924e00300bd1136589b2d5f8ad1f008df01bd4.tar.gz
u-boot-imx-ee924e00300bd1136589b2d5f8ad1f008df01bd4.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-net
Diffstat (limited to 'include')
-rw-r--r--include/configs/sh7763rdp.h1
-rw-r--r--include/net.h16
-rw-r--r--include/netdev.h2
3 files changed, 19 insertions, 0 deletions
diff --git a/include/configs/sh7763rdp.h b/include/configs/sh7763rdp.h
index 8a76dad..4ea79cf 100644
--- a/include/configs/sh7763rdp.h
+++ b/include/configs/sh7763rdp.h
@@ -118,6 +118,7 @@
#define CONFIG_SYS_HZ (CONFIG_SYS_CLK_FREQ / TMU_CLK_DIVIDER)
/* Ether */
+#define CONFIG_NET_MULTI 1
#define CONFIG_SH_ETHER 1
#define CONFIG_SH_ETHER_USE_PORT (1)
#define CONFIG_SH_ETHER_PHY_ADDR (0x01)
diff --git a/include/net.h b/include/net.h
index d2d394f..bbe0d4b 100644
--- a/include/net.h
+++ b/include/net.h
@@ -474,6 +474,22 @@ static inline int is_multicast_ether_addr(const u8 *addr)
return (0x01 & addr[0]);
}
+/**
+ * is_valid_ether_addr - Determine if the given Ethernet address is valid
+ * @addr: Pointer to a six-byte array containing the Ethernet address
+ *
+ * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not
+ * a multicast address, and is not FF:FF:FF:FF:FF:FF.
+ *
+ * Return true if the address is valid.
+ */
+static inline int is_valid_ether_addr(const u8 * addr)
+{
+ /* FF:FF:FF:FF:FF:FF is a multicast address so we don't need to
+ * explicitly check for it here. */
+ return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr);
+}
+
/* Convert an IP address to a string */
extern void ip_to_string (IPaddr_t x, char *s);
diff --git a/include/netdev.h b/include/netdev.h
index 751f0da..ce1ecbd 100644
--- a/include/netdev.h
+++ b/include/netdev.h
@@ -57,6 +57,7 @@ int mcffec_initialize(bd_t *bis);
int mpc512x_fec_initialize(bd_t *bis);
int mpc5xxx_fec_initialize(bd_t *bis);
int mpc8220_fec_initialize(bd_t *bis);
+int mpc82xx_scc_enet_initialize(bd_t *bis);
int natsemi_initialize(bd_t *bis);
int npe_initialize(bd_t *bis);
int ns8382x_initialize(bd_t *bis);
@@ -70,6 +71,7 @@ int skge_initialize(bd_t *bis);
int tsi108_eth_initialize(bd_t *bis);
int uec_initialize(int index);
int uli526x_initialize(bd_t *bis);
+int sh_eth_initialize(bd_t *bis);
/* Boards with PCI network controllers can call this from their board_eth_init()
* function to initialize whatever's on board.