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