diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/ttpci/av7110.c | 40 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-patch.c | 44 |
2 files changed, 42 insertions, 42 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index dfe03cb42671..865c4596b7b7 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c | |||
@@ -2402,18 +2402,18 @@ static int __devinit av7110_attach(struct saa7146_dev* dev, | |||
2402 | saa7146_write(dev, MC1, MASK_29); | 2402 | saa7146_write(dev, MC1, MASK_29); |
2403 | /* RPS1 timeout disable */ | 2403 | /* RPS1 timeout disable */ |
2404 | saa7146_write(dev, RPS_TOV1, 0); | 2404 | saa7146_write(dev, RPS_TOV1, 0); |
2405 | WRITE_RPS1(cpu_to_le32(CMD_PAUSE | EVT_VBI_B)); | 2405 | WRITE_RPS1(CMD_PAUSE | EVT_VBI_B); |
2406 | WRITE_RPS1(cpu_to_le32(CMD_WR_REG_MASK | (GPIO_CTRL>>2))); | 2406 | WRITE_RPS1(CMD_WR_REG_MASK | (GPIO_CTRL>>2)); |
2407 | WRITE_RPS1(cpu_to_le32(GPIO3_MSK)); | 2407 | WRITE_RPS1(GPIO3_MSK); |
2408 | WRITE_RPS1(cpu_to_le32(SAA7146_GPIO_OUTLO<<24)); | 2408 | WRITE_RPS1(SAA7146_GPIO_OUTLO<<24); |
2409 | #if RPS_IRQ | 2409 | #if RPS_IRQ |
2410 | /* issue RPS1 interrupt to increment counter */ | 2410 | /* issue RPS1 interrupt to increment counter */ |
2411 | WRITE_RPS1(cpu_to_le32(CMD_INTERRUPT)); | 2411 | WRITE_RPS1(CMD_INTERRUPT); |
2412 | #endif | 2412 | #endif |
2413 | WRITE_RPS1(cpu_to_le32(CMD_STOP)); | 2413 | WRITE_RPS1(CMD_STOP); |
2414 | /* Jump to begin of RPS program as safety measure (p37) */ | 2414 | /* Jump to begin of RPS program as safety measure (p37) */ |
2415 | WRITE_RPS1(cpu_to_le32(CMD_JUMP)); | 2415 | WRITE_RPS1(CMD_JUMP); |
2416 | WRITE_RPS1(cpu_to_le32(dev->d_rps1.dma_handle)); | 2416 | WRITE_RPS1(dev->d_rps1.dma_handle); |
2417 | 2417 | ||
2418 | #if RPS_IRQ | 2418 | #if RPS_IRQ |
2419 | /* set event counter 1 source as RPS1 interrupt (0x03) (rE4 p53) | 2419 | /* set event counter 1 source as RPS1 interrupt (0x03) (rE4 p53) |
@@ -2526,28 +2526,28 @@ static int __devinit av7110_attach(struct saa7146_dev* dev, | |||
2526 | count = 0; | 2526 | count = 0; |
2527 | 2527 | ||
2528 | /* Wait Source Line Counter Threshold (p36) */ | 2528 | /* Wait Source Line Counter Threshold (p36) */ |
2529 | WRITE_RPS1(cpu_to_le32(CMD_PAUSE | EVT_HS)); | 2529 | WRITE_RPS1(CMD_PAUSE | EVT_HS); |
2530 | /* Set GPIO3=1 (p42) */ | 2530 | /* Set GPIO3=1 (p42) */ |
2531 | WRITE_RPS1(cpu_to_le32(CMD_WR_REG_MASK | (GPIO_CTRL>>2))); | 2531 | WRITE_RPS1(CMD_WR_REG_MASK | (GPIO_CTRL>>2)); |
2532 | WRITE_RPS1(cpu_to_le32(GPIO3_MSK)); | 2532 | WRITE_RPS1(GPIO3_MSK); |
2533 | WRITE_RPS1(cpu_to_le32(SAA7146_GPIO_OUTHI<<24)); | 2533 | WRITE_RPS1(SAA7146_GPIO_OUTHI<<24); |
2534 | #if RPS_IRQ | 2534 | #if RPS_IRQ |
2535 | /* issue RPS1 interrupt */ | 2535 | /* issue RPS1 interrupt */ |
2536 | WRITE_RPS1(cpu_to_le32(CMD_INTERRUPT)); | 2536 | WRITE_RPS1(CMD_INTERRUPT); |
2537 | #endif | 2537 | #endif |
2538 | /* Wait reset Source Line Counter Threshold (p36) */ | 2538 | /* Wait reset Source Line Counter Threshold (p36) */ |
2539 | WRITE_RPS1(cpu_to_le32(CMD_PAUSE | RPS_INV | EVT_HS)); | 2539 | WRITE_RPS1(CMD_PAUSE | RPS_INV | EVT_HS); |
2540 | /* Set GPIO3=0 (p42) */ | 2540 | /* Set GPIO3=0 (p42) */ |
2541 | WRITE_RPS1(cpu_to_le32(CMD_WR_REG_MASK | (GPIO_CTRL>>2))); | 2541 | WRITE_RPS1(CMD_WR_REG_MASK | (GPIO_CTRL>>2)); |
2542 | WRITE_RPS1(cpu_to_le32(GPIO3_MSK)); | 2542 | WRITE_RPS1(GPIO3_MSK); |
2543 | WRITE_RPS1(cpu_to_le32(SAA7146_GPIO_OUTLO<<24)); | 2543 | WRITE_RPS1(SAA7146_GPIO_OUTLO<<24); |
2544 | #if RPS_IRQ | 2544 | #if RPS_IRQ |
2545 | /* issue RPS1 interrupt */ | 2545 | /* issue RPS1 interrupt */ |
2546 | WRITE_RPS1(cpu_to_le32(CMD_INTERRUPT)); | 2546 | WRITE_RPS1(CMD_INTERRUPT); |
2547 | #endif | 2547 | #endif |
2548 | /* Jump to begin of RPS program (p37) */ | 2548 | /* Jump to begin of RPS program (p37) */ |
2549 | WRITE_RPS1(cpu_to_le32(CMD_JUMP)); | 2549 | WRITE_RPS1(CMD_JUMP); |
2550 | WRITE_RPS1(cpu_to_le32(dev->d_rps1.dma_handle)); | 2550 | WRITE_RPS1(dev->d_rps1.dma_handle); |
2551 | 2551 | ||
2552 | /* Fix VSYNC level */ | 2552 | /* Fix VSYNC level */ |
2553 | saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); | 2553 | saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); |
diff --git a/drivers/media/dvb/ttpci/budget-patch.c b/drivers/media/dvb/ttpci/budget-patch.c index 9a155396d6ac..39bd0a20f53a 100644 --- a/drivers/media/dvb/ttpci/budget-patch.c +++ b/drivers/media/dvb/ttpci/budget-patch.c | |||
@@ -431,22 +431,22 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte | |||
431 | // in budget patch GPIO3 is connected to VSYNC_B | 431 | // in budget patch GPIO3 is connected to VSYNC_B |
432 | count = 0; | 432 | count = 0; |
433 | #if 0 | 433 | #if 0 |
434 | WRITE_RPS1(cpu_to_le32(CMD_UPLOAD | | 434 | WRITE_RPS1(CMD_UPLOAD | |
435 | MASK_10 | MASK_09 | MASK_08 | MASK_06 | MASK_05 | MASK_04 | MASK_03 | MASK_02 )); | 435 | MASK_10 | MASK_09 | MASK_08 | MASK_06 | MASK_05 | MASK_04 | MASK_03 | MASK_02 ); |
436 | #endif | 436 | #endif |
437 | WRITE_RPS1(cpu_to_le32(CMD_PAUSE | EVT_VBI_B)); | 437 | WRITE_RPS1(CMD_PAUSE | EVT_VBI_B); |
438 | WRITE_RPS1(cpu_to_le32(CMD_WR_REG_MASK | (GPIO_CTRL>>2))); | 438 | WRITE_RPS1(CMD_WR_REG_MASK | (GPIO_CTRL>>2)); |
439 | WRITE_RPS1(cpu_to_le32(GPIO3_MSK)); | 439 | WRITE_RPS1(GPIO3_MSK); |
440 | WRITE_RPS1(cpu_to_le32(SAA7146_GPIO_OUTLO<<24)); | 440 | WRITE_RPS1(SAA7146_GPIO_OUTLO<<24); |
441 | #if RPS_IRQ | 441 | #if RPS_IRQ |
442 | // issue RPS1 interrupt to increment counter | 442 | // issue RPS1 interrupt to increment counter |
443 | WRITE_RPS1(cpu_to_le32(CMD_INTERRUPT)); | 443 | WRITE_RPS1(CMD_INTERRUPT); |
444 | // at least a NOP is neede between two interrupts | 444 | // at least a NOP is neede between two interrupts |
445 | WRITE_RPS1(cpu_to_le32(CMD_NOP)); | 445 | WRITE_RPS1(CMD_NOP); |
446 | // interrupt again | 446 | // interrupt again |
447 | WRITE_RPS1(cpu_to_le32(CMD_INTERRUPT)); | 447 | WRITE_RPS1(CMD_INTERRUPT); |
448 | #endif | 448 | #endif |
449 | WRITE_RPS1(cpu_to_le32(CMD_STOP)); | 449 | WRITE_RPS1(CMD_STOP); |
450 | 450 | ||
451 | #if RPS_IRQ | 451 | #if RPS_IRQ |
452 | // set event counter 1 source as RPS1 interrupt (0x03) (rE4 p53) | 452 | // set event counter 1 source as RPS1 interrupt (0x03) (rE4 p53) |
@@ -558,28 +558,28 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte | |||
558 | 558 | ||
559 | 559 | ||
560 | // Wait Source Line Counter Threshold (p36) | 560 | // Wait Source Line Counter Threshold (p36) |
561 | WRITE_RPS1(cpu_to_le32(CMD_PAUSE | EVT_HS)); | 561 | WRITE_RPS1(CMD_PAUSE | EVT_HS); |
562 | // Set GPIO3=1 (p42) | 562 | // Set GPIO3=1 (p42) |
563 | WRITE_RPS1(cpu_to_le32(CMD_WR_REG_MASK | (GPIO_CTRL>>2))); | 563 | WRITE_RPS1(CMD_WR_REG_MASK | (GPIO_CTRL>>2)); |
564 | WRITE_RPS1(cpu_to_le32(GPIO3_MSK)); | 564 | WRITE_RPS1(GPIO3_MSK); |
565 | WRITE_RPS1(cpu_to_le32(SAA7146_GPIO_OUTHI<<24)); | 565 | WRITE_RPS1(SAA7146_GPIO_OUTHI<<24); |
566 | #if RPS_IRQ | 566 | #if RPS_IRQ |
567 | // issue RPS1 interrupt | 567 | // issue RPS1 interrupt |
568 | WRITE_RPS1(cpu_to_le32(CMD_INTERRUPT)); | 568 | WRITE_RPS1(CMD_INTERRUPT); |
569 | #endif | 569 | #endif |
570 | // Wait reset Source Line Counter Threshold (p36) | 570 | // Wait reset Source Line Counter Threshold (p36) |
571 | WRITE_RPS1(cpu_to_le32(CMD_PAUSE | RPS_INV | EVT_HS)); | 571 | WRITE_RPS1(CMD_PAUSE | RPS_INV | EVT_HS); |
572 | // Set GPIO3=0 (p42) | 572 | // Set GPIO3=0 (p42) |
573 | WRITE_RPS1(cpu_to_le32(CMD_WR_REG_MASK | (GPIO_CTRL>>2))); | 573 | WRITE_RPS1(CMD_WR_REG_MASK | (GPIO_CTRL>>2)); |
574 | WRITE_RPS1(cpu_to_le32(GPIO3_MSK)); | 574 | WRITE_RPS1(GPIO3_MSK); |
575 | WRITE_RPS1(cpu_to_le32(SAA7146_GPIO_OUTLO<<24)); | 575 | WRITE_RPS1(SAA7146_GPIO_OUTLO<<24); |
576 | #if RPS_IRQ | 576 | #if RPS_IRQ |
577 | // issue RPS1 interrupt | 577 | // issue RPS1 interrupt |
578 | WRITE_RPS1(cpu_to_le32(CMD_INTERRUPT)); | 578 | WRITE_RPS1(CMD_INTERRUPT); |
579 | #endif | 579 | #endif |
580 | // Jump to begin of RPS program (p37) | 580 | // Jump to begin of RPS program (p37) |
581 | WRITE_RPS1(cpu_to_le32(CMD_JUMP)); | 581 | WRITE_RPS1(CMD_JUMP); |
582 | WRITE_RPS1(cpu_to_le32(dev->d_rps1.dma_handle)); | 582 | WRITE_RPS1(dev->d_rps1.dma_handle); |
583 | 583 | ||
584 | // Fix VSYNC level | 584 | // Fix VSYNC level |
585 | saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); | 585 | saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); |