diff options
author | Andy Walls <awalls@radix.net> | 2008-11-18 02:48:46 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 12:38:10 +0100 |
commit | d6c7e5f8faad080e75bace5c4f2265e3513e3510 (patch) | |
tree | ec798a9f5644a005432ea3c435c8d563c2cc5abd /drivers/media/video/cx18/cx18-mailbox.c | |
parent | V4L/DVB (9724): cx18: Streamline cx18-io[ch] wrappers and enforce MMIO retry ... (diff) | |
download | linux-d6c7e5f8faad080e75bace5c4f2265e3513e3510.tar.xz linux-d6c7e5f8faad080e75bace5c4f2265e3513e3510.zip |
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.c | 7 |
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) order->flags = 0; order->rpu = rpu; order_mb = &order->mb; - cx18_memcpy_fromio(cx, order_mb, mb, sizeof(struct cx18_mailbox)); + + /* mb->cmd and mb->args[0] through mb->args[2] */ + cx18_memcpy_fromio(cx, &order_mb->cmd, &mb->cmd, 4 * sizeof(u32)); + /* mb->request and mb->ack. N.B. we want to read mb->ack last */ + cx18_memcpy_fromio(cx, &order_mb->request, &mb->request, + 2 * sizeof(u32)); if (order_mb->request == order_mb->ack) { CX18_WARN("Possibly falling behind: %s self-ack'ed our incoming" |