Lines Matching +full:slave +full:- +full:kernel
1 // SPDX-License-Identifier: GPL-2.0+
3 #include <linux/kernel.h>
15 int slave, u8 *mac_addr) in davinci_emac_3517_get_macid() argument
21 syscon = syscon_regmap_lookup_by_phandle(dev->of_node, "syscon"); in davinci_emac_3517_get_macid()
23 if (PTR_ERR(syscon) == -ENODEV) in davinci_emac_3517_get_macid()
28 regmap_read(syscon, CTRL_MAC_LO_REG(offset, slave), &macid_lsb); in davinci_emac_3517_get_macid()
29 regmap_read(syscon, CTRL_MAC_HI_REG(offset, slave), &macid_msb); in davinci_emac_3517_get_macid()
41 static int cpsw_am33xx_cm_get_macid(struct device *dev, u16 offset, int slave, in cpsw_am33xx_cm_get_macid() argument
48 syscon = syscon_regmap_lookup_by_phandle(dev->of_node, "syscon"); in cpsw_am33xx_cm_get_macid()
50 if (PTR_ERR(syscon) == -ENODEV) in cpsw_am33xx_cm_get_macid()
55 regmap_read(syscon, CTRL_MAC_LO_REG(offset, slave), &macid_lo); in cpsw_am33xx_cm_get_macid()
56 regmap_read(syscon, CTRL_MAC_HI_REG(offset, slave), &macid_hi); in cpsw_am33xx_cm_get_macid()
68 int ti_cm_get_macid(struct device *dev, int slave, u8 *mac_addr) in ti_cm_get_macid() argument
71 return cpsw_am33xx_cm_get_macid(dev, 0x630, slave, mac_addr); in ti_cm_get_macid()
74 return cpsw_am33xx_cm_get_macid(dev, 0x630, slave, mac_addr); in ti_cm_get_macid()
76 if (of_device_is_compatible(dev->of_node, "ti,am3517-emac")) in ti_cm_get_macid()
77 return davinci_emac_3517_get_macid(dev, 0x110, slave, mac_addr); in ti_cm_get_macid()
79 if (of_device_is_compatible(dev->of_node, "ti,dm816-emac")) in ti_cm_get_macid()
80 return cpsw_am33xx_cm_get_macid(dev, 0x30, slave, mac_addr); in ti_cm_get_macid()
83 return cpsw_am33xx_cm_get_macid(dev, 0x630, slave, mac_addr); in ti_cm_get_macid()
86 return davinci_emac_3517_get_macid(dev, 0x514, slave, mac_addr); in ti_cm_get_macid()
89 return -ENOENT; in ti_cm_get_macid()