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