Lines Matching refs:order
231 static void epu_dma_done(struct cx18 *cx, struct cx18_in_work_order *order) in epu_dma_done() argument
240 mb = &order->mb; in epu_dma_done()
247 (order->flags & CX18_F_EWO_MB_STALE_UPON_RECEIPT) ? in epu_dma_done()
253 mdl_ack = order->mdl_ack; in epu_dma_done()
277 if ((order->flags & CX18_F_EWO_MB_STALE_UPON_RECEIPT) && in epu_dma_done()
324 static void epu_debug(struct cx18 *cx, struct cx18_in_work_order *order) in epu_debug() argument
327 char *str = order->str; in epu_debug()
329 CX18_DEBUG_INFO("%x %s\n", order->mb.args[0], str); in epu_debug()
335 static void epu_cmd(struct cx18 *cx, struct cx18_in_work_order *order) in epu_cmd() argument
337 switch (order->rpu) { in epu_cmd()
340 switch (order->mb.cmd) { in epu_cmd()
342 epu_dma_done(cx, order); in epu_cmd()
345 epu_debug(cx, order); in epu_cmd()
349 order->mb.cmd); in epu_cmd()
356 order->mb.cmd); in epu_cmd()
364 void free_in_work_order(struct cx18 *cx, struct cx18_in_work_order *order) in free_in_work_order() argument
366 atomic_set(&order->pending, 0); in free_in_work_order()
371 struct cx18_in_work_order *order = in cx18_in_work_handler() local
373 struct cx18 *cx = order->cx; in cx18_in_work_handler()
374 epu_cmd(cx, order); in cx18_in_work_handler()
375 free_in_work_order(cx, order); in cx18_in_work_handler()
383 static void mb_ack_irq(struct cx18 *cx, struct cx18_in_work_order *order) in mb_ack_irq() argument
388 switch (order->rpu) { in mb_ack_irq()
399 order->rpu, order->mb.cmd); in mb_ack_irq()
403 req = order->mb.request; in mb_ack_irq()
408 rpu_str[order->rpu], rpu_str[order->rpu], req); in mb_ack_irq()
409 order->flags |= CX18_F_EWO_MB_STALE_WHILE_PROC; in mb_ack_irq()
417 static int epu_dma_done_irq(struct cx18 *cx, struct cx18_in_work_order *order) in epu_dma_done_irq() argument
423 mb = &order->mb; in epu_dma_done_irq()
430 if ((order->flags & CX18_F_EWO_MB_STALE) == 0) in epu_dma_done_irq()
431 mb_ack_irq(cx, order); in epu_dma_done_irq()
436 ((u32 *)order->mdl_ack)[i / sizeof(u32)] = in epu_dma_done_irq()
439 if ((order->flags & CX18_F_EWO_MB_STALE) == 0) in epu_dma_done_irq()
440 mb_ack_irq(cx, order); in epu_dma_done_irq()
445 int epu_debug_irq(struct cx18 *cx, struct cx18_in_work_order *order) in epu_debug_irq() argument
448 char *str = order->str; in epu_debug_irq()
451 str_offset = order->mb.args[1]; in epu_debug_irq()
459 if ((order->flags & CX18_F_EWO_MB_STALE) == 0) in epu_debug_irq()
460 mb_ack_irq(cx, order); in epu_debug_irq()
466 int epu_cmd_irq(struct cx18 *cx, struct cx18_in_work_order *order) in epu_cmd_irq() argument
470 switch (order->rpu) { in epu_cmd_irq()
473 switch (order->mb.cmd) { in epu_cmd_irq()
475 ret = epu_dma_done_irq(cx, order); in epu_cmd_irq()
478 ret = epu_debug_irq(cx, order); in epu_cmd_irq()
482 order->mb.cmd); in epu_cmd_irq()
489 order->mb.cmd); in epu_cmd_irq()
501 struct cx18_in_work_order *order = NULL; in alloc_in_work_order_irq() local
513 order = &cx->in_work_order[i]; in alloc_in_work_order_irq()
514 atomic_set(&order->pending, 1); in alloc_in_work_order_irq()
518 return order; in alloc_in_work_order_irq()
525 struct cx18_in_work_order *order; in cx18_api_epu_cmd_irq() local
540 order = alloc_in_work_order_irq(cx); in cx18_api_epu_cmd_irq()
541 if (order == NULL) { in cx18_api_epu_cmd_irq()
546 order->flags = 0; in cx18_api_epu_cmd_irq()
547 order->rpu = rpu; in cx18_api_epu_cmd_irq()
548 order_mb = &order->mb; in cx18_api_epu_cmd_irq()
563 order->flags = CX18_F_EWO_MB_STALE_UPON_RECEIPT; in cx18_api_epu_cmd_irq()
570 submit = epu_cmd_irq(cx, order); in cx18_api_epu_cmd_irq()
572 queue_work(cx->in_work_queue, &order->work); in cx18_api_epu_cmd_irq()