Lines Matching +full:slave +full:- +full:kernel
1 // SPDX-License-Identifier: GPL-2.0+
3 #include <linux/kernel.h>
16 int slave, u8 *mac_addr) in davinci_emac_3517_get_macid() argument
22 syscon = syscon_regmap_lookup_by_phandle(dev->of_node, "syscon"); in davinci_emac_3517_get_macid()
24 if (PTR_ERR(syscon) == -ENODEV) in davinci_emac_3517_get_macid()
29 regmap_read(syscon, CTRL_MAC_LO_REG(offset, slave), &macid_lsb); in davinci_emac_3517_get_macid()
30 regmap_read(syscon, CTRL_MAC_HI_REG(offset, slave), &macid_msb); in davinci_emac_3517_get_macid()
42 static int cpsw_am33xx_cm_get_macid(struct device *dev, u16 offset, int slave, in cpsw_am33xx_cm_get_macid() argument
49 syscon = syscon_regmap_lookup_by_phandle(dev->of_node, "syscon"); in cpsw_am33xx_cm_get_macid()
51 if (PTR_ERR(syscon) == -ENODEV) in cpsw_am33xx_cm_get_macid()
56 regmap_read(syscon, CTRL_MAC_LO_REG(offset, slave), &macid_lo); in cpsw_am33xx_cm_get_macid()
57 regmap_read(syscon, CTRL_MAC_HI_REG(offset, slave), &macid_hi); in cpsw_am33xx_cm_get_macid()
69 int ti_cm_get_macid(struct device *dev, int slave, u8 *mac_addr) in ti_cm_get_macid() argument
72 return cpsw_am33xx_cm_get_macid(dev, 0x630, slave, mac_addr); in ti_cm_get_macid()
75 return cpsw_am33xx_cm_get_macid(dev, 0x630, slave, mac_addr); in ti_cm_get_macid()
77 if (of_device_is_compatible(dev->of_node, "ti,am3517-emac")) in ti_cm_get_macid()
78 return davinci_emac_3517_get_macid(dev, 0x110, slave, mac_addr); in ti_cm_get_macid()
80 if (of_device_is_compatible(dev->of_node, "ti,dm816-emac")) in ti_cm_get_macid()
81 return cpsw_am33xx_cm_get_macid(dev, 0x30, slave, mac_addr); in ti_cm_get_macid()
84 return cpsw_am33xx_cm_get_macid(dev, 0x630, slave, mac_addr); in ti_cm_get_macid()
87 return davinci_emac_3517_get_macid(dev, 0x514, slave, mac_addr); in ti_cm_get_macid()
90 return -ENOENT; in ti_cm_get_macid()