1*68cf027fSGrygorii Strashko /* SPDX-License-Identifier: GPL-2.0 */ 2dbe34724SMugunthan V N /* Texas Instruments Ethernet Switch Driver 3dbe34724SMugunthan V N * 4dbe34724SMugunthan V N * Copyright (C) 2013 Texas Instruments 5dbe34724SMugunthan V N * 6dbe34724SMugunthan V N */ 7dbe34724SMugunthan V N #ifndef __CPSW_H__ 8dbe34724SMugunthan V N #define __CPSW_H__ 9dbe34724SMugunthan V N 10dbe34724SMugunthan V N #include <linux/if_ether.h> 11bd07d34fSMarkus Pargmann #include <linux/phy.h> 12dbe34724SMugunthan V N 132733d7b8SGrygorii Strashko #define mac_hi(mac) (((mac)[0] << 0) | ((mac)[1] << 8) | \ 142733d7b8SGrygorii Strashko ((mac)[2] << 16) | ((mac)[3] << 24)) 152733d7b8SGrygorii Strashko #define mac_lo(mac) (((mac)[4] << 0) | ((mac)[5] << 8)) 162733d7b8SGrygorii Strashko 17dba235faSGrygorii Strashko #if IS_ENABLED(CONFIG_TI_CPSW_PHY_SEL) 185892cd13SMugunthan V N void cpsw_phy_sel(struct device *dev, phy_interface_t phy_mode, int slave); 19dba235faSGrygorii Strashko #else 20dba235faSGrygorii Strashko static inline cpsw_phy_sel(struct device * dev,phy_interface_t phy_mode,int slave)21dba235faSGrygorii Strashkovoid cpsw_phy_sel(struct device *dev, phy_interface_t phy_mode, int slave) 22dba235faSGrygorii Strashko {} 23dba235faSGrygorii Strashko #endif 24b6745f6eSMugunthan V N int ti_cm_get_macid(struct device *dev, int slave, u8 *mac_addr); 255892cd13SMugunthan V N 26dbe34724SMugunthan V N #endif /* __CPSW_H__ */ 27