aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttpci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/ttpci')
-rw-r--r--drivers/media/dvb/ttpci/av7110.c4
-rw-r--r--drivers/media/dvb/ttpci/av7110_hw.c40
-rw-r--r--drivers/media/dvb/ttpci/av7110_hw.h12
3 files changed, 28 insertions, 28 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index 327a8089193b..27494901975f 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -81,7 +81,7 @@ static int adac = DVB_ADAC_TI;
81static int hw_sections; 81static int hw_sections;
82static int rgb_on; 82static int rgb_on;
83static int volume = 255; 83static int volume = 255;
84static int budgetpatch = 0; 84static int budgetpatch;
85 85
86module_param_named(debug, av7110_debug, int, 0644); 86module_param_named(debug, av7110_debug, int, 0644);
87MODULE_PARM_DESC(debug, "debug level (bitmask, default 0)"); 87MODULE_PARM_DESC(debug, "debug level (bitmask, default 0)");
@@ -103,7 +103,7 @@ MODULE_PARM_DESC(budgetpatch, "use budget-patch hardware modification: default 0
103 103
104static void restart_feeds(struct av7110 *av7110); 104static void restart_feeds(struct av7110 *av7110);
105 105
106static int av7110_num = 0; 106static int av7110_num;
107 107
108#define FE_FUNC_OVERRIDE(fe_func, av7110_copy, av7110_func) \ 108#define FE_FUNC_OVERRIDE(fe_func, av7110_copy, av7110_func) \
109{\ 109{\
diff --git a/drivers/media/dvb/ttpci/av7110_hw.c b/drivers/media/dvb/ttpci/av7110_hw.c
index cb377452b57d..b2e63e9fc053 100644
--- a/drivers/media/dvb/ttpci/av7110_hw.c
+++ b/drivers/media/dvb/ttpci/av7110_hw.c
@@ -146,52 +146,52 @@ static int load_dram(struct av7110 *av7110, u32 *data, int len)
146{ 146{
147 int i; 147 int i;
148 int blocks, rest; 148 int blocks, rest;
149 u32 base, bootblock = BOOT_BLOCK; 149 u32 base, bootblock = AV7110_BOOT_BLOCK;
150 150
151 dprintk(4, "%p\n", av7110); 151 dprintk(4, "%p\n", av7110);
152 152
153 blocks = len / BOOT_MAX_SIZE; 153 blocks = len / AV7110_BOOT_MAX_SIZE;
154 rest = len % BOOT_MAX_SIZE; 154 rest = len % AV7110_BOOT_MAX_SIZE;
155 base = DRAM_START_CODE; 155 base = DRAM_START_CODE;
156 156
157 for (i = 0; i < blocks; i++) { 157 for (i = 0; i < blocks; i++) {
158 if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) { 158 if (waitdebi(av7110, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) {
159 printk(KERN_ERR "dvb-ttpci: load_dram(): timeout at block %d\n", i); 159 printk(KERN_ERR "dvb-ttpci: load_dram(): timeout at block %d\n", i);
160 return -ETIMEDOUT; 160 return -ETIMEDOUT;
161 } 161 }
162 dprintk(4, "writing DRAM block %d\n", i); 162 dprintk(4, "writing DRAM block %d\n", i);
163 mwdebi(av7110, DEBISWAB, bootblock, 163 mwdebi(av7110, DEBISWAB, bootblock,
164 ((char*)data) + i * BOOT_MAX_SIZE, BOOT_MAX_SIZE); 164 ((char*)data) + i * AV7110_BOOT_MAX_SIZE, AV7110_BOOT_MAX_SIZE);
165 bootblock ^= 0x1400; 165 bootblock ^= 0x1400;
166 iwdebi(av7110, DEBISWAB, BOOT_BASE, swab32(base), 4); 166 iwdebi(av7110, DEBISWAB, AV7110_BOOT_BASE, swab32(base), 4);
167 iwdebi(av7110, DEBINOSWAP, BOOT_SIZE, BOOT_MAX_SIZE, 2); 167 iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_SIZE, AV7110_BOOT_MAX_SIZE, 2);
168 iwdebi(av7110, DEBINOSWAP, BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); 168 iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2);
169 base += BOOT_MAX_SIZE; 169 base += AV7110_BOOT_MAX_SIZE;
170 } 170 }
171 171
172 if (rest > 0) { 172 if (rest > 0) {
173 if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) { 173 if (waitdebi(av7110, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) {
174 printk(KERN_ERR "dvb-ttpci: load_dram(): timeout at last block\n"); 174 printk(KERN_ERR "dvb-ttpci: load_dram(): timeout at last block\n");
175 return -ETIMEDOUT; 175 return -ETIMEDOUT;
176 } 176 }
177 if (rest > 4) 177 if (rest > 4)
178 mwdebi(av7110, DEBISWAB, bootblock, 178 mwdebi(av7110, DEBISWAB, bootblock,
179 ((char*)data) + i * BOOT_MAX_SIZE, rest); 179 ((char*)data) + i * AV7110_BOOT_MAX_SIZE, rest);
180 else 180 else
181 mwdebi(av7110, DEBISWAB, bootblock, 181 mwdebi(av7110, DEBISWAB, bootblock,
182 ((char*)data) + i * BOOT_MAX_SIZE - 4, rest + 4); 182 ((char*)data) + i * AV7110_BOOT_MAX_SIZE - 4, rest + 4);
183 183
184 iwdebi(av7110, DEBISWAB, BOOT_BASE, swab32(base), 4); 184 iwdebi(av7110, DEBISWAB, AV7110_BOOT_BASE, swab32(base), 4);
185 iwdebi(av7110, DEBINOSWAP, BOOT_SIZE, rest, 2); 185 iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_SIZE, rest, 2);
186 iwdebi(av7110, DEBINOSWAP, BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); 186 iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2);
187 } 187 }
188 if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) { 188 if (waitdebi(av7110, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) {
189 printk(KERN_ERR "dvb-ttpci: load_dram(): timeout after last block\n"); 189 printk(KERN_ERR "dvb-ttpci: load_dram(): timeout after last block\n");
190 return -ETIMEDOUT; 190 return -ETIMEDOUT;
191 } 191 }
192 iwdebi(av7110, DEBINOSWAP, BOOT_SIZE, 0, 2); 192 iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_SIZE, 0, 2);
193 iwdebi(av7110, DEBINOSWAP, BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); 193 iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2);
194 if (waitdebi(av7110, BOOT_STATE, BOOTSTATE_BOOT_COMPLETE) < 0) { 194 if (waitdebi(av7110, AV7110_BOOT_STATE, BOOTSTATE_AV7110_BOOT_COMPLETE) < 0) {
195 printk(KERN_ERR "dvb-ttpci: load_dram(): final handshake timeout\n"); 195 printk(KERN_ERR "dvb-ttpci: load_dram(): final handshake timeout\n");
196 return -ETIMEDOUT; 196 return -ETIMEDOUT;
197 } 197 }
@@ -262,7 +262,7 @@ int av7110_bootarm(struct av7110 *av7110)
262 //saa7146_setgpio(dev, 3, SAA7146_GPIO_INPUT); 262 //saa7146_setgpio(dev, 3, SAA7146_GPIO_INPUT);
263 263
264 mwdebi(av7110, DEBISWAB, DPRAM_BASE, bootcode, sizeof(bootcode)); 264 mwdebi(av7110, DEBISWAB, DPRAM_BASE, bootcode, sizeof(bootcode));
265 iwdebi(av7110, DEBINOSWAP, BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); 265 iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2);
266 266
267 if (saa7146_wait_for_debi_done(av7110->dev, 1)) { 267 if (saa7146_wait_for_debi_done(av7110->dev, 1)) {
268 printk(KERN_ERR "dvb-ttpci: av7110_bootarm(): " 268 printk(KERN_ERR "dvb-ttpci: av7110_bootarm(): "
diff --git a/drivers/media/dvb/ttpci/av7110_hw.h b/drivers/media/dvb/ttpci/av7110_hw.h
index 84b83299b8be..4e173c67fbb2 100644
--- a/drivers/media/dvb/ttpci/av7110_hw.h
+++ b/drivers/media/dvb/ttpci/av7110_hw.h
@@ -18,7 +18,7 @@ enum av7110_bootstate
18{ 18{
19 BOOTSTATE_BUFFER_EMPTY = 0, 19 BOOTSTATE_BUFFER_EMPTY = 0,
20 BOOTSTATE_BUFFER_FULL = 1, 20 BOOTSTATE_BUFFER_FULL = 1,
21 BOOTSTATE_BOOT_COMPLETE = 2 21 BOOTSTATE_AV7110_BOOT_COMPLETE = 2
22}; 22};
23 23
24enum av7110_type_rec_play_format 24enum av7110_type_rec_play_format
@@ -295,11 +295,11 @@ enum av7110_command_type {
295#define DPRAM_BASE 0x4000 295#define DPRAM_BASE 0x4000
296 296
297/* boot protocol area */ 297/* boot protocol area */
298#define BOOT_STATE (DPRAM_BASE + 0x3F8) 298#define AV7110_BOOT_STATE (DPRAM_BASE + 0x3F8)
299#define BOOT_SIZE (DPRAM_BASE + 0x3FA) 299#define AV7110_BOOT_SIZE (DPRAM_BASE + 0x3FA)
300#define BOOT_BASE (DPRAM_BASE + 0x3FC) 300#define AV7110_BOOT_BASE (DPRAM_BASE + 0x3FC)
301#define BOOT_BLOCK (DPRAM_BASE + 0x400) 301#define AV7110_BOOT_BLOCK (DPRAM_BASE + 0x400)
302#define BOOT_MAX_SIZE 0xc00 302#define AV7110_BOOT_MAX_SIZE 0xc00
303 303
304/* firmware command protocol area */ 304/* firmware command protocol area */
305#define IRQ_STATE (DPRAM_BASE + 0x0F4) 305#define IRQ_STATE (DPRAM_BASE + 0x0F4)