FreeCalypso > hg > tcs211-pirelli
comparison chipsetsw/drivers/drv_core/armio/armio.c @ 27:176f5b1bc360
first round of changes for the Pirelli
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Tue, 08 Sep 2015 01:16:54 +0000 |
parents | 509db1a7b7b8 |
children |
comparison
equal
deleted
inserted
replaced
26:1a81baea22d7 | 27:176f5b1bc360 |
---|---|
231 // reset the IOs config | 231 // reset the IOs config |
232 AI_ResetIoConfig(); | 232 AI_ResetIoConfig(); |
233 | 233 |
234 // CLKM_IO_CNTL register configuration : | 234 // CLKM_IO_CNTL register configuration : |
235 // select IOs 6,8,9,10,11,12 and 13 on the pins instead of MCSI and MCUEN signals. | 235 // select IOs 6,8,9,10,11,12 and 13 on the pins instead of MCSI and MCUEN signals. |
236 #if (CHIPSET != 12) | 236 |
237 // Modified for Pirelli DP-L10 in this version | |
238 | |
239 AI_EnableBit(0); | |
240 AI_EnableBit(1); | |
237 AI_EnableBit(2); | 241 AI_EnableBit(2); |
242 AI_EnableBit(3); | |
238 AI_EnableBit(4); | 243 AI_EnableBit(4); |
239 #endif | |
240 | 244 |
241 /* Bits 5,6,7,8 are used to output I/O 9,10,11,12 or MCSI pins */ | 245 /* Bits 5,6,7,8 are used to output I/O 9,10,11,12 or MCSI pins */ |
242 /* If Bluetooth, IO should be disabled, outputting MCSI used for Bluetooth voice */ | 246 /* If Bluetooth, IO should be disabled, outputting MCSI used for Bluetooth voice */ |
243 #ifdef BTEMOBILE | 247 /* MCSI is enabled on the Pirelli */ |
244 #if (CHIPSET != 12) | 248 #if 1 |
245 AI_DisableBit(5); | 249 AI_DisableBit(5); |
246 AI_DisableBit(6); | 250 AI_DisableBit(6); |
247 AI_DisableBit(7); | 251 AI_DisableBit(7); |
248 AI_DisableBit(8); | 252 AI_DisableBit(8); |
249 #endif | |
250 #else | 253 #else |
251 #if (CHIPSET != 12) | |
252 AI_EnableBit(5); | 254 AI_EnableBit(5); |
253 AI_EnableBit(6); | 255 AI_EnableBit(6); |
254 AI_EnableBit(7); | 256 AI_EnableBit(7); |
255 AI_EnableBit(8); | 257 AI_EnableBit(8); |
256 #endif | 258 #endif |
257 #endif | 259 |
258 | |
259 #if (CHIPSET != 12) | |
260 AI_EnableBit(9); | 260 AI_EnableBit(9); |
261 #endif | |
262 | 261 |
263 // ARMIO_OUT register configuration : | 262 // ARMIO_OUT register configuration : |
264 // set IOs 8,9,10,11,12 and 13 as high | 263 // set IOs 8,9,10,11,12 and 13 as high |
265 // set IOs 0 to 7 as low | 264 // set IOs 0 to 7 as low |
266 #if ((BOARD == 8) || (BOARD == 9)) | 265 #if ((BOARD == 8) || (BOARD == 9)) |
279 AI_ConfigBitAsOutput(13); | 278 AI_ConfigBitAsOutput(13); |
280 #elif ((BOARD == 40) || (BOARD == 41) || (BOARD == 42) || (BOARD == 43) || (BOARD == 45)) | 279 #elif ((BOARD == 40) || (BOARD == 41) || (BOARD == 42) || (BOARD == 43) || (BOARD == 45)) |
281 // set IOs 1 and 8 to 13 as high | 280 // set IOs 1 and 8 to 13 as high |
282 // set IOs 0 and 2 to 7 as low | 281 // set IOs 0 and 2 to 7 as low |
283 // On D-Sample GPIO 1 must be set to high to enable the audio amplifier. | 282 // On D-Sample GPIO 1 must be set to high to enable the audio amplifier. |
284 #if (OP_L1_STANDALONE == 0) | 283 |
285 // CC test | 284 // Modified for Pirelli DP-L10 in this version |
286 #if 1 // Dmitriy: GPIO 1 is the interrupt for the ext host, set it to 0 | 285 |
287 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F00; | 286 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x0000; |
288 #else | 287 |
289 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F02; | |
290 #endif | |
291 //*((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F01; | |
292 // end | |
293 #else | |
294 *((volatile SYS_UWORD16 *) ARMIO_OUT) = 0x3F01; | |
295 #endif | |
296 | |
297 // ARMIO_CNTL_REG register configuration : | |
298 // set IOs 1,2,5,7,9,14 and 15 as ouputs. | |
299 // CC test 0316 | |
300 AI_ConfigBitAsOutput(1); | 288 AI_ConfigBitAsOutput(1); |
301 // end | 289 AI_ConfigBitAsOutput(4); |
302 AI_ConfigBitAsOutput(2); | |
303 AI_ConfigBitAsOutput(5); | |
304 AI_ConfigBitAsOutput(7); | 290 AI_ConfigBitAsOutput(7); |
305 AI_ConfigBitAsOutput(9); | |
306 AI_ConfigBitAsOutput(14); | |
307 AI_ConfigBitAsOutput(15); | |
308 #endif | 291 #endif |
309 } | 292 } |
310 | 293 |
311 /* | 294 /* |
312 * AI_SelectIOForIT | 295 * AI_SelectIOForIT |