Lines Matching refs:tailptr
39 u32 headptr, tailptr; in retrieve_msg_frame() local
41 tailptr = readl_be(MIXART_MEM(mgr, MSG_OUTBOUND_POST_TAIL)); in retrieve_msg_frame()
44 if (tailptr == headptr) in retrieve_msg_frame()
47 if (tailptr < MSG_OUTBOUND_POST_STACK) in retrieve_msg_frame()
49 if (tailptr >= MSG_OUTBOUND_POST_STACK + MSG_BOUND_STACK_SIZE) in retrieve_msg_frame()
52 *msg_frame = readl_be(MIXART_MEM(mgr, tailptr)); in retrieve_msg_frame()
55 tailptr += 4; in retrieve_msg_frame()
56 if( tailptr >= (MSG_OUTBOUND_POST_STACK+MSG_BOUND_STACK_SIZE) ) in retrieve_msg_frame()
57 tailptr = MSG_OUTBOUND_POST_STACK; in retrieve_msg_frame()
58 writel_be(tailptr, MIXART_MEM(mgr, MSG_OUTBOUND_POST_TAIL)); in retrieve_msg_frame()
138 u32 headptr, tailptr; in send_msg() local
146 tailptr = readl_be(MIXART_MEM(mgr, MSG_INBOUND_FREE_TAIL)); in send_msg()
149 if (tailptr == headptr) { in send_msg()
154 …if( (tailptr < MSG_INBOUND_FREE_STACK) || (tailptr >= (MSG_INBOUND_FREE_STACK+MSG_BOUND_STACK_SIZE… in send_msg()
158 msg_frame_address = readl_be(MIXART_MEM(mgr, tailptr)); in send_msg()
159 writel(0, MIXART_MEM(mgr, tailptr)); /* set address to zero on this fifo position */ in send_msg()
162 tailptr += 4; in send_msg()
163 if( tailptr >= (MSG_INBOUND_FREE_STACK+MSG_BOUND_STACK_SIZE) ) in send_msg()
164 tailptr = MSG_INBOUND_FREE_STACK; in send_msg()
166 writel_be(tailptr, MIXART_MEM(mgr, MSG_INBOUND_FREE_TAIL)); in send_msg()