/drivers/net/phy/ |
D | mdio-octeon.c | 150 int phy_id, int regnum) in octeon_mdiobus_c45_addr() argument 159 smi_wr.s.dat = regnum & 0xffff; in octeon_mdiobus_c45_addr() 162 regnum = (regnum >> 16) & 0x1f; in octeon_mdiobus_c45_addr() 167 smi_cmd.s.reg_adr = regnum; in octeon_mdiobus_c45_addr() 183 static int octeon_mdiobus_read(struct mii_bus *bus, int phy_id, int regnum) in octeon_mdiobus_read() argument 191 if (regnum & MII_ADDR_C45) { in octeon_mdiobus_read() 192 int r = octeon_mdiobus_c45_addr(p, phy_id, regnum); in octeon_mdiobus_read() 196 regnum = (regnum >> 16) & 0x1f; in octeon_mdiobus_read() 206 smi_cmd.s.reg_adr = regnum; in octeon_mdiobus_read() 224 int regnum, u16 val) in octeon_mdiobus_write() argument [all …]
|
D | mdio_bus.c | 394 int mdiobus_read_nested(struct mii_bus *bus, int addr, u32 regnum) in mdiobus_read_nested() argument 401 retval = bus->read(bus, addr, regnum); in mdiobus_read_nested() 418 int mdiobus_read(struct mii_bus *bus, int addr, u32 regnum) in mdiobus_read() argument 425 retval = bus->read(bus, addr, regnum); in mdiobus_read() 446 int mdiobus_write_nested(struct mii_bus *bus, int addr, u32 regnum, u16 val) in mdiobus_write_nested() argument 453 err = bus->write(bus, addr, regnum, val); in mdiobus_write_nested() 471 int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val) in mdiobus_write() argument 478 err = bus->write(bus, addr, regnum, val); in mdiobus_write()
|
D | mdio-moxart.c | 37 static int moxart_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in moxart_mdio_read() argument 46 ((regnum << 21) & REGAD_MASK); in moxart_mdio_read() 66 int regnum, u16 value) in moxart_mdio_write() argument 75 ((regnum << 21) & REGAD_MASK); in moxart_mdio_write()
|
D | mdio-sun4i.c | 39 static int sun4i_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in sun4i_mdio_read() argument 46 writel((mii_id << 8) | regnum, data->membase + EMAC_MAC_MADR_REG); in sun4i_mdio_read() 66 static int sun4i_mdio_write(struct mii_bus *bus, int mii_id, int regnum, in sun4i_mdio_write() argument 73 writel((mii_id << 8) | regnum, data->membase + EMAC_MAC_MADR_REG); in sun4i_mdio_write()
|
D | micrel.c | 124 u32 regnum, u16 val) in kszphy_extended_write() argument 126 phy_write(phydev, MII_KSZPHY_EXTREG, KSZPHY_EXTREG_WRITE | regnum); in kszphy_extended_write() 131 u32 regnum) in kszphy_extended_read() argument 133 phy_write(phydev, MII_KSZPHY_EXTREG, regnum); in kszphy_extended_read() 401 u8 mode, u32 dev_addr, u32 regnum, u16 val) in ksz9031_extended_write() argument 404 phy_write(phydev, MII_KSZ9031RN_MMD_REGDATA_REG, regnum); in ksz9031_extended_write() 410 u8 mode, u32 dev_addr, u32 regnum) in ksz9031_extended_read() argument 413 phy_write(phydev, MII_KSZ9031RN_MMD_REGDATA_REG, regnum); in ksz9031_extended_read() 581 int regnum) in ksz9021_rd_mmd_phyreg() argument 591 int regnum, u32 val) in ksz9021_wr_mmd_phyreg() argument
|
D | mdio-mux.c | 43 static int mdio_mux_read(struct mii_bus *bus, int phy_id, int regnum) in mdio_mux_read() argument 62 r = pb->mii_bus->read(pb->mii_bus, phy_id, regnum); in mdio_mux_read() 73 int regnum, u16 val) in mdio_mux_write() argument 87 r = pb->mii_bus->write(pb->mii_bus, phy_id, regnum, val); in mdio_mux_write()
|
D | bcm87xx.c | 61 u32 regnum = MII_ADDR_C45 | (devid << 16) | reg; in bcm87xx_of_reg_init() local 64 val = phy_read(phydev, regnum); in bcm87xx_of_reg_init() 73 ret = phy_write(phydev, regnum, val); in bcm87xx_of_reg_init()
|
/drivers/net/ethernet/freescale/ |
D | xgmac_mdio.c | 129 static int xgmac_mdio_write(struct mii_bus *bus, int phy_id, int regnum, u16 value) in xgmac_mdio_write() argument 139 if (regnum & MII_ADDR_C45) { in xgmac_mdio_write() 141 dev_addr = (regnum >> 16) & 0x1f; in xgmac_mdio_write() 145 dev_addr = regnum & 0x1f; in xgmac_mdio_write() 160 if (regnum & MII_ADDR_C45) { in xgmac_mdio_write() 161 xgmac_write32(regnum & 0xffff, ®s->mdio_addr, endian); in xgmac_mdio_write() 183 static int xgmac_mdio_read(struct mii_bus *bus, int phy_id, int regnum) in xgmac_mdio_read() argument 195 if (regnum & MII_ADDR_C45) { in xgmac_mdio_read() 196 dev_addr = (regnum >> 16) & 0x1f; in xgmac_mdio_read() 199 dev_addr = regnum & 0x1f; in xgmac_mdio_read() [all …]
|
D | fsl_pq_mdio.c | 102 static int fsl_pq_mdio_write(struct mii_bus *bus, int mii_id, int regnum, in fsl_pq_mdio_write() argument 110 iowrite32be((mii_id << 8) | regnum, ®s->miimadd); in fsl_pq_mdio_write() 135 static int fsl_pq_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in fsl_pq_mdio_read() argument 143 iowrite32be((mii_id << 8) | regnum, ®s->miimadd); in fsl_pq_mdio_read() 163 dev_dbg(&bus->dev, "read %04x from address %x/%x\n", value, mii_id, regnum); in fsl_pq_mdio_read()
|
/drivers/staging/rdma/ipath/ |
D | ipath_eeprom.c | 1029 static int ipath_tempsense_internal_read(struct ipath_devdata *dd, u8 regnum) in ipath_tempsense_internal_read() argument 1052 ret = wr_byte(dd, regnum); in ipath_tempsense_internal_read() 1056 regnum); in ipath_tempsense_internal_read() 1085 int ipath_tempsense_read(struct ipath_devdata *dd, u8 regnum) in ipath_tempsense_read() argument 1089 if (regnum > 7) in ipath_tempsense_read() 1093 if (!((1 << regnum) & VALID_TS_RD_REG_MASK)) in ipath_tempsense_read() 1098 ret = ipath_tempsense_internal_read(dd, regnum); in ipath_tempsense_read() 1112 u8 regnum, u8 data) in ipath_tempsense_internal_write() argument 1132 ret = wr_byte(dd, regnum); in ipath_tempsense_internal_write() 1136 regnum); in ipath_tempsense_internal_write() [all …]
|
/drivers/net/dsa/ |
D | mv88e6131.c | 138 mv88e6131_phy_read(struct dsa_switch *ds, int port, int regnum) in mv88e6131_phy_read() argument 145 return mv88e6xxx_phy_read_ppu(ds, addr, regnum); in mv88e6131_phy_read() 150 int port, int regnum, u16 val) in mv88e6131_phy_write() argument 157 return mv88e6xxx_phy_write_ppu(ds, addr, regnum, val); in mv88e6131_phy_write()
|
D | mv88e6xxx.h | 440 int mv88e6xxx_phy_read(struct dsa_switch *ds, int port, int regnum); 441 int mv88e6xxx_phy_write(struct dsa_switch *ds, int port, int regnum, u16 val); 442 int mv88e6xxx_phy_read_indirect(struct dsa_switch *ds, int port, int regnum); 443 int mv88e6xxx_phy_write_indirect(struct dsa_switch *ds, int port, int regnum, 446 int mv88e6xxx_phy_read_ppu(struct dsa_switch *ds, int addr, int regnum); 448 int regnum, u16 val); 465 int mv88e6xxx_phy_read_indirect(struct dsa_switch *ds, int addr, int regnum); 466 int mv88e6xxx_phy_write_indirect(struct dsa_switch *ds, int addr, int regnum,
|
D | mv88e6060.c | 212 static int mv88e6060_phy_read(struct dsa_switch *ds, int port, int regnum) in mv88e6060_phy_read() argument 220 return reg_read(ds, addr, regnum); in mv88e6060_phy_read() 224 mv88e6060_phy_write(struct dsa_switch *ds, int port, int regnum, u16 val) in mv88e6060_phy_write() argument 232 return reg_write(ds, addr, regnum, val); in mv88e6060_phy_write()
|
D | mv88e6xxx.c | 220 static int _mv88e6xxx_phy_read(struct dsa_switch *ds, int addr, int regnum) in _mv88e6xxx_phy_read() argument 223 return _mv88e6xxx_reg_read(ds, addr, regnum); in _mv88e6xxx_phy_read() 227 static int _mv88e6xxx_phy_write(struct dsa_switch *ds, int addr, int regnum, in _mv88e6xxx_phy_write() argument 231 return _mv88e6xxx_reg_write(ds, addr, regnum, val); in _mv88e6xxx_phy_write() 345 int mv88e6xxx_phy_read_ppu(struct dsa_switch *ds, int addr, int regnum) in mv88e6xxx_phy_read_ppu() argument 351 ret = mv88e6xxx_reg_read(ds, addr, regnum); in mv88e6xxx_phy_read_ppu() 359 int regnum, u16 val) in mv88e6xxx_phy_write_ppu() argument 365 ret = mv88e6xxx_reg_write(ds, addr, regnum, val); in mv88e6xxx_phy_write_ppu() 856 int regnum) in _mv88e6xxx_phy_read_indirect() argument 862 regnum); in _mv88e6xxx_phy_read_indirect() [all …]
|
D | bcm_sf2.c | 1077 int regnum, u16 val) in bcm_sf2_sw_indir_rw() argument 1093 reg = 0x80 << 8 | regnum << 1; in bcm_sf2_sw_indir_rw() 1108 static int bcm_sf2_sw_phy_read(struct dsa_switch *ds, int addr, int regnum) in bcm_sf2_sw_phy_read() argument 1116 return bcm_sf2_sw_indir_rw(ds, 1, addr, regnum, 0); in bcm_sf2_sw_phy_read() 1122 static int bcm_sf2_sw_phy_write(struct dsa_switch *ds, int addr, int regnum, in bcm_sf2_sw_phy_write() argument 1131 bcm_sf2_sw_indir_rw(ds, 0, addr, regnum, val); in bcm_sf2_sw_phy_write()
|
/drivers/net/ethernet/hisilicon/ |
D | hns_mdio.c | 224 int phy_id, int regnum, u16 data) in hns_mdio_write() argument 228 u8 devad = ((regnum >> 16) & 0x1f); in hns_mdio_write() 229 u8 is_c45 = !!(regnum & MII_ADDR_C45); in hns_mdio_write() 230 u16 reg = (u16)(regnum & 0xffff); in hns_mdio_write() 286 static int hns_mdio_read(struct mii_bus *bus, int phy_id, int regnum) in hns_mdio_read() argument 290 u8 devad = ((regnum >> 16) & 0x1f); in hns_mdio_read() 291 u8 is_c45 = !!(regnum & MII_ADDR_C45); in hns_mdio_read() 292 u16 reg = (u16)(regnum & 0xffff); in hns_mdio_read()
|
/drivers/net/usb/ |
D | net1080.c | 108 nc_vendor_read(struct usbnet *dev, u8 req, u8 regnum, u16 *retval_ptr) in nc_vendor_read() argument 113 0, regnum, retval_ptr, in nc_vendor_read() 123 nc_register_read(struct usbnet *dev, u8 regnum, u16 *retval_ptr) in nc_register_read() argument 125 return nc_vendor_read(dev, REQUEST_REGISTER, regnum, retval_ptr); in nc_register_read() 130 nc_vendor_write(struct usbnet *dev, u8 req, u8 regnum, u16 value) in nc_vendor_write() argument 134 value, regnum, NULL, 0); in nc_vendor_write() 138 nc_register_write(struct usbnet *dev, u8 regnum, u16 value) in nc_register_write() argument 140 nc_vendor_write(dev, REQUEST_REGISTER, regnum, value); in nc_register_write()
|
D | ax88172a.c | 41 static int asix_mdio_bus_read(struct mii_bus *bus, int phy_id, int regnum) in asix_mdio_bus_read() argument 44 regnum); in asix_mdio_bus_read() 47 static int asix_mdio_bus_write(struct mii_bus *bus, int phy_id, int regnum, in asix_mdio_bus_write() argument 50 asix_mdio_write(((struct usbnet *)bus->priv)->net, phy_id, regnum, val); in asix_mdio_bus_write()
|
/drivers/net/ethernet/marvell/ |
D | mvmdio.c | 113 int regnum) in orion_mdio_read() argument 126 (regnum << MVMDIO_SMI_PHY_REG_SHIFT) | in orion_mdio_read() 148 int regnum, u16 value) in orion_mdio_write() argument 160 (regnum << MVMDIO_SMI_PHY_REG_SHIFT) | in orion_mdio_write()
|
/drivers/staging/netlogic/ |
D | xlr_net.c | 648 static int xlr_phy_write(u32 *base_addr, int phy_addr, int regnum, u16 val) in xlr_phy_write() argument 658 xlr_nae_wreg(base_addr, R_MII_MGMT_ADDRESS, (phy_addr << 8) | regnum); in xlr_phy_write() 678 static int xlr_phy_read(u32 *base_addr, int phy_addr, int regnum) in xlr_phy_read() argument 690 (phy_addr << 8) | (regnum << 0)); in xlr_phy_read() 715 static int xlr_mii_write(struct mii_bus *bus, int phy_addr, int regnum, u16 val) in xlr_mii_write() argument 720 ret = xlr_phy_write(priv->mii_addr, phy_addr, regnum, val); in xlr_mii_write() 722 phy_addr, regnum, val, ret); in xlr_mii_write() 726 static int xlr_mii_read(struct mii_bus *bus, int phy_addr, int regnum) in xlr_mii_read() argument 731 ret = xlr_phy_read(priv->mii_addr, phy_addr, regnum); in xlr_mii_read() 733 phy_addr, regnum, ret); in xlr_mii_read()
|
/drivers/net/ethernet/ |
D | dnet.c | 102 static int dnet_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in dnet_mdio_read() argument 113 regnum &= 0x1f; in dnet_mdio_read() 117 value |= regnum; in dnet_mdio_read() 129 pr_debug("mdio_read %02x:%02x <- %04x\n", mii_id, regnum, value); in dnet_mdio_read() 134 static int dnet_mdio_write(struct mii_bus *bus, int mii_id, int regnum, in dnet_mdio_write() argument 140 pr_debug("mdio_write %02x:%02x <- %04x\n", mii_id, regnum, value); in dnet_mdio_write() 151 regnum &= 0x1f; in dnet_mdio_write() 158 tmp |= regnum; in dnet_mdio_write()
|
/drivers/video/fbdev/core/ |
D | svgalib.c | 27 while (regset->regnum != VGA_REGSET_END_VAL) { in svga_wcrt_multi() 28 regval = vga_rcrt(regbase, regset->regnum); in svga_wcrt_multi() 37 vga_wcrt(regbase, regset->regnum, regval); in svga_wcrt_multi() 47 while (regset->regnum != VGA_REGSET_END_VAL) { in svga_wseq_multi() 48 regval = vga_rseq(regbase, regset->regnum); in svga_wseq_multi() 57 vga_wseq(regbase, regset->regnum, regval); in svga_wseq_multi() 66 while (regset->regnum != VGA_REGSET_END_VAL) { in svga_regset_size()
|
/drivers/mfd/ |
D | menelaus.c | 856 static int time_to_menelaus(struct rtc_time *t, int regnum) in time_to_menelaus() argument 860 status = menelaus_write_reg(regnum++, bin2bcd(t->tm_sec)); in time_to_menelaus() 864 status = menelaus_write_reg(regnum++, bin2bcd(t->tm_min)); in time_to_menelaus() 876 status = menelaus_write_reg(regnum++, hour); in time_to_menelaus() 880 status = menelaus_write_reg(regnum++, bin2bcd(t->tm_mday)); in time_to_menelaus() 884 status = menelaus_write_reg(regnum++, bin2bcd(t->tm_mon + 1)); in time_to_menelaus() 888 status = menelaus_write_reg(regnum++, bin2bcd(t->tm_year - 100)); in time_to_menelaus() 895 --regnum, status); in time_to_menelaus()
|
/drivers/video/fbdev/ |
D | cirrusfb.c | 383 int regnum, unsigned char val); 384 static unsigned char RGen(const struct cirrusfb_info *cinfo, int regnum); 389 static void WClut(struct cirrusfb_info *cinfo, unsigned char regnum, 392 static void RClut(struct cirrusfb_info *cinfo, unsigned char regnum, 2409 int regnum, unsigned char val) in WGen() argument 2417 if (regnum == VGA_PEL_IR || regnum == VGA_PEL_D) in WGen() 2421 vga_w(cinfo->regbase, regofs + regnum, val); in WGen() 2425 static unsigned char RGen(const struct cirrusfb_info *cinfo, int regnum) in RGen() argument 2433 if (regnum == VGA_PEL_IR || regnum == VGA_PEL_D) in RGen() 2437 return vga_r(cinfo->regbase, regofs + regnum); in RGen() [all …]
|
/drivers/net/ethernet/apm/xgene/ |
D | xgene_enet_hw.c | 689 static int xgene_enet_mdio_read(struct mii_bus *bus, int mii_id, int regnum) in xgene_enet_mdio_read() argument 694 val = xgene_mii_phy_read(pdata, mii_id, regnum); in xgene_enet_mdio_read() 696 mii_id, regnum, val); in xgene_enet_mdio_read() 701 static int xgene_enet_mdio_write(struct mii_bus *bus, int mii_id, int regnum, in xgene_enet_mdio_write() argument 707 mii_id, regnum, val); in xgene_enet_mdio_write() 708 return xgene_mii_phy_write(pdata, mii_id, regnum, val); in xgene_enet_mdio_write()
|