diff options
Diffstat (limited to 'drivers/media/dvb/ttpci/av7110_hw.c')
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_hw.c | 40 |
1 files changed, 20 insertions, 20 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(): " |