summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx18/cx18-io.h
AgeCommit message (Collapse)Author
2008-11-30cx18: cx18_writel_expect() should not declare success on a PCI read errorAndy Walls
From: Andy Walls <awalls@radix.net> cx18: cx18_writel_expect() should not declare success on a PCI read error. This removes the potential for cx18_write*_expect() calls to not accomplish a PCI write successfully as expected. The CX18-AV core uses the *expect() calls often and this may be the source of intermittent audio problems and standands switching problems. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-21cx18: Adjust outgoing mailbox timeouts and remove statistics loggingAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Adjust outgoing mailbox timeouts and remove statistics logging. This saves some wasted storage in struct cx18 for each card. Cutting the outgoing mailbox timeouts in half from the previous value appears to be safe with MythTV. Got rid of interrupted case code path after a wait uninterruptable returns. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-16cx18: Streamline cx18-io[ch] wrappers and enforce MMIO retry strategyAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Streamline cx18-io[ch] wrappers and enforce MMIO retry strategy so that write retries always occur and read retries never occur (as they never help). Remove MMIO statistics logging to speed up MMIO accesses. Deprecate & ignore retry_mmio and mmio_ndelay module parameters, to essentially force retry_mmio=1 and mmio_ndelay=0. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-15cx18: Major rewrite of interrupt handling for incoming mailbox processingAndy Walls
From: Andy Walls <awalls@radix.net> 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 <awalls@radix.net>
2008-11-09cx18: Prevent CX23418 from clearing it's outgoing ack interrupts to driverAndy Walls
From: Andy Walls <awalls@radix.net> When the CX23418 CPU unit sent out an ack interrupt to the linux driver, it also received that interrupt and cleared the flag before the linux driver could see what the interrupt was for. This fix prevents the CPU from receiving an IRQ for it's own outgoing ack's to the linux driver. This fix is critical now that the linux driver doesn't poll but relies on these ack interrupts. Priority: high Signed-off-by: Andy Walls <awalls@radix.net>
2008-11-02cx18: Reduce number of mmio read retriesAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Reduce number of mmio read retries to improve performance. Experiments have shown 2 things: read retries never improve the result of a suspect mmio read from the CX23418 (the result stays all 0xff's), and that most of the suspected read failures are actually proper reads of values that should be all 0xff's. This change reduces the number of read retries and keeps the count separate from write retries. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-10-31cx18: Fix write retries for registers that always change - part 2.Andy Walls
From: Andy Walls <awalls@radix.net> cx18: Fix write retries for registers that always change - part 2. Some registers, especially interrupt related ones, will never read back the value just written. Modified interrupt register readback checks to make sure the intended effect was achieved. Priority: high Signed-off-by: Andy Walls <awalls@radix.net>
2008-10-18cx18: Add __iomem address space qualifier to cx18_log_*_retries() argumentAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Add __iomem address space qualifier to cx18_log_*_retries() addr argument to clean up sparse build warnings. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2008-09-28cx18: Add default behavior of checking and retrying PCI MMIO accessesAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Add default behavior of checking and retrying PCI MMIO accesses. The concept of checking and retrying PCI MMIO accesses for better reliability in older motherboards was suggested by Steve Toth <stoth@linuxtv.org>. This change implements MMIO retries and the retry_mmio module parameter that is enabled by default. Limited experiments have shown this is more reliable than the mmio_ndelay parameter. mmio_ndelay has insignificant effect with retries enabled. Priority: high Signed-off-by: Andy Walls <awalls@radix.net>
2008-08-31cx18: Throttle mmio to/from the CX23418 so boards work in older systemsAndy Walls
From: Andy Walls <awalls@radix.net> cx18: Throttle mmio to/from the CX23418 so boards work in older systems. The CX23418 couldn't reliably handle mmio at the rate at which the cx18 driver was attempting to access the chip. The PCI bridge arrangements and settings on modern motherboards still allowed the CX23418 to work OK, but it didn't work well on many older motherboards: mysterious I2C errors, firmware loading errors, etc. This patch adds a throttle to *all* mmio access to the CX23418. It defaults to a delay of 31 ns, but is adjustable by the mmio_ndelay module parm. My HVR-1600 and Raptor PAL/SECAM card now function for analog capture on a motherboard with an Intel 82810E Northbridge and 82801AA Southbridge. Priority: high Signed-off-by: Andy Walls <awalls@radix.net>
2008-08-30cx18: Create cx18_ specific wrappers for all pci mmio accessesors.Andy Walls
From: Andy Walls <awalls@radix.net> cx18: Create cx18_ specific wrappers for all pci mmio accessesors. This is a first step in instrumenting all CX23418 PCI bus IO, to debug problems with accessing the CX23418's PCI memory mapped IO. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>