Lines Matching refs:dmae
430 static void bnx2x_dp_dmae(struct bnx2x *bp, struct dmae_command *dmae, in bnx2x_dp_dmae() argument
433 u32 src_type = dmae->opcode & DMAE_COMMAND_SRC; in bnx2x_dp_dmae()
435 switch (dmae->opcode & DMAE_COMMAND_DST) { in bnx2x_dp_dmae()
441 dmae->opcode, dmae->src_addr_hi, dmae->src_addr_lo, in bnx2x_dp_dmae()
442 dmae->len, dmae->dst_addr_hi, dmae->dst_addr_lo, in bnx2x_dp_dmae()
443 dmae->comp_addr_hi, dmae->comp_addr_lo, in bnx2x_dp_dmae()
444 dmae->comp_val); in bnx2x_dp_dmae()
449 dmae->opcode, dmae->src_addr_lo >> 2, in bnx2x_dp_dmae()
450 dmae->len, dmae->dst_addr_hi, dmae->dst_addr_lo, in bnx2x_dp_dmae()
451 dmae->comp_addr_hi, dmae->comp_addr_lo, in bnx2x_dp_dmae()
452 dmae->comp_val); in bnx2x_dp_dmae()
459 dmae->opcode, dmae->src_addr_hi, dmae->src_addr_lo, in bnx2x_dp_dmae()
460 dmae->len, dmae->dst_addr_lo >> 2, in bnx2x_dp_dmae()
461 dmae->comp_addr_hi, dmae->comp_addr_lo, in bnx2x_dp_dmae()
462 dmae->comp_val); in bnx2x_dp_dmae()
467 dmae->opcode, dmae->src_addr_lo >> 2, in bnx2x_dp_dmae()
468 dmae->len, dmae->dst_addr_lo >> 2, in bnx2x_dp_dmae()
469 dmae->comp_addr_hi, dmae->comp_addr_lo, in bnx2x_dp_dmae()
470 dmae->comp_val); in bnx2x_dp_dmae()
478 dmae->opcode, dmae->src_addr_hi, dmae->src_addr_lo, in bnx2x_dp_dmae()
479 dmae->len, dmae->comp_addr_hi, dmae->comp_addr_lo, in bnx2x_dp_dmae()
480 dmae->comp_val); in bnx2x_dp_dmae()
486 dmae->opcode, dmae->src_addr_lo >> 2, in bnx2x_dp_dmae()
487 dmae->len, dmae->comp_addr_hi, dmae->comp_addr_lo, in bnx2x_dp_dmae()
488 dmae->comp_val); in bnx2x_dp_dmae()
502 void bnx2x_post_dmae(struct bnx2x *bp, struct dmae_command *dmae, int idx) in bnx2x_post_dmae() argument
509 REG_WR(bp, cmd_offset + i*4, *(((u32 *)dmae) + i)); in bnx2x_post_dmae()
512 idx, i, cmd_offset + i*4, *(((u32 *)dmae) + i)); in bnx2x_post_dmae()
554 struct dmae_command *dmae, in bnx2x_prep_dmae_with_comp() argument
557 memset(dmae, 0, sizeof(struct dmae_command)); in bnx2x_prep_dmae_with_comp()
560 dmae->opcode = bnx2x_dmae_opcode(bp, src_type, dst_type, in bnx2x_prep_dmae_with_comp()
564 dmae->comp_addr_lo = U64_LO(bnx2x_sp_mapping(bp, wb_comp)); in bnx2x_prep_dmae_with_comp()
565 dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, wb_comp)); in bnx2x_prep_dmae_with_comp()
566 dmae->comp_val = DMAE_COMP_VAL; in bnx2x_prep_dmae_with_comp()
571 struct dmae_command *dmae) in bnx2x_issue_dmae_with_comp() argument
588 bnx2x_post_dmae(bp, dmae, INIT_DMAE_C(bp)); in bnx2x_issue_dmae_with_comp()
620 struct dmae_command dmae; in bnx2x_write_dmae() local
632 bnx2x_prep_dmae_with_comp(bp, &dmae, DMAE_SRC_PCI, DMAE_DST_GRC); in bnx2x_write_dmae()
635 dmae.src_addr_lo = U64_LO(dma_addr); in bnx2x_write_dmae()
636 dmae.src_addr_hi = U64_HI(dma_addr); in bnx2x_write_dmae()
637 dmae.dst_addr_lo = dst_addr >> 2; in bnx2x_write_dmae()
638 dmae.dst_addr_hi = 0; in bnx2x_write_dmae()
639 dmae.len = len32; in bnx2x_write_dmae()
641 bnx2x_dp_dmae(bp, &dmae, BNX2X_MSG_OFF); in bnx2x_write_dmae()
644 bnx2x_issue_dmae_with_comp(bp, &dmae); in bnx2x_write_dmae()
649 struct dmae_command dmae; in bnx2x_read_dmae() local
663 bnx2x_prep_dmae_with_comp(bp, &dmae, DMAE_SRC_GRC, DMAE_DST_PCI); in bnx2x_read_dmae()
666 dmae.src_addr_lo = src_addr >> 2; in bnx2x_read_dmae()
667 dmae.src_addr_hi = 0; in bnx2x_read_dmae()
668 dmae.dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, wb_data)); in bnx2x_read_dmae()
669 dmae.dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, wb_data)); in bnx2x_read_dmae()
670 dmae.len = len32; in bnx2x_read_dmae()
672 bnx2x_dp_dmae(bp, &dmae, BNX2X_MSG_OFF); in bnx2x_read_dmae()
675 bnx2x_issue_dmae_with_comp(bp, &dmae); in bnx2x_read_dmae()