Lines Matching refs:nhcnt
366 static u32 flexrm_estimate_header_desc_count(u32 nhcnt) in flexrm_estimate_header_desc_count() argument
368 u32 hcnt = nhcnt / HEADER_BDCOUNT_MAX; in flexrm_estimate_header_desc_count()
370 if (!(nhcnt % HEADER_BDCOUNT_MAX)) in flexrm_estimate_header_desc_count()
404 static void flexrm_enqueue_desc(u32 nhpos, u32 nhcnt, u32 reqid, in flexrm_enqueue_desc() argument
412 if (nhcnt <= nhpos) in flexrm_enqueue_desc()
439 if ((nhpos % HEADER_BDCOUNT_MAX == 0) && (nhcnt - nhpos)) { in flexrm_enqueue_desc()
441 nhavail = (nhcnt - nhpos); in flexrm_enqueue_desc()
657 static void *flexrm_spu_write_descs(struct brcm_message *msg, u32 nhcnt, in flexrm_spu_write_descs() argument
675 flexrm_enqueue_desc(nhpos, nhcnt, reqid, in flexrm_spu_write_descs()
691 flexrm_enqueue_desc(nhpos, nhcnt, reqid, in flexrm_spu_write_descs()
766 static void *flexrm_sba_write_descs(struct brcm_message *msg, u32 nhcnt, in flexrm_sba_write_descs() argument
783 flexrm_enqueue_desc(nhpos, nhcnt, reqid, in flexrm_sba_write_descs()
790 flexrm_enqueue_desc(nhpos, nhcnt, reqid, in flexrm_sba_write_descs()
799 flexrm_enqueue_desc(nhpos, nhcnt, reqid, in flexrm_sba_write_descs()
808 flexrm_enqueue_desc(nhpos, nhcnt, reqid, in flexrm_sba_write_descs()
815 flexrm_enqueue_desc(nhpos, nhcnt, reqid, in flexrm_sba_write_descs()
825 flexrm_enqueue_desc(nhpos, nhcnt, reqid, in flexrm_sba_write_descs()
903 static void *flexrm_write_descs(struct brcm_message *msg, u32 nhcnt, in flexrm_write_descs() argument
915 return flexrm_spu_write_descs(msg, nhcnt, reqid, in flexrm_write_descs()
919 return flexrm_sba_write_descs(msg, nhcnt, reqid, in flexrm_write_descs()
991 u32 val, count, nhcnt; in flexrm_new_request() local
1031 nhcnt = flexrm_estimate_nonheader_desc_count(msg); in flexrm_new_request()
1032 count = flexrm_estimate_header_desc_count(nhcnt) + nhcnt + 1; in flexrm_new_request()
1052 next = flexrm_write_descs(msg, nhcnt, reqid, in flexrm_new_request()