Lines Matching +full:0 +full:b00001
36 tx_buf[0].buf = &cmd; in lan9250_write_sys_reg()
37 tx_buf[0].len = ARRAY_SIZE(cmd); in lan9250_write_sys_reg()
58 tx_buf[0].buf = &cmd; in lan9250_read_sys_reg()
59 tx_buf[0].len = ARRAY_SIZE(cmd); in lan9250_read_sys_reg()
65 rx_buf[0].buf = NULL; in lan9250_read_sys_reg()
66 rx_buf[0].len = 1; in lan9250_read_sys_reg()
79 int wait_time = 0; in lan9250_wait_ready()
86 return 0; in lan9250_wait_ready()
99 lan9250_wait_ready(dev, LAN9250_MAC_CSR_CMD, LAN9250_MAC_CSR_CMD_BUSY, 0, in lan9250_read_mac_reg()
105 lan9250_wait_ready(dev, LAN9250_MAC_CSR_CMD, LAN9250_MAC_CSR_CMD_BUSY, 0, in lan9250_read_mac_reg()
110 return 0; in lan9250_read_mac_reg()
116 lan9250_wait_ready(dev, LAN9250_MAC_CSR_CMD, LAN9250_MAC_CSR_CMD_BUSY, 0, in lan9250_write_mac_reg()
122 lan9250_wait_ready(dev, LAN9250_MAC_CSR_CMD, LAN9250_MAC_CSR_CMD_BUSY, 0, in lan9250_write_mac_reg()
125 return 0; in lan9250_write_mac_reg()
132 int wait_time = 0; in lan9250_wait_mac_ready()
139 return 0; in lan9250_wait_mac_ready()
151 lan9250_wait_mac_ready(dev, LAN9250_HMAC_MII_ACC, LAN9250_HMAC_MII_ACC_MIIBZY, 0, in lan9250_read_phy_reg()
165 * Where phy_add = 0b00001 & index = address in lan9250_read_phy_reg()
166 * Data = ((phy_add & 0x1F) << 11) | ((index & 0x1F) << 6) in lan9250_read_phy_reg()
168 lan9250_write_mac_reg(dev, LAN9250_HMAC_MII_ACC, (1 << 11) | ((address & 0x1F) << 6)); in lan9250_read_phy_reg()
171 lan9250_wait_mac_ready(dev, LAN9250_HMAC_MII_ACC, LAN9250_HMAC_MII_ACC_MIIBZY, 0, in lan9250_read_phy_reg()
178 return 0; in lan9250_read_phy_reg()
184 lan9250_wait_mac_ready(dev, LAN9250_HMAC_MII_ACC, LAN9250_HMAC_MII_ACC_MIIBZY, 0, in lan9250_write_phy_reg()
199 * Where phy_add = 0b00001 & index = address in lan9250_write_phy_reg()
200 * Data = ((phy_add & 0x1F) << 11) | ((index & 0x1F)<< 6) | MIIWnR in lan9250_write_phy_reg()
203 (1 << 11) | ((address & 0x1F) << 6) | LAN9250_HMAC_MII_ACC_MIIW_R); in lan9250_write_phy_reg()
206 lan9250_wait_mac_ready(dev, LAN9250_HMAC_MII_ACC, LAN9250_HMAC_MII_ACC_MIIBZY, 0, in lan9250_write_phy_reg()
209 return 0; in lan9250_write_phy_reg()
217 ctx->mac_address[0] | (ctx->mac_address[1] << 8) | in lan9250_set_macaddr()
222 return 0; in lan9250_set_macaddr()
232 } while ((tmp & LAN9250_HW_CFG_DEVICE_READY) == 0); in lan9250_hw_cfg_check()
234 return 0; in lan9250_hw_cfg_check()
247 return 0; in lan9250_sw_reset()
277 * LAN_Regwrite32(AFC_CFG, 0x006E3741); in lan9250_configure()
280 lan9250_write_sys_reg(dev, LAN9250_AFC_CFG, 0x006e3741); in lan9250_configure()
309 lan9250_write_sys_reg(dev, LAN9250_RX_CFG, 0x06000000 | 0x00000400); in lan9250_configure()
353 lan9250_write_phy_reg(dev, LAN9250_PHY_SPECIAL_MODES, 0x00E0 | 1); in lan9250_configure()
383 lan9250_write_sys_reg(dev, LAN9250_INT_STS, 0xFFFFFFFF); in lan9250_configure()
403 return 0; in lan9250_configure()
410 uint8_t instr[2] = {(LAN9250_TX_DATA_FIFO >> 8) & 0xFF, (LAN9250_TX_DATA_FIFO & 0xFF)}; in lan9250_write_buf()
414 tx_buf[0].buf = &cmd; in lan9250_write_buf()
415 tx_buf[0].len = ARRAY_SIZE(cmd); in lan9250_write_buf()
428 uint8_t instr[2] = {(LAN9250_RX_DATA_FIFO >> 8) & 0xFF, (LAN9250_RX_DATA_FIFO & 0xFF)}; in lan9250_read_buf()
434 tx_buf[0].buf = &cmd; in lan9250_read_buf()
435 tx_buf[0].len = ARRAY_SIZE(cmd); in lan9250_read_buf()
441 rx_buf[0].buf = NULL; in lan9250_read_buf()
442 rx_buf[0].len = 1; in lan9250_read_buf()
464 pktcnt = (tmp & 0x00ff0000) >> 16; in lan9250_rx()
470 if (pktcnt == 0 || pkt_len == 0) { in lan9250_rx()
471 return 0; in lan9250_rx()
484 pkt = net_pkt_rx_alloc_with_buffer(ctx->iface, pkt_len, AF_UNSPEC, 0, in lan9250_rx()
489 return 0; in lan9250_rx()
508 } while (pkt_len > 0); in lan9250_rx()
514 if (net_recv_data(net_pkt_iface(pkt), pkt) < 0) { in lan9250_rx()
520 return 0; in lan9250_rx()
553 for (int i = 0; i < status_size; i++) { in lan9250_tx()
559 return 0; in lan9250_tx()
586 lan9250_write_sys_reg(context->dev, LAN9250_INT_EN, 0); in lan9250_thread()
591 if ((int_sts & LAN9250_INT_STS_PHY_INT) != 0) { in lan9250_thread()
604 if ((int_sts & LAN9250_INT_STS_RSFL) != 0) { in lan9250_thread()
696 NULL, K_PRIO_COOP(CONFIG_ETH_LAN9250_RX_THREAD_PRIO), 0, K_NO_WAIT); in lan9250_init()
700 return 0; in lan9250_init()
707 .int_sem = Z_SEM_INITIALIZER(lan9250_##inst##_runtime.int_sem, 0, UINT_MAX), \
711 .spi = SPI_DT_SPEC_INST_GET(inst, SPI_WORD_SET(8), 0), \