Merge branches 'fixes', 'cleanups' and 'boards'
[pandora-kernel.git] / drivers / media / video / cx18 / cx18-av-firmware.c
index caa748a..c64fd0a 100644 (file)
@@ -2,6 +2,7 @@
  *  cx18 ADEC firmware functions
  *
  *  Copyright (C) 2007  Hans Verkuil <hverkuil@xs4all.nl>
+ *  Copyright (C) 2008  Andy Walls <awalls@radix.net>
  *
  *  This program is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU General Public License
@@ -63,13 +64,12 @@ int cx18_av_loadfw(struct cx18 *cx)
                        int retries2;
                        int unrec_err = 0;
 
-                       for (retries2 = 0; retries2 < CX18_MAX_MMIO_RETRIES;
+                       for (retries2 = 0; retries2 < CX18_MAX_MMIO_WR_RETRIES;
                             retries2++) {
                                cx18_av_write4_noretry(cx, CXADEC_DL_CTL,
                                                       dl_control);
                                udelay(10);
-                               value = cx18_av_read4_noretry(cx,
-                                                             CXADEC_DL_CTL);
+                               value = cx18_av_read4(cx, CXADEC_DL_CTL);
                                if (value == dl_control)
                                        break;
                                /* Check if we can correct the byte by changing
@@ -80,9 +80,7 @@ int cx18_av_loadfw(struct cx18 *cx)
                                        break;
                                }
                        }
-                       cx18_log_write_retries(cx, retries2,
-                                       cx->reg_mem + 0xc40000 + CXADEC_DL_CTL);
-                       if (unrec_err || retries2 >= CX18_MAX_MMIO_RETRIES)
+                       if (unrec_err || retries2 >= CX18_MAX_MMIO_WR_RETRIES)
                                break;
                }
                if (i == size)