Lines Matching full:order
230 static void epu_dma_done(struct cx18 *cx, struct cx18_in_work_order *order) in epu_dma_done() argument
239 mb = &order->mb; in epu_dma_done()
246 (order->flags & CX18_F_EWO_MB_STALE_UPON_RECEIPT) ? in epu_dma_done()
252 mdl_ack = order->mdl_ack; in epu_dma_done()
276 if ((order->flags & CX18_F_EWO_MB_STALE_UPON_RECEIPT) && in epu_dma_done()
323 static void epu_debug(struct cx18 *cx, struct cx18_in_work_order *order) in epu_debug() argument
326 char *str = order->str; in epu_debug()
328 CX18_DEBUG_INFO("%x %s\n", order->mb.args[0], str); in epu_debug()
334 static void epu_cmd(struct cx18 *cx, struct cx18_in_work_order *order) in epu_cmd() argument
336 switch (order->rpu) { in epu_cmd()
339 switch (order->mb.cmd) { in epu_cmd()
341 epu_dma_done(cx, order); in epu_cmd()
344 epu_debug(cx, order); in epu_cmd()
348 order->mb.cmd); in epu_cmd()
355 order->mb.cmd); in epu_cmd()
363 void free_in_work_order(struct cx18 *cx, struct cx18_in_work_order *order) in free_in_work_order() argument
365 atomic_set(&order->pending, 0); in free_in_work_order()
370 struct cx18_in_work_order *order = in cx18_in_work_handler() local
372 struct cx18 *cx = order->cx; in cx18_in_work_handler()
373 epu_cmd(cx, order); in cx18_in_work_handler()
374 free_in_work_order(cx, order); in cx18_in_work_handler()
382 static void mb_ack_irq(struct cx18 *cx, struct cx18_in_work_order *order) in mb_ack_irq() argument
387 switch (order->rpu) { in mb_ack_irq()
398 order->rpu, order->mb.cmd); in mb_ack_irq()
402 req = order->mb.request; in mb_ack_irq()
407 rpu_str[order->rpu], rpu_str[order->rpu], req); in mb_ack_irq()
408 order->flags |= CX18_F_EWO_MB_STALE_WHILE_PROC; in mb_ack_irq()
416 static int epu_dma_done_irq(struct cx18 *cx, struct cx18_in_work_order *order) in epu_dma_done_irq() argument
422 mb = &order->mb; in epu_dma_done_irq()
429 if ((order->flags & CX18_F_EWO_MB_STALE) == 0) in epu_dma_done_irq()
430 mb_ack_irq(cx, order); in epu_dma_done_irq()
435 ((u32 *)order->mdl_ack)[i / sizeof(u32)] = in epu_dma_done_irq()
438 if ((order->flags & CX18_F_EWO_MB_STALE) == 0) in epu_dma_done_irq()
439 mb_ack_irq(cx, order); in epu_dma_done_irq()
444 int epu_debug_irq(struct cx18 *cx, struct cx18_in_work_order *order) in epu_debug_irq() argument
447 char *str = order->str; in epu_debug_irq()
450 str_offset = order->mb.args[1]; in epu_debug_irq()
458 if ((order->flags & CX18_F_EWO_MB_STALE) == 0) in epu_debug_irq()
459 mb_ack_irq(cx, order); in epu_debug_irq()
465 int epu_cmd_irq(struct cx18 *cx, struct cx18_in_work_order *order) in epu_cmd_irq() argument
469 switch (order->rpu) { in epu_cmd_irq()
472 switch (order->mb.cmd) { in epu_cmd_irq()
474 ret = epu_dma_done_irq(cx, order); in epu_cmd_irq()
477 ret = epu_debug_irq(cx, order); in epu_cmd_irq()
481 order->mb.cmd); in epu_cmd_irq()
488 order->mb.cmd); in epu_cmd_irq()
500 struct cx18_in_work_order *order = NULL; in alloc_in_work_order_irq() local
507 * on one, particular work order at a time, per handler thread. in alloc_in_work_order_irq()
512 order = &cx->in_work_order[i]; in alloc_in_work_order_irq()
513 atomic_set(&order->pending, 1); in alloc_in_work_order_irq()
517 return order; in alloc_in_work_order_irq()
524 struct cx18_in_work_order *order; in cx18_api_epu_cmd_irq() local
539 order = alloc_in_work_order_irq(cx); in cx18_api_epu_cmd_irq()
540 if (order == NULL) { in cx18_api_epu_cmd_irq()
541 …CX18_WARN("Unable to find blank work order form to schedule incoming mailbox command processing\n"… in cx18_api_epu_cmd_irq()
545 order->flags = 0; in cx18_api_epu_cmd_irq()
546 order->rpu = rpu; in cx18_api_epu_cmd_irq()
547 order_mb = &order->mb; in cx18_api_epu_cmd_irq()
562 order->flags = CX18_F_EWO_MB_STALE_UPON_RECEIPT; in cx18_api_epu_cmd_irq()
569 submit = epu_cmd_irq(cx, order); in cx18_api_epu_cmd_irq()
571 queue_work(cx->in_work_queue, &order->work); in cx18_api_epu_cmd_irq()