summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx18/cx18-av-core.c
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2008-09-28 20:46:02 -0400
committerAndy Walls <awalls@radix.net>2008-09-28 20:46:02 -0400
commitac5d49924a0ab6a492457817a7a08d952961ab67 (patch)
treecbb2d4779304eb8fd23de78809779bdafb0ebb56 /linux/drivers/media/video/cx18/cx18-av-core.c
parentc20af2106a755d11b45e19ade56a98fa8bf6ca29 (diff)
downloadmediapointer-dvb-s2-ac5d49924a0ab6a492457817a7a08d952961ab67.tar.gz
mediapointer-dvb-s2-ac5d49924a0ab6a492457817a7a08d952961ab67.tar.bz2
cx18: Add default behavior of checking and retrying PCI MMIO accesses
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>
Diffstat (limited to 'linux/drivers/media/video/cx18/cx18-av-core.c')
-rw-r--r--linux/drivers/media/video/cx18/cx18-av-core.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx18/cx18-av-core.c b/linux/drivers/media/video/cx18/cx18-av-core.c
index d8626e354..73f5141a4 100644
--- a/linux/drivers/media/video/cx18/cx18-av-core.c
+++ b/linux/drivers/media/video/cx18/cx18-av-core.c
@@ -42,6 +42,12 @@ int cx18_av_write4(struct cx18 *cx, u16 addr, u32 value)
return 0;
}
+int cx18_av_write4_noretry(struct cx18 *cx, u16 addr, u32 value)
+{
+ cx18_write_reg_noretry(cx, value, 0xc40000 + addr);
+ return 0;
+}
+
u8 cx18_av_read(struct cx18 *cx, u16 addr)
{
u32 x = cx18_read_reg(cx, 0xc40000 + (addr & ~3));
@@ -55,6 +61,11 @@ u32 cx18_av_read4(struct cx18 *cx, u16 addr)
return cx18_read_reg(cx, 0xc40000 + addr);
}
+u32 cx18_av_read4_noretry(struct cx18 *cx, u16 addr)
+{
+ return cx18_read_reg_noretry(cx, 0xc40000 + addr);
+}
+
int cx18_av_and_or(struct cx18 *cx, u16 addr, unsigned and_mask,
u8 or_value)
{