Home
last modified time | relevance | path

Searched refs:phy_reg (Results 1 – 25 of 27) sorted by relevance

12

/kernel/linux/linux-5.10/drivers/net/ethernet/dec/tulip/
Dpnic.c23 u32 phy_reg = ioread32(ioaddr + 0xB8); in pnic_do_nway() local
26 if (phy_reg & 0x78000000) { /* Ignore baseT4 */ in pnic_do_nway()
27 if (phy_reg & 0x20000000) dev->if_port = 5; in pnic_do_nway()
28 else if (phy_reg & 0x40000000) dev->if_port = 3; in pnic_do_nway()
29 else if (phy_reg & 0x10000000) dev->if_port = 4; in pnic_do_nway()
30 else if (phy_reg & 0x08000000) dev->if_port = 0; in pnic_do_nway()
36 if (phy_reg & 0x30000000) { in pnic_do_nway()
42 phy_reg, medianame[dev->if_port]); in pnic_do_nway()
56 int phy_reg = ioread32(ioaddr + 0xB8); in pnic_lnk_change() local
60 phy_reg, csr5); in pnic_lnk_change()
[all …]
Ddmfe.c1670 u16 phy_reg; in dmfe_set_phyxcer() local
1678 phy_reg = dmfe_phy_read(db->ioaddr, in dmfe_set_phyxcer()
1682 db->phy_addr, 18, phy_reg, db->chip_id); in dmfe_set_phyxcer()
1686 phy_reg = dmfe_phy_read(db->ioaddr, db->phy_addr, 4, db->chip_id) & ~0x01e0; in dmfe_set_phyxcer()
1690 phy_reg |= db->PHY_reg4; in dmfe_set_phyxcer()
1694 case DMFE_10MHF: phy_reg |= 0x20; break; in dmfe_set_phyxcer()
1695 case DMFE_10MFD: phy_reg |= 0x40; break; in dmfe_set_phyxcer()
1696 case DMFE_100MHF: phy_reg |= 0x80; break; in dmfe_set_phyxcer()
1697 case DMFE_100MFD: phy_reg |= 0x100; break; in dmfe_set_phyxcer()
1699 if (db->chip_id == PCI_DM9009_ID) phy_reg &= 0x61; in dmfe_set_phyxcer()
[all …]
Duli526x.c1519 u16 phy_reg; in uli526x_set_phyxcer() local
1522 phy_reg = phy->read(db, db->phy_addr, 4) & ~0x01e0; in uli526x_set_phyxcer()
1526 phy_reg |= db->PHY_reg4; in uli526x_set_phyxcer()
1530 case ULI526X_10MHF: phy_reg |= 0x20; break; in uli526x_set_phyxcer()
1531 case ULI526X_10MFD: phy_reg |= 0x40; break; in uli526x_set_phyxcer()
1532 case ULI526X_100MHF: phy_reg |= 0x80; break; in uli526x_set_phyxcer()
1533 case ULI526X_100MFD: phy_reg |= 0x100; break; in uli526x_set_phyxcer()
1539 if ( !(phy_reg & 0x01e0)) { in uli526x_set_phyxcer()
1540 phy_reg|=db->PHY_reg4; in uli526x_set_phyxcer()
1543 phy->write(db, db->phy_addr, 4, phy_reg); in uli526x_set_phyxcer()
[all …]
/kernel/linux/linux-5.10/drivers/clk/hisilicon/
Dclk-hix5hd2.c139 u32 phy_reg; member
151 void __iomem *phy_reg; member
180 val = readl_relaxed(clk->phy_reg); in clk_ether_prepare()
183 writel_relaxed(val, clk->phy_reg); in clk_ether_prepare()
188 writel_relaxed(val, clk->phy_reg); in clk_ether_prepare()
193 writel_relaxed(val, clk->phy_reg); in clk_ether_prepare()
223 val = readl_relaxed(clk->phy_reg); in clk_complex_enable()
226 writel_relaxed(val, clk->phy_reg); in clk_complex_enable()
241 val = readl_relaxed(clk->phy_reg); in clk_complex_disable()
244 writel_relaxed(val, clk->phy_reg); in clk_complex_disable()
[all …]
/kernel/linux/linux-5.10/drivers/usb/phy/
Dphy-am335x-control.c13 void __iomem *phy_reg; member
84 val = readl(usb_ctrl->phy_reg + reg); in am335x_phy_power()
98 writel(val, usb_ctrl->phy_reg + reg); in am335x_phy_power()
168 ctrl_usb->phy_reg = devm_platform_ioremap_resource_byname(pdev, "phy_ctrl"); in am335x_control_usb_probe()
169 if (IS_ERR(ctrl_usb->phy_reg)) in am335x_control_usb_probe()
170 return PTR_ERR(ctrl_usb->phy_reg); in am335x_control_usb_probe()
/kernel/linux/linux-5.10/drivers/net/ethernet/intel/e1000e/
Dich8lan.c178 u16 phy_reg = 0; in e1000_phy_is_accessible_pchlan() local
185 ret_val = e1e_rphy_locked(hw, MII_PHYSID1, &phy_reg); in e1000_phy_is_accessible_pchlan()
186 if (ret_val || (phy_reg == 0xFFFF)) in e1000_phy_is_accessible_pchlan()
188 phy_id = (u32)(phy_reg << 16); in e1000_phy_is_accessible_pchlan()
190 ret_val = e1e_rphy_locked(hw, MII_PHYSID2, &phy_reg); in e1000_phy_is_accessible_pchlan()
191 if (ret_val || (phy_reg == 0xFFFF)) { in e1000_phy_is_accessible_pchlan()
195 phy_id |= (u32)(phy_reg & PHY_REVISION_MASK); in e1000_phy_is_accessible_pchlan()
204 hw->phy.revision = (u32)(phy_reg & ~PHY_REVISION_MASK); in e1000_phy_is_accessible_pchlan()
226 e1e_rphy_locked(hw, CV_SMB_CTRL, &phy_reg); in e1000_phy_is_accessible_pchlan()
227 phy_reg &= ~CV_SMB_CTRL_FORCE_SMBUS; in e1000_phy_is_accessible_pchlan()
[all …]
Dethtool.c1322 u16 phy_reg = 0; in e1000_integrated_phy_loopback() local
1361 e1e_rphy(hw, PHY_REG(2, 21), &phy_reg); in e1000_integrated_phy_loopback()
1362 phy_reg &= ~0x0007; in e1000_integrated_phy_loopback()
1363 phy_reg |= 0x006; in e1000_integrated_phy_loopback()
1364 e1e_wphy(hw, PHY_REG(2, 21), phy_reg); in e1000_integrated_phy_loopback()
1369 e1e_rphy(hw, PHY_REG(769, 16), &phy_reg); in e1000_integrated_phy_loopback()
1370 e1e_wphy(hw, PHY_REG(769, 16), phy_reg | 0x000C); in e1000_integrated_phy_loopback()
1372 e1e_rphy(hw, PHY_REG(776, 16), &phy_reg); in e1000_integrated_phy_loopback()
1373 e1e_wphy(hw, PHY_REG(776, 16), phy_reg | 0x0040); in e1000_integrated_phy_loopback()
1375 e1e_rphy(hw, PHY_REG(769, 16), &phy_reg); in e1000_integrated_phy_loopback()
[all …]
Dphy.h48 s32 e1000_enable_phy_wakeup_reg_access_bm(struct e1000_hw *hw, u16 *phy_reg);
49 s32 e1000_disable_phy_wakeup_reg_access_bm(struct e1000_hw *hw, u16 *phy_reg);
Dphy.c2538 s32 e1000_enable_phy_wakeup_reg_access_bm(struct e1000_hw *hw, u16 *phy_reg) in e1000_enable_phy_wakeup_reg_access_bm() argument
2553 ret_val = e1000e_read_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, phy_reg); in e1000_enable_phy_wakeup_reg_access_bm()
2563 temp = *phy_reg; in e1000_enable_phy_wakeup_reg_access_bm()
2591 s32 e1000_disable_phy_wakeup_reg_access_bm(struct e1000_hw *hw, u16 *phy_reg) in e1000_disable_phy_wakeup_reg_access_bm() argument
2603 ret_val = e1000e_write_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, *phy_reg); in e1000_disable_phy_wakeup_reg_access_bm()
2642 u16 phy_reg = 0; in e1000_access_phy_wakeup_reg_bm() local
2652 ret_val = e1000_enable_phy_wakeup_reg_access_bm(hw, &phy_reg); in e1000_access_phy_wakeup_reg_bm()
2684 ret_val = e1000_disable_phy_wakeup_reg_access_bm(hw, &phy_reg); in e1000_access_phy_wakeup_reg_bm()
Dnetdev.c6247 u16 phy_reg, wuc_enable; in e1000_init_phy_wakeup() local
6274 hw->phy.ops.read_reg_page(&adapter->hw, BM_RCTL, &phy_reg); in e1000_init_phy_wakeup()
6277 phy_reg |= BM_RCTL_UPE; in e1000_init_phy_wakeup()
6279 phy_reg |= BM_RCTL_MPE; in e1000_init_phy_wakeup()
6280 phy_reg &= ~(BM_RCTL_MO_MASK); in e1000_init_phy_wakeup()
6282 phy_reg |= (((mac_reg & E1000_RCTL_MO_3) >> E1000_RCTL_MO_SHIFT) in e1000_init_phy_wakeup()
6285 phy_reg |= BM_RCTL_BAM; in e1000_init_phy_wakeup()
6287 phy_reg |= BM_RCTL_PMCF; in e1000_init_phy_wakeup()
6290 phy_reg |= BM_RCTL_RFCE; in e1000_init_phy_wakeup()
6291 hw->phy.ops.write_reg_page(&adapter->hw, BM_RCTL, phy_reg); in e1000_init_phy_wakeup()
/kernel/linux/linux-5.10/drivers/net/
Dsungem_phy.c601 u32 phy_reg; in bcm5421_poll_link() local
606 phy_reg = sungem_phy_read(phy, MII_NCONFIG); in bcm5421_poll_link()
608 mode = (phy_reg & BCM5421_MODE_MASK) >> 5; in bcm5421_poll_link()
615 phy_reg = sungem_phy_read(phy, MII_NCONFIG); in bcm5421_poll_link()
617 if (phy_reg & 0x0020) in bcm5421_poll_link()
625 u32 phy_reg; in bcm5421_read_link() local
630 phy_reg = sungem_phy_read(phy, MII_NCONFIG); in bcm5421_read_link()
632 mode = (phy_reg & BCM5421_MODE_MASK ) >> 5; in bcm5421_read_link()
641 phy_reg = sungem_phy_read(phy, MII_NCONFIG); in bcm5421_read_link()
643 if ( (phy_reg & 0x0080) >> 7) in bcm5421_read_link()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/intel/e1000/
De1000_ethtool.c1114 u16 phy_reg; in e1000_phy_reset_clk_and_crs() local
1120 e1000_read_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, &phy_reg); in e1000_phy_reset_clk_and_crs()
1121 phy_reg |= M88E1000_EPSCR_TX_CLK_25; in e1000_phy_reset_clk_and_crs()
1122 e1000_write_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, phy_reg); in e1000_phy_reset_clk_and_crs()
1128 e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_reg); in e1000_phy_reset_clk_and_crs()
1129 phy_reg |= M88E1000_PSCR_ASSERT_CRS_ON_TX; in e1000_phy_reset_clk_and_crs()
1130 e1000_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_reg); in e1000_phy_reset_clk_and_crs()
1137 u16 phy_reg; in e1000_nonintegrated_phy_loopback() local
1151 e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_reg); in e1000_nonintegrated_phy_loopback()
1156 phy_reg &= ~M88E1000_PSCR_AUTO_X_MODE; in e1000_nonintegrated_phy_loopback()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/realtek/
Dr8169_phy_config.c53 struct phy_reg { struct
59 const struct phy_reg *regs, int len) in __rtl_writephy_batch() argument
111 static const struct phy_reg phy_reg_init[] = { in rtl8169s_hw_phy_config()
185 static const struct phy_reg phy_reg_init[] = { in rtl8169scd_hw_phy_config()
231 static const struct phy_reg phy_reg_init[] = { in rtl8169sce_hw_phy_config()
315 static const struct phy_reg phy_reg_init[] = { in rtl8168c_1_hw_phy_config()
344 static const struct phy_reg phy_reg_init[] = { in rtl8168c_2_hw_phy_config()
372 static const struct phy_reg phy_reg_init[] = { in rtl8168c_3_hw_phy_config()
391 static const struct phy_reg rtl8168d_1_phy_reg_init_0[] = {
432 static const struct phy_reg rtl8168d_1_phy_reg_init_1[] = {
[all …]
/kernel/linux/linux-5.10/drivers/net/phy/
Dphy_device.c670 int phy_reg; in get_phy_c45_devs_in_pkg() local
672 phy_reg = mdiobus_c45_read(bus, addr, dev_addr, MDIO_DEVS2); in get_phy_c45_devs_in_pkg()
673 if (phy_reg < 0) in get_phy_c45_devs_in_pkg()
675 *devices_in_package = phy_reg << 16; in get_phy_c45_devs_in_pkg()
677 phy_reg = mdiobus_c45_read(bus, addr, dev_addr, MDIO_DEVS1); in get_phy_c45_devs_in_pkg()
678 if (phy_reg < 0) in get_phy_c45_devs_in_pkg()
680 *devices_in_package |= phy_reg; in get_phy_c45_devs_in_pkg()
703 int i, ret, phy_reg; in get_phy_c45_ids() local
724 phy_reg = get_phy_c45_devs_in_pkg(bus, addr, i, &devs_in_pkg); in get_phy_c45_ids()
725 if (phy_reg < 0) in get_phy_c45_ids()
[all …]
/kernel/linux/linux-5.10/drivers/spi/
Dspi-sprd-adi.c280 u32 phy_reg, val; in sprd_adi_transfer_one() local
284 phy_reg = *(u32 *)t->rx_buf + sadi->slave_pbase; in sprd_adi_transfer_one()
286 ret = sprd_adi_check_paddr(sadi, phy_reg); in sprd_adi_transfer_one()
290 ret = sprd_adi_read(sadi, phy_reg, &val); in sprd_adi_transfer_one()
303 phy_reg = *p++ + sadi->slave_pbase; in sprd_adi_transfer_one()
304 ret = sprd_adi_check_paddr(sadi, phy_reg); in sprd_adi_transfer_one()
309 ret = sprd_adi_write(sadi, phy_reg, val); in sprd_adi_transfer_one()
/kernel/linux/linux-5.10/drivers/net/usb/
Dsr9800.c372 int phy_reg; in sr_get_phyid() local
378 phy_reg = sr_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID1); in sr_get_phyid()
379 if (phy_reg != 0 && phy_reg != 0xFFFF) in sr_get_phyid()
384 if (phy_reg <= 0 || phy_reg == 0xFFFF) in sr_get_phyid()
387 phy_id = (phy_reg & 0xffff) << 16; in sr_get_phyid()
389 phy_reg = sr_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID2); in sr_get_phyid()
390 if (phy_reg < 0) in sr_get_phyid()
393 phy_id |= (phy_reg & 0xffff); in sr_get_phyid()
Dasix_devices.c72 int phy_reg; in asix_get_phyid() local
78 phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID1); in asix_get_phyid()
79 if (phy_reg < 0) in asix_get_phyid()
81 if (phy_reg != 0 && phy_reg != 0xFFFF) in asix_get_phyid()
86 if (phy_reg <= 0 || phy_reg == 0xFFFF) in asix_get_phyid()
89 phy_id = (phy_reg & 0xffff) << 16; in asix_get_phyid()
91 phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID2); in asix_get_phyid()
92 if (phy_reg < 0) in asix_get_phyid()
95 phy_id |= (phy_reg & 0xffff); in asix_get_phyid()
/kernel/linux/linux-5.10/arch/arm/mach-mmp/
Ddevices.h54 extern int pxa_usb_phy_init(void __iomem *phy_reg);
55 extern void pxa_usb_phy_deinit(void __iomem *phy_reg);
Ddevices.c215 int pxa_usb_phy_init(void __iomem *phy_reg) in pxa_usb_phy_init() argument
219 usb_phy_init_internal(phy_reg); in pxa_usb_phy_init()
224 void pxa_usb_phy_deinit(void __iomem *phy_reg) in pxa_usb_phy_deinit() argument
230 usb_phy_deinit_internal(phy_reg); in pxa_usb_phy_deinit()
/kernel/linux/linux-5.10/drivers/net/ethernet/ti/
Ddavinci_mdio.c226 static int davinci_mdio_read(struct mii_bus *bus, int phy_id, int phy_reg) in davinci_mdio_read() argument
232 if (phy_reg & ~PHY_REG_MASK || phy_id & ~PHY_ID_MASK) in davinci_mdio_read()
241 reg = (USERACCESS_GO | USERACCESS_READ | (phy_reg << 21) | in davinci_mdio_read()
270 int phy_reg, u16 phy_data) in davinci_mdio_write() argument
276 if (phy_reg & ~PHY_REG_MASK || phy_id & ~PHY_ID_MASK) in davinci_mdio_write()
285 reg = (USERACCESS_GO | USERACCESS_WRITE | (phy_reg << 21) | in davinci_mdio_write()
/kernel/linux/linux-5.10/drivers/net/ieee802154/
Dmcr20a.c1088 unsigned int phy_reg = 0; in mcr20a_phy_init() local
1170 phy_reg = (u8)(((index & DAR_SRC_CTRL_INDEX) << in mcr20a_phy_init()
1174 ret = regmap_write(lp->regmap_dar, DAR_SRC_CTRL, phy_reg); in mcr20a_phy_init()
1177 phy_reg = 0; in mcr20a_phy_init()
1181 ret = regmap_read(lp->regmap_iar, IAR_DUAL_PAN_CTRL, &phy_reg); in mcr20a_phy_init()
1186 phy_reg &= ~IAR_DUAL_PAN_CTRL_DUAL_PAN_SAM_LVL_MSK; in mcr20a_phy_init()
1189 phy_reg |= MCR20A_PHY_INDIRECT_QUEUE_SIZE << in mcr20a_phy_init()
1191 ret = regmap_write(lp->regmap_iar, IAR_DUAL_PAN_CTRL, phy_reg); in mcr20a_phy_init()
/kernel/linux/linux-5.10/drivers/net/ethernet/
Dlantiq_etop.c304 ltq_etop_mdio_wr(struct mii_bus *bus, int phy_addr, int phy_reg, u16 phy_data) in ltq_etop_mdio_wr() argument
308 ((phy_reg & MDIO_REG_MASK) << MDIO_REG_OFFSET) | in ltq_etop_mdio_wr()
318 ltq_etop_mdio_rd(struct mii_bus *bus, int phy_addr, int phy_reg) in ltq_etop_mdio_rd() argument
322 ((phy_reg & MDIO_REG_MASK) << MDIO_REG_OFFSET); in ltq_etop_mdio_rd()
/kernel/linux/linux-5.10/drivers/pinctrl/ti/
Dpinctrl-ti-iodelay.c746 u32 phy_reg; in ti_iodelay_alloc_pins() local
759 phy_reg = r->reg_start_offset + base_phy; in ti_iodelay_alloc_pins()
761 for (i = 0; i < nr_pins; i++, phy_reg += 4) { in ti_iodelay_alloc_pins()
/kernel/linux/linux-5.10/drivers/phy/rockchip/
Dphy-rockchip-typec.c389 struct phy_reg { struct
394 static struct phy_reg usb3_pll_cfg[] = { argument
411 static struct phy_reg dp_pll_cfg[] = {
/kernel/linux/linux-5.10/drivers/net/ethernet/mediatek/
Dmtk_eth_soc.c114 static u32 _mtk_mdio_read(struct mtk_eth *eth, int phy_addr, int phy_reg) in _mtk_mdio_read() argument
122 (phy_reg << PHY_IAC_REG_SHIFT) | in _mtk_mdio_read()
135 int phy_reg, u16 val) in mtk_mdio_write() argument
139 return _mtk_mdio_write(eth, phy_addr, phy_reg, val); in mtk_mdio_write()
142 static int mtk_mdio_read(struct mii_bus *bus, int phy_addr, int phy_reg) in mtk_mdio_read() argument
146 return _mtk_mdio_read(eth, phy_addr, phy_reg); in mtk_mdio_read()

12