summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ti/cpsw.h
diff options
context:
space:
mode:
authorGrygorii Strashko <grygorii.strashko@ti.com>2017-12-01 03:21:13 +0300
committerDavid S. Miller <davem@davemloft.net>2017-12-02 00:36:32 +0300
commit2733d7b89ce15d60b6409b1c2275605f3e4dc940 (patch)
tree1a754a8373074274048c88ad1ed04059ddedca0a /drivers/net/ethernet/ti/cpsw.h
parent2c8a14d62601851b851ea4e502dcdf041936b191 (diff)
downloadlinux-2733d7b89ce15d60b6409b1c2275605f3e4dc940.tar.xz
net: ethernet: ti: cpsw: move mac_hi/lo defines in cpsw.h
Move mac_hi/lo defines in common header cpsw.h and re-use them for netcp_ethss.c. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti/cpsw.h')
-rw-r--r--drivers/net/ethernet/ti/cpsw.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.h b/drivers/net/ethernet/ti/cpsw.h
index a325f5556cc5..cf111db3dc27 100644
--- a/drivers/net/ethernet/ti/cpsw.h
+++ b/drivers/net/ethernet/ti/cpsw.h
@@ -17,6 +17,10 @@
#include <linux/if_ether.h>
#include <linux/phy.h>
+#define mac_hi(mac) (((mac)[0] << 0) | ((mac)[1] << 8) | \
+ ((mac)[2] << 16) | ((mac)[3] << 24))
+#define mac_lo(mac) (((mac)[4] << 0) | ((mac)[5] << 8))
+
void cpsw_phy_sel(struct device *dev, phy_interface_t phy_mode, int slave);
int ti_cm_get_macid(struct device *dev, int slave, u8 *mac_addr);