FreeBSD/sys/dev/bxe/bxe.c
/* copy command into DMAE command memory and set DMAE command Go */
copy command into DMAE command memory and set DMAE command Go
copy command into DMAE command memory and set DMAE command Go
void
bxe_post_dmae(struct bxe_softc    *sc,
              struct dmae_cmd *dmae,
              int                 idx)
{
    uint32_t cmd_offset;
    int i;
    cmd_offset = (DMAE_REG_CMD_MEM + (sizeof(struct dmae_cmd) * idx));
    for (i = 0; i < ((sizeof(struct dmae_cmd) / 4)); i++) {
        REG_WR(sc, (cmd_offset + (i * 4)), *(((uint32_t *)dmae) + i));
    }
    REG_WR(sc, dmae_reg_go_c[idx], 1);
}
void bxe_post_dmae ( struct bxe_softc * sc , struct dmae_cmd * dmae , int idx ) { uint32_t cmd_offset ; int i ; cmd_offset = ( DMAE_REG_CMD_MEM + ( sizeof ( struct dmae_cmd ) * idx ) ) ; for ( i = 0 ; i < ( ( sizeof ( struct dmae_cmd ) / 4 ) ) ; i ++ ) { REG_WR ( sc , ( cmd_offset + ( i * 4 ) ) , * ( ( ( uint32_t * ) dmae ) + i ) ) ; } REG_WR ( sc , dmae_reg_go_c [ idx ] , 1 ) ; }
copy command into DMAE command memory and set DMAE command Go
copy command into DMAE command memory and set DMAE command Go