Lines Matching refs:tmp

110 	uint8_t tmp;  in dsa_ksz8xxx_port_link_status()  local
117 dsa_ksz8xxx_read_reg(pdev, KSZ8XXX_STAT2_PORTn(port), &tmp); in dsa_ksz8xxx_port_link_status()
119 return tmp & KSZ8XXX_STAT2_LINK_GOOD; in dsa_ksz8xxx_port_link_status()
136 uint8_t val[2], tmp; in dsa_ksz8xxx_probe() local
141 for (timeout = 100, tmp = 0; in dsa_ksz8xxx_probe()
142 tmp != KSZ8XXX_CHIP_ID0_ID_DEFAULT && timeout > 0; timeout--) { in dsa_ksz8xxx_probe()
143 dsa_ksz8xxx_read_reg(pdev, KSZ8XXX_CHIP_ID0, &tmp); in dsa_ksz8xxx_probe()
266 uint8_t tmp, i; in dsa_ksz8xxx_switch_setup() local
275 dsa_ksz8xxx_read_reg(pdev, KSZ8863_CTRL2_PORTn(i), &tmp); in dsa_ksz8xxx_switch_setup()
276 tmp |= KSZ8863_CTRL2_TRANSMIT_EN; in dsa_ksz8xxx_switch_setup()
277 tmp |= KSZ8863_CTRL2_RECEIVE_EN; in dsa_ksz8xxx_switch_setup()
278 tmp &= ~KSZ8863_CTRL2_LEARNING_DIS; in dsa_ksz8xxx_switch_setup()
279 dsa_ksz8xxx_write_reg(pdev, KSZ8863_CTRL2_PORTn(i), tmp); in dsa_ksz8xxx_switch_setup()
284 dsa_ksz8xxx_read_reg(pdev, KSZ8863_GLOBAL_CTRL1, &tmp); in dsa_ksz8xxx_switch_setup()
285 tmp |= KSZ8863_GLOBAL_CTRL1_TAIL_TAG_EN; in dsa_ksz8xxx_switch_setup()
286 dsa_ksz8xxx_write_reg(pdev, KSZ8863_GLOBAL_CTRL1, tmp); in dsa_ksz8xxx_switch_setup()
289 dsa_ksz8xxx_read_reg(pdev, KSZ8863_GLOBAL_CTRL1, &tmp); in dsa_ksz8xxx_switch_setup()
290 tmp &= ~KSZ8863_GLOBAL_CTRL1_TAIL_TAG_EN; in dsa_ksz8xxx_switch_setup()
291 dsa_ksz8xxx_write_reg(pdev, KSZ8863_GLOBAL_CTRL1, tmp); in dsa_ksz8xxx_switch_setup()
294 dsa_ksz8xxx_read_reg(pdev, KSZ8863_GLOBAL_CTRL2, &tmp); in dsa_ksz8xxx_switch_setup()
295 tmp &= ~KSZ8863_GLOBAL_CTRL2_LEG_MAX_PKT_SIZ_CHK_ENA; in dsa_ksz8xxx_switch_setup()
296 dsa_ksz8xxx_write_reg(pdev, KSZ8863_GLOBAL_CTRL2, tmp); in dsa_ksz8xxx_switch_setup()
305 uint8_t tmp, i; in dsa_ksz8xxx_switch_setup() local
313 dsa_ksz8xxx_read_reg(pdev, KSZ8794_CTRL2_PORTn(i), &tmp); in dsa_ksz8xxx_switch_setup()
314 tmp |= KSZ8794_CTRL2_TRANSMIT_EN; in dsa_ksz8xxx_switch_setup()
315 tmp |= KSZ8794_CTRL2_RECEIVE_EN; in dsa_ksz8xxx_switch_setup()
316 tmp &= ~KSZ8794_CTRL2_LEARNING_DIS; in dsa_ksz8xxx_switch_setup()
317 dsa_ksz8xxx_write_reg(pdev, KSZ8794_CTRL2_PORTn(i), tmp); in dsa_ksz8xxx_switch_setup()
322 dsa_ksz8xxx_read_reg(pdev, KSZ8794_GLOBAL_CTRL10, &tmp); in dsa_ksz8xxx_switch_setup()
323 tmp |= KSZ8794_GLOBAL_CTRL10_TAIL_TAG_EN; in dsa_ksz8xxx_switch_setup()
324 dsa_ksz8xxx_write_reg(pdev, KSZ8794_GLOBAL_CTRL10, tmp); in dsa_ksz8xxx_switch_setup()
327 dsa_ksz8xxx_read_reg(pdev, KSZ8794_GLOBAL_CTRL10, &tmp); in dsa_ksz8xxx_switch_setup()
328 tmp &= ~KSZ8794_GLOBAL_CTRL10_TAIL_TAG_EN; in dsa_ksz8xxx_switch_setup()
329 dsa_ksz8xxx_write_reg(pdev, KSZ8794_GLOBAL_CTRL10, tmp); in dsa_ksz8xxx_switch_setup()
332 dsa_ksz8xxx_read_reg(pdev, KSZ8794_PORT4_IF_CTRL6, &tmp); in dsa_ksz8xxx_switch_setup()
333 LOG_DBG("KSZ8794: CONTROL6: 0x%x port4", tmp); in dsa_ksz8xxx_switch_setup()
335 dsa_ksz8xxx_read_reg(pdev, KSZ8794_PORT4_CTRL2, &tmp); in dsa_ksz8xxx_switch_setup()
336 LOG_DBG("KSZ8794: CONTROL2: 0x%x port4", tmp); in dsa_ksz8xxx_switch_setup()
338 dsa_ksz8xxx_read_reg(pdev, KSZ8794_GLOBAL_CTRL2, &tmp); in dsa_ksz8xxx_switch_setup()
339 tmp |= KSZ8794_GLOBAL_CTRL2_LEG_MAX_PKT_SIZ_CHK_DIS; in dsa_ksz8xxx_switch_setup()
340 dsa_ksz8xxx_write_reg(pdev, KSZ8794_GLOBAL_CTRL2, tmp); in dsa_ksz8xxx_switch_setup()
593 uint8_t tmp, val; in dsa_ksz8794_set_lowspeed_drivestrength() local
630 dsa_ksz8xxx_read_reg(pdev, KSZ8794_GLOBAL_CTRL20, &tmp); in dsa_ksz8794_set_lowspeed_drivestrength()
631 tmp &= ~KSZ8794_GLOBAL_CTRL20_LOWSPEED_MASK; in dsa_ksz8794_set_lowspeed_drivestrength()
632 tmp |= val; in dsa_ksz8794_set_lowspeed_drivestrength()
633 dsa_ksz8xxx_write_reg(pdev, KSZ8794_GLOBAL_CTRL20, tmp); in dsa_ksz8794_set_lowspeed_drivestrength()
634 dsa_ksz8xxx_read_reg(pdev, KSZ8794_GLOBAL_CTRL20, &tmp); in dsa_ksz8794_set_lowspeed_drivestrength()