MCPcopy Create free account
hub / github.com/F-Stack/f-stack / txgbe_check_flash_load

Function txgbe_check_flash_load

dpdk/drivers/net/txgbe/base/txgbe_hw.c:3363–3384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3361}
3362
3363static int
3364txgbe_check_flash_load(struct txgbe_hw *hw, u32 check_bit)
3365{
3366 u32 reg = 0;
3367 u32 i;
3368 int err = 0;
3369 /* if there's flash existing */
3370 if (!(rd32(hw, TXGBE_SPISTAT) & TXGBE_SPISTAT_BPFLASH)) {
3371 /* wait hw load flash done */
3372 for (i = 0; i < 10; i++) {
3373 reg = rd32(hw, TXGBE_ILDRSTAT);
3374 if (!(reg & check_bit)) {
3375 /* done */
3376 break;
3377 }
3378 msleep(100);
3379 }
3380 if (i == 10)
3381 err = TXGBE_ERR_FLASH_LOADING_FAILED;
3382 }
3383 return err;
3384}
3385
3386static void
3387txgbe_reset_misc(struct txgbe_hw *hw)

Callers 1

txgbe_reset_hwFunction · 0.85

Calls 1

rd32Function · 0.70

Tested by

no test coverage detected