diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-01-15 05:12:14 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-15 06:04:04 -0500 |
commit | fabd23862ba34f217f154c225c59eb5267c4a5d1 (patch) | |
tree | a21dbe513812184ebef63faa1b38244d06c7de80 /drivers/media | |
parent | 1e4baed379a2bff3c728ea34602d3432fb047af8 (diff) |
V4L/DVB (3381): Fix compilation with Alpha
- BOOT_SIZE name is also used at alpha and were breaking
compiling with allyesconfig.
- All BOOT_* renamed to AV7110_BOOT* to fix and keep names
with the same style.
Thanks to Andrew Morton for pointing this.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_hw.c | 40 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_hw.h | 12 |
2 files changed, 26 insertions, 26 deletions
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 | ||
24 | enum av7110_type_rec_play_format | 24 | enum 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) |