aboutsummaryrefslogtreecommitdiffstats
path: root/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
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 07:37:14 -0400
commitd267d85101c509020a12686b96cbd179deaf4ecd (patch)
tree1a016966d11efb400ca310cd5726478053cd00a0 /drivers/media/video/cx18/cx18-av-core.c
parent7f9876785276ac7f8606f8bf53a3dae4c10b8adb (diff)
V4L/DVB (9110): cx18: Add default behavior of checking and retrying PCI MMIO accesses
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. 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-av-core.c')
-rw-r--r--drivers/media/video/cx18/cx18-av-core.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/video/cx18/cx18-av-core.c b/drivers/media/video/cx18/cx18-av-core.c
index d8626e35465..73f5141a42d 100644
--- a/drivers/media/video/cx18/cx18-av-core.c
+++ b/drivers/media/video/cx18/cx18-av-core.c
@@ -42,6 +42,12 @@ int cx18_av_write4(struct cx18 *cx, u16 addr, u32 value)
42 return 0; 42 return 0;
43} 43}
44 44
45int cx18_av_write4_noretry(struct cx18 *cx, u16 addr, u32 value)
46{
47 cx18_write_reg_noretry(cx, value, 0xc40000 + addr);
48 return 0;
49}
50
45u8 cx18_av_read(struct cx18 *cx, u16 addr) 51u8 cx18_av_read(struct cx18 *cx, u16 addr)
46{ 52{
47 u32 x = cx18_read_reg(cx, 0xc40000 + (addr & ~3)); 53 u32 x = cx18_read_reg(cx, 0xc40000 + (addr & ~3));
@@ -55,6 +61,11 @@ u32 cx18_av_read4(struct cx18 *cx, u16 addr)
55 return cx18_read_reg(cx, 0xc40000 + addr); 61 return cx18_read_reg(cx, 0xc40000 + addr);
56} 62}
57 63
64u32 cx18_av_read4_noretry(struct cx18 *cx, u16 addr)
65{
66 return cx18_read_reg_noretry(cx, 0xc40000 + addr);
67}
68
58int cx18_av_and_or(struct cx18 *cx, u16 addr, unsigned and_mask, 69int cx18_av_and_or(struct cx18 *cx, u16 addr, unsigned and_mask,
59 u8 or_value) 70 u8 or_value)
60{ 71{