Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* Texas Instruments Ethernet Switch Driver
0003  *
0004  * Copyright (C) 2013 Texas Instruments
0005  *
0006  */
0007 #ifndef __CPSW_H__
0008 #define __CPSW_H__
0009 
0010 #include <linux/if_ether.h>
0011 #include <linux/phy.h>
0012 
0013 #define mac_hi(mac) (((mac)[0] << 0) | ((mac)[1] << 8) |    \
0014              ((mac)[2] << 16) | ((mac)[3] << 24))
0015 #define mac_lo(mac) (((mac)[4] << 0) | ((mac)[5] << 8))
0016 
0017 #if IS_ENABLED(CONFIG_TI_CPSW_PHY_SEL)
0018 void cpsw_phy_sel(struct device *dev, phy_interface_t phy_mode, int slave);
0019 #else
0020 static inline
0021 void cpsw_phy_sel(struct device *dev, phy_interface_t phy_mode, int slave)
0022 {}
0023 #endif
0024 int ti_cm_get_macid(struct device *dev, int slave, u8 *mac_addr);
0025 
0026 #endif /* __CPSW_H__ */