Lines Matching refs:nvram_cmd
3230 static int tg3_nvram_exec_cmd(struct tg3 *tp, u32 nvram_cmd) in tg3_nvram_exec_cmd() argument
3234 tw32(NVRAM_CMD, nvram_cmd); in tg3_nvram_exec_cmd()
3383 u32 nvram_cmd; in tg3_nvram_write_block_unbuffered() local
3422 nvram_cmd = NVRAM_CMD_WREN | NVRAM_CMD_GO | NVRAM_CMD_DONE; in tg3_nvram_write_block_unbuffered()
3424 if (tg3_nvram_exec_cmd(tp, nvram_cmd)) in tg3_nvram_write_block_unbuffered()
3430 nvram_cmd = NVRAM_CMD_GO | NVRAM_CMD_DONE | NVRAM_CMD_WR | in tg3_nvram_write_block_unbuffered()
3433 if (tg3_nvram_exec_cmd(tp, nvram_cmd)) in tg3_nvram_write_block_unbuffered()
3437 nvram_cmd = NVRAM_CMD_WREN | NVRAM_CMD_GO | NVRAM_CMD_DONE; in tg3_nvram_write_block_unbuffered()
3439 if (tg3_nvram_exec_cmd(tp, nvram_cmd)) in tg3_nvram_write_block_unbuffered()
3451 nvram_cmd = NVRAM_CMD_GO | NVRAM_CMD_DONE | in tg3_nvram_write_block_unbuffered()
3455 nvram_cmd |= NVRAM_CMD_FIRST; in tg3_nvram_write_block_unbuffered()
3457 nvram_cmd |= NVRAM_CMD_LAST; in tg3_nvram_write_block_unbuffered()
3459 ret = tg3_nvram_exec_cmd(tp, nvram_cmd); in tg3_nvram_write_block_unbuffered()
3467 nvram_cmd = NVRAM_CMD_WRDI | NVRAM_CMD_GO | NVRAM_CMD_DONE; in tg3_nvram_write_block_unbuffered()
3468 tg3_nvram_exec_cmd(tp, nvram_cmd); in tg3_nvram_write_block_unbuffered()
3482 u32 page_off, phy_addr, nvram_cmd; in tg3_nvram_write_block_buffered() local
3492 nvram_cmd = NVRAM_CMD_GO | NVRAM_CMD_DONE | NVRAM_CMD_WR; in tg3_nvram_write_block_buffered()
3495 nvram_cmd |= NVRAM_CMD_FIRST; in tg3_nvram_write_block_buffered()
3497 nvram_cmd |= NVRAM_CMD_LAST; in tg3_nvram_write_block_buffered()
3500 nvram_cmd |= NVRAM_CMD_LAST; in tg3_nvram_write_block_buffered()
3502 if ((nvram_cmd & NVRAM_CMD_FIRST) || in tg3_nvram_write_block_buffered()
3510 (nvram_cmd & NVRAM_CMD_FIRST)) { in tg3_nvram_write_block_buffered()
3520 nvram_cmd |= (NVRAM_CMD_FIRST | NVRAM_CMD_LAST); in tg3_nvram_write_block_buffered()
3523 ret = tg3_nvram_exec_cmd(tp, nvram_cmd); in tg3_nvram_write_block_buffered()