From c2343663850d8931f75a7dfe4317c62732c6fce1 Mon Sep 17 00:00:00 2001 From: Andy Walls Date: Sat, 15 Nov 2008 23:38:19 -0500 Subject: cx18: Major rewrite of interrupt handling for incoming mailbox processing From: Andy Walls A major rewrite of interrupt handling for incoming mailbox processing, to split the timing critical steps from the the deferrable steps as the sending XPU on the CX23418 will time out and overwrite our incoming mailboxes rather quickly. Setup a pool of work "order forms" for the irq handler to send jobs to the new work handler routine which uses the kernel default work queue to do the deferrable work. Started optimizing some of the cx18-io calls as they are now the low hanging fruit for recoving microseconds back from the timeline. Future optimizations will get rid of mmio read retries, mmio stats logging, and combine smaller functions in the irq path into the larger ones to save ~2 us each. Priority: normal Signed-off-by: Andy Walls --- linux/drivers/media/video/cx18/cx18-firmware.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'linux/drivers/media/video/cx18/cx18-firmware.c') diff --git a/linux/drivers/media/video/cx18/cx18-firmware.c b/linux/drivers/media/video/cx18/cx18-firmware.c index d9c5f55ab..fdea4b752 100644 --- a/linux/drivers/media/video/cx18/cx18-firmware.c +++ b/linux/drivers/media/video/cx18/cx18-firmware.c @@ -121,6 +121,7 @@ static int load_cpu_fw_direct(const char *fn, u8 __iomem *mem, struct cx18 *cx) if (cx18_raw_readl(cx, dst) != *src) { CX18_ERR("Mismatch at offset %x\n", i); release_firmware(fw); + cx18_setup_page(cx, 0); return -EIO; } dst++; @@ -131,6 +132,7 @@ static int load_cpu_fw_direct(const char *fn, u8 __iomem *mem, struct cx18 *cx) CX18_INFO("loaded %s firmware (%zd bytes)\n", fn, fw->size); size = fw->size; release_firmware(fw); + cx18_setup_page(cx, SCB_OFFSET); return size; } @@ -150,6 +152,7 @@ static int load_apu_fw_direct(const char *fn, u8 __iomem *dst, struct cx18 *cx, if (request_firmware(&fw, fn, &cx->dev->dev)) { CX18_ERR("unable to open firmware %s\n", fn); CX18_ERR("did you put the firmware in the hotplug firmware directory?\n"); + cx18_setup_page(cx, 0); return -ENOMEM; } @@ -185,6 +188,7 @@ static int load_apu_fw_direct(const char *fn, u8 __iomem *dst, struct cx18 *cx, CX18_ERR("Mismatch at offset %x\n", offset + j); release_firmware(fw); + cx18_setup_page(cx, 0); return -EIO; } } @@ -196,6 +200,7 @@ static int load_apu_fw_direct(const char *fn, u8 __iomem *dst, struct cx18 *cx, fn, apu_version, fw->size); size = fw->size; release_firmware(fw); + cx18_setup_page(cx, 0); return size; } -- cgit v1.2.3 From 7dacf773190ee5feda4783ac5106b4c7ad031ffb Mon Sep 17 00:00:00 2001 From: Andy Walls Date: Fri, 21 Nov 2008 23:37:34 -0500 Subject: cx18: Copyright attribution update for files modified by awalls From: Andy Walls Add copyright attribution for files modified by awalls in 2008 Priority: normal Signed-off-by: Andy Walls --- linux/drivers/media/video/cx18/cx18-firmware.c | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/drivers/media/video/cx18/cx18-firmware.c') diff --git a/linux/drivers/media/video/cx18/cx18-firmware.c b/linux/drivers/media/video/cx18/cx18-firmware.c index fdea4b752..8eac84314 100644 --- a/linux/drivers/media/video/cx18/cx18-firmware.c +++ b/linux/drivers/media/video/cx18/cx18-firmware.c @@ -2,6 +2,7 @@ * cx18 firmware functions * * Copyright (C) 2007 Hans Verkuil + * Copyright (C) 2008 Andy Walls * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by -- cgit v1.2.3