• Home
  • Raw
  • Download

Lines Matching refs:phy_addr

32 static int sw_wait_rdy(const char *devname, u8 phy_addr)  in sw_wait_rdy()  argument
41 ret = miiphy_read(devname, phy_addr, COMMAND_REG, &command); in sw_wait_rdy()
56 static int sw_reg_read(const char *devname, u8 phy_addr, u8 port, in sw_reg_read() argument
62 ret = sw_wait_rdy(devname, phy_addr); in sw_reg_read()
69 ret = miiphy_write(devname, phy_addr, COMMAND_REG, command); in sw_reg_read()
73 ret = sw_wait_rdy(devname, phy_addr); in sw_reg_read()
77 ret = miiphy_read(devname, phy_addr, DATA_REG, data); in sw_reg_read()
82 static int sw_reg_write(const char *devname, u8 phy_addr, u8 port, in sw_reg_write() argument
88 ret = sw_wait_rdy(devname, phy_addr); in sw_reg_write()
93 ret = miiphy_write(devname, phy_addr, DATA_REG, data); in sw_reg_write()
100 ret = miiphy_write(devname, phy_addr, COMMAND_REG, value); in sw_reg_write()
104 ret = sw_wait_rdy(devname, phy_addr); in sw_reg_write()
111 static int ppu_enable(const char *devname, u8 phy_addr) in ppu_enable() argument
116 ret = sw_reg_read(devname, phy_addr, GLOBAL, GLOBAL_CTRL, &reg); in ppu_enable()
124 ret = sw_reg_write(devname, phy_addr, GLOBAL, GLOBAL_CTRL, reg); in ppu_enable()
131 sw_reg_read(devname, phy_addr, GLOBAL, GLOBAL_STATUS, in ppu_enable()
141 static int ppu_disable(const char *devname, u8 phy_addr) in ppu_disable() argument
146 ret = sw_reg_read(devname, phy_addr, GLOBAL, GLOBAL_CTRL, &reg); in ppu_disable()
154 ret = sw_reg_write(devname, phy_addr, GLOBAL, GLOBAL_CTRL, reg); in ppu_disable()
161 sw_reg_read(devname, phy_addr, GLOBAL, GLOBAL_STATUS, in ppu_disable()
171 int mv88e_sw_program(const char *devname, u8 phy_addr, in mv88e_sw_program() argument
177 ret = ppu_disable(devname, phy_addr); in mv88e_sw_program()
184 ret = sw_reg_write(devname, phy_addr, regs[i].port, in mv88e_sw_program()
188 ppu_enable(devname, phy_addr); in mv88e_sw_program()
194 ret = ppu_enable(devname, phy_addr); in mv88e_sw_program()
203 int mv88e_sw_reset(const char *devname, u8 phy_addr) in mv88e_sw_reset() argument
208 ret = sw_reg_read(devname, phy_addr, GLOBAL, GLOBAL_CTRL, &reg); in mv88e_sw_reset()
216 ret = sw_reg_write(devname, phy_addr, GLOBAL, GLOBAL_CTRL, reg); in mv88e_sw_reset()
223 sw_reg_read(devname, phy_addr, GLOBAL, GLOBAL_STATUS, in mv88e_sw_reset()