/drivers/net/ethernet/dec/tulip/ |
D | pnic.c | 23 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 …]
|
D | dmfe.c | 1669 u16 phy_reg; in dmfe_set_phyxcer() local 1677 phy_reg = dmfe_phy_read(db->ioaddr, in dmfe_set_phyxcer() 1681 db->phy_addr, 18, phy_reg, db->chip_id); in dmfe_set_phyxcer() 1685 phy_reg = dmfe_phy_read(db->ioaddr, db->phy_addr, 4, db->chip_id) & ~0x01e0; in dmfe_set_phyxcer() 1689 phy_reg |= db->PHY_reg4; in dmfe_set_phyxcer() 1693 case DMFE_10MHF: phy_reg |= 0x20; break; in dmfe_set_phyxcer() 1694 case DMFE_10MFD: phy_reg |= 0x40; break; in dmfe_set_phyxcer() 1695 case DMFE_100MHF: phy_reg |= 0x80; break; in dmfe_set_phyxcer() 1696 case DMFE_100MFD: phy_reg |= 0x100; break; in dmfe_set_phyxcer() 1698 if (db->chip_id == PCI_DM9009_ID) phy_reg &= 0x61; in dmfe_set_phyxcer() [all …]
|
D | uli526x.c | 1522 u16 phy_reg; in uli526x_set_phyxcer() local 1525 phy_reg = phy->read(db, db->phy_addr, 4) & ~0x01e0; in uli526x_set_phyxcer() 1529 phy_reg |= db->PHY_reg4; in uli526x_set_phyxcer() 1533 case ULI526X_10MHF: phy_reg |= 0x20; break; in uli526x_set_phyxcer() 1534 case ULI526X_10MFD: phy_reg |= 0x40; break; in uli526x_set_phyxcer() 1535 case ULI526X_100MHF: phy_reg |= 0x80; break; in uli526x_set_phyxcer() 1536 case ULI526X_100MFD: phy_reg |= 0x100; break; in uli526x_set_phyxcer() 1542 if ( !(phy_reg & 0x01e0)) { in uli526x_set_phyxcer() 1543 phy_reg|=db->PHY_reg4; in uli526x_set_phyxcer() 1546 phy->write(db, db->phy_addr, 4, phy_reg); in uli526x_set_phyxcer() [all …]
|
/drivers/clk/hisilicon/ |
D | clk-hix5hd2.c | 139 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 …]
|
/drivers/net/ethernet/mellanox/mlxbf_gige/ |
D | mlxbf_gige_mdio.c | 138 int phy_reg, u32 opcode) in mlxbf_gige_mdio_create_cmd() argument 143 gw_reg |= FIELD_PREP(MLXBF_GIGE_MDIO_GW_DEVAD_MASK, phy_reg); in mlxbf_gige_mdio_create_cmd() 154 static int mlxbf_gige_mdio_read(struct mii_bus *bus, int phy_add, int phy_reg) in mlxbf_gige_mdio_read() argument 161 if (phy_reg & MII_ADDR_C45) in mlxbf_gige_mdio_read() 165 cmd = mlxbf_gige_mdio_create_cmd(0, phy_add, phy_reg, MLXBF_GIGE_MDIO_CL22_READ); in mlxbf_gige_mdio_read() 189 int phy_reg, u16 val) in mlxbf_gige_mdio_write() argument 196 if (phy_reg & MII_ADDR_C45) in mlxbf_gige_mdio_write() 200 cmd = mlxbf_gige_mdio_create_cmd(val, phy_add, phy_reg, in mlxbf_gige_mdio_write()
|
/drivers/net/ethernet/intel/e1000e/ |
D | ich8lan.c | 178 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 …]
|
D | ethtool.c | 1327 u16 phy_reg = 0; in e1000_integrated_phy_loopback() local 1366 e1e_rphy(hw, PHY_REG(2, 21), &phy_reg); in e1000_integrated_phy_loopback() 1367 phy_reg &= ~0x0007; in e1000_integrated_phy_loopback() 1368 phy_reg |= 0x006; in e1000_integrated_phy_loopback() 1369 e1e_wphy(hw, PHY_REG(2, 21), phy_reg); in e1000_integrated_phy_loopback() 1374 e1e_rphy(hw, PHY_REG(769, 16), &phy_reg); in e1000_integrated_phy_loopback() 1375 e1e_wphy(hw, PHY_REG(769, 16), phy_reg | 0x000C); in e1000_integrated_phy_loopback() 1377 e1e_rphy(hw, PHY_REG(776, 16), &phy_reg); in e1000_integrated_phy_loopback() 1378 e1e_wphy(hw, PHY_REG(776, 16), phy_reg | 0x0040); in e1000_integrated_phy_loopback() 1380 e1e_rphy(hw, PHY_REG(769, 16), &phy_reg); in e1000_integrated_phy_loopback() [all …]
|
D | phy.h | 48 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);
|
D | phy.c | 2538 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()
|
D | netdev.c | 6221 u16 phy_reg, wuc_enable; in e1000_init_phy_wakeup() local 6248 hw->phy.ops.read_reg_page(&adapter->hw, BM_RCTL, &phy_reg); in e1000_init_phy_wakeup() 6251 phy_reg |= BM_RCTL_UPE; in e1000_init_phy_wakeup() 6253 phy_reg |= BM_RCTL_MPE; in e1000_init_phy_wakeup() 6254 phy_reg &= ~(BM_RCTL_MO_MASK); in e1000_init_phy_wakeup() 6256 phy_reg |= (((mac_reg & E1000_RCTL_MO_3) >> E1000_RCTL_MO_SHIFT) in e1000_init_phy_wakeup() 6259 phy_reg |= BM_RCTL_BAM; in e1000_init_phy_wakeup() 6261 phy_reg |= BM_RCTL_PMCF; in e1000_init_phy_wakeup() 6264 phy_reg |= BM_RCTL_RFCE; in e1000_init_phy_wakeup() 6265 hw->phy.ops.write_reg_page(&adapter->hw, BM_RCTL, phy_reg); in e1000_init_phy_wakeup()
|
/drivers/usb/phy/ |
D | phy-am335x-control.c | 13 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()
|
/drivers/net/ |
D | sungem_phy.c | 597 u32 phy_reg; in bcm5421_poll_link() local 602 phy_reg = sungem_phy_read(phy, MII_NCONFIG); in bcm5421_poll_link() 604 mode = (phy_reg & BCM5421_MODE_MASK) >> 5; in bcm5421_poll_link() 611 phy_reg = sungem_phy_read(phy, MII_NCONFIG); in bcm5421_poll_link() 613 if (phy_reg & 0x0020) in bcm5421_poll_link() 621 u32 phy_reg; in bcm5421_read_link() local 626 phy_reg = sungem_phy_read(phy, MII_NCONFIG); in bcm5421_read_link() 628 mode = (phy_reg & BCM5421_MODE_MASK ) >> 5; in bcm5421_read_link() 637 phy_reg = sungem_phy_read(phy, MII_NCONFIG); in bcm5421_read_link() 639 if ( (phy_reg & 0x0080) >> 7) in bcm5421_read_link() [all …]
|
/drivers/net/ethernet/intel/e1000/ |
D | e1000_ethtool.c | 1118 u16 phy_reg; in e1000_phy_reset_clk_and_crs() local 1124 e1000_read_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, &phy_reg); in e1000_phy_reset_clk_and_crs() 1125 phy_reg |= M88E1000_EPSCR_TX_CLK_25; in e1000_phy_reset_clk_and_crs() 1126 e1000_write_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, phy_reg); in e1000_phy_reset_clk_and_crs() 1132 e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_reg); in e1000_phy_reset_clk_and_crs() 1133 phy_reg |= M88E1000_PSCR_ASSERT_CRS_ON_TX; in e1000_phy_reset_clk_and_crs() 1134 e1000_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_reg); in e1000_phy_reset_clk_and_crs() 1141 u16 phy_reg; in e1000_nonintegrated_phy_loopback() local 1155 e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_reg); in e1000_nonintegrated_phy_loopback() 1160 phy_reg &= ~M88E1000_PSCR_AUTO_X_MODE; in e1000_nonintegrated_phy_loopback() [all …]
|
/drivers/net/ethernet/realtek/ |
D | r8169_phy_config.c | 53 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[] = { 541 static const struct phy_reg phy_reg_init[] = { in rtl8168e_1_hw_phy_config() [all …]
|
/drivers/net/phy/ |
D | phy_device.c | 723 int phy_reg; in get_phy_c45_devs_in_pkg() local 725 phy_reg = mdiobus_c45_read(bus, addr, dev_addr, MDIO_DEVS2); in get_phy_c45_devs_in_pkg() 726 if (phy_reg < 0) in get_phy_c45_devs_in_pkg() 728 *devices_in_package = phy_reg << 16; in get_phy_c45_devs_in_pkg() 730 phy_reg = mdiobus_c45_read(bus, addr, dev_addr, MDIO_DEVS1); in get_phy_c45_devs_in_pkg() 731 if (phy_reg < 0) in get_phy_c45_devs_in_pkg() 733 *devices_in_package |= phy_reg; in get_phy_c45_devs_in_pkg() 756 int i, ret, phy_reg; in get_phy_c45_ids() local 777 phy_reg = get_phy_c45_devs_in_pkg(bus, addr, i, &devs_in_pkg); in get_phy_c45_ids() 778 if (phy_reg < 0) in get_phy_c45_ids() [all …]
|
/drivers/net/usb/ |
D | sr9800.c | 372 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()
|
D | asix_devices.c | 72 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()
|
/drivers/net/ethernet/ti/ |
D | davinci_mdio.c | 375 static int davinci_mdio_read(struct mii_bus *bus, int phy_id, int phy_reg) in davinci_mdio_read() argument 381 if (phy_reg & ~PHY_REG_MASK || phy_id & ~PHY_ID_MASK) in davinci_mdio_read() 388 reg = (USERACCESS_GO | USERACCESS_READ | (phy_reg << 21) | in davinci_mdio_read() 417 int phy_reg, u16 phy_data) in davinci_mdio_write() argument 423 if (phy_reg & ~PHY_REG_MASK || phy_id & ~PHY_ID_MASK) in davinci_mdio_write() 430 reg = (USERACCESS_GO | USERACCESS_WRITE | (phy_reg << 21) | in davinci_mdio_write()
|
/drivers/net/ieee802154/ |
D | mcr20a.c | 1083 unsigned int phy_reg = 0; in mcr20a_phy_init() local 1165 phy_reg = (u8)(((index & DAR_SRC_CTRL_INDEX) << in mcr20a_phy_init() 1169 ret = regmap_write(lp->regmap_dar, DAR_SRC_CTRL, phy_reg); in mcr20a_phy_init() 1172 phy_reg = 0; in mcr20a_phy_init() 1176 ret = regmap_read(lp->regmap_iar, IAR_DUAL_PAN_CTRL, &phy_reg); in mcr20a_phy_init() 1181 phy_reg &= ~IAR_DUAL_PAN_CTRL_DUAL_PAN_SAM_LVL_MSK; in mcr20a_phy_init() 1184 phy_reg |= MCR20A_PHY_INDIRECT_QUEUE_SIZE << in mcr20a_phy_init() 1186 ret = regmap_write(lp->regmap_iar, IAR_DUAL_PAN_CTRL, phy_reg); in mcr20a_phy_init()
|
/drivers/net/dsa/ |
D | rzn1_a5psw.c | 825 static int a5psw_mdio_read(struct mii_bus *bus, int phy_id, int phy_reg) in a5psw_mdio_read() argument 831 if (phy_reg & MII_ADDR_C45) in a5psw_mdio_read() 835 cmd |= FIELD_PREP(A5PSW_MDIO_COMMAND_REG_ADDR, phy_reg); in a5psw_mdio_read() 853 static int a5psw_mdio_write(struct mii_bus *bus, int phy_id, int phy_reg, in a5psw_mdio_write() argument 859 if (phy_reg & MII_ADDR_C45) in a5psw_mdio_write() 862 cmd = FIELD_PREP(A5PSW_MDIO_COMMAND_REG_ADDR, phy_reg); in a5psw_mdio_write()
|
/drivers/net/ethernet/ |
D | lantiq_etop.c | 323 ltq_etop_mdio_wr(struct mii_bus *bus, int phy_addr, int phy_reg, u16 phy_data) in ltq_etop_mdio_wr() argument 327 ((phy_reg & MDIO_REG_MASK) << MDIO_REG_OFFSET) | in ltq_etop_mdio_wr() 337 ltq_etop_mdio_rd(struct mii_bus *bus, int phy_addr, int phy_reg) in ltq_etop_mdio_rd() argument 341 ((phy_reg & MDIO_REG_MASK) << MDIO_REG_OFFSET); in ltq_etop_mdio_rd()
|
/drivers/pinctrl/ti/ |
D | pinctrl-ti-iodelay.c | 747 u32 phy_reg; in ti_iodelay_alloc_pins() local 760 phy_reg = r->reg_start_offset + base_phy; in ti_iodelay_alloc_pins() 762 for (i = 0; i < nr_pins; i++, phy_reg += 4) { in ti_iodelay_alloc_pins()
|
/drivers/net/ethernet/mediatek/ |
D | mtk_eth_soc.c | 213 static int _mtk_mdio_write(struct mtk_eth *eth, u32 phy_addr, u32 phy_reg, in _mtk_mdio_write() argument 222 if (phy_reg & MII_ADDR_C45) { in _mtk_mdio_write() 226 PHY_IAC_REG(mdiobus_c45_devad(phy_reg)) | in _mtk_mdio_write() 228 PHY_IAC_DATA(mdiobus_c45_regad(phy_reg)), in _mtk_mdio_write() 238 PHY_IAC_REG(mdiobus_c45_devad(phy_reg)) | in _mtk_mdio_write() 246 PHY_IAC_REG(phy_reg) | in _mtk_mdio_write() 259 static int _mtk_mdio_read(struct mtk_eth *eth, u32 phy_addr, u32 phy_reg) in _mtk_mdio_read() argument 267 if (phy_reg & MII_ADDR_C45) { in _mtk_mdio_read() 271 PHY_IAC_REG(mdiobus_c45_devad(phy_reg)) | in _mtk_mdio_read() 273 PHY_IAC_DATA(mdiobus_c45_regad(phy_reg)), in _mtk_mdio_read() [all …]
|
/drivers/phy/rockchip/ |
D | phy-rockchip-typec.c | 389 struct phy_reg { struct 394 static struct phy_reg usb3_pll_cfg[] = { argument 411 static struct phy_reg dp_pll_cfg[] = {
|
/drivers/net/ethernet/intel/igb/ |
D | igb_ethtool.c | 1755 u16 phy_reg; in igb_loopback_cleanup() local 1780 igb_read_phy_reg(hw, PHY_CONTROL, &phy_reg); in igb_loopback_cleanup() 1781 if (phy_reg & MII_CR_LOOPBACK) { in igb_loopback_cleanup() 1782 phy_reg &= ~MII_CR_LOOPBACK; in igb_loopback_cleanup() 1783 igb_write_phy_reg(hw, PHY_CONTROL, phy_reg); in igb_loopback_cleanup()
|