aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-mailbox.c
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2008-11-17 20:48:46 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 06:38:10 -0500
commitd6c7e5f8faad080e75bace5c4f2265e3513e3510 (patch)
treeec798a9f5644a005432ea3c435c8d563c2cc5abd /drivers/media/video/cx18/cx18-mailbox.c
parent3f75c6161f28e6a17c547daf552c1127c805c5e7 (diff)
V4L/DVB (9725): cx18: Remove unnecessary MMIO accesses in time critical irq handling path
Remove unnecessary MMIO accesses in time critical irq handling path. Also ensured that the mailbox ack field is read in last, so we know for sure if we have a stale mailbox or not on receipt. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-mailbox.c')
-rw-r--r--drivers/media/video/cx18/cx18-mailbox.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/video/cx18/cx18-mailbox.c b/drivers/media/video/cx18/cx18-mailbox.c
index 844a62de6535..e5d4f3112293 100644
--- a/drivers/media/video/cx18/cx18-mailbox.c
+++ b/drivers/media/video/cx18/cx18-mailbox.c
@@ -399,7 +399,12 @@ void cx18_api_epu_cmd_irq(struct cx18 *cx, int rpu)
399 order->flags = 0; 399 order->flags = 0;
400 order->rpu = rpu; 400 order->rpu = rpu;
401 order_mb = &order->mb; 401 order_mb = &order->mb;
402 cx18_memcpy_fromio(cx, order_mb, mb, sizeof(struct cx18_mailbox)); 402
403 /* mb->cmd and mb->args[0] through mb->args[2] */
404 cx18_memcpy_fromio(cx, &order_mb->cmd, &mb->cmd, 4 * sizeof(u32));
405 /* mb->request and mb->ack. N.B. we want to read mb->ack last */
406 cx18_memcpy_fromio(cx, &order_mb->request, &mb->request,
407 2 * sizeof(u32));
403 408
404 if (order_mb->request == order_mb->ack) { 409 if (order_mb->request == order_mb->ack) {
405 CX18_WARN("Possibly falling behind: %s self-ack'ed our incoming" 410 CX18_WARN("Possibly falling behind: %s self-ack'ed our incoming"