diff options
Diffstat (limited to 'drivers/media/video/cx18/cx18-driver.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-driver.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c index edbb83c4c564..79b3bf5bcec1 100644 --- a/drivers/media/video/cx18/cx18-driver.c +++ b/drivers/media/video/cx18/cx18-driver.c | |||
@@ -684,7 +684,6 @@ static void cx18_init_subdevs(struct cx18 *cx) | |||
684 | continue; | 684 | continue; |
685 | 685 | ||
686 | switch (device) { | 686 | switch (device) { |
687 | case CX18_HW_GPIO_AUDIO_MUX: | ||
688 | case CX18_HW_DVB: | 687 | case CX18_HW_DVB: |
689 | case CX18_HW_TVEEPROM: | 688 | case CX18_HW_TVEEPROM: |
690 | /* These subordinate devices do not use probing */ | 689 | /* These subordinate devices do not use probing */ |
@@ -695,6 +694,16 @@ static void cx18_init_subdevs(struct cx18 *cx) | |||
695 | /* Just note that the card uses it (i.e. has analog) */ | 694 | /* Just note that the card uses it (i.e. has analog) */ |
696 | cx->hw_flags |= device; | 695 | cx->hw_flags |= device; |
697 | break; | 696 | break; |
697 | case CX18_HW_GPIO_RESET_CTRL: | ||
698 | /* | ||
699 | * The Reset Controller gets probed and added to | ||
700 | * hw_flags earlier for i2c adapter/bus initialization | ||
701 | */ | ||
702 | break; | ||
703 | case CX18_HW_GPIO_MUX: | ||
704 | if (cx18_gpio_register(cx, device) == 0) | ||
705 | cx->hw_flags |= device; | ||
706 | break; | ||
698 | default: | 707 | default: |
699 | if (cx18_i2c_register(cx, i) == 0) | 708 | if (cx18_i2c_register(cx, i) == 0) |
700 | cx->hw_flags |= device; | 709 | cx->hw_flags |= device; |
@@ -793,7 +802,6 @@ static int __devinit cx18_probe(struct pci_dev *pci_dev, | |||
793 | cx->scb = (struct cx18_scb __iomem *)(cx->enc_mem + SCB_OFFSET); | 802 | cx->scb = (struct cx18_scb __iomem *)(cx->enc_mem + SCB_OFFSET); |
794 | cx18_init_scb(cx); | 803 | cx18_init_scb(cx); |
795 | 804 | ||
796 | /* Initialize GPIO early so I2C device resets can be performed */ | ||
797 | cx18_gpio_init(cx); | 805 | cx18_gpio_init(cx); |
798 | 806 | ||
799 | /* Initialize integrated A/V decoder early to set PLLs, just in case */ | 807 | /* Initialize integrated A/V decoder early to set PLLs, just in case */ |
@@ -802,9 +810,17 @@ static int __devinit cx18_probe(struct pci_dev *pci_dev, | |||
802 | CX18_ERR("Could not register A/V decoder subdevice\n"); | 810 | CX18_ERR("Could not register A/V decoder subdevice\n"); |
803 | goto free_map; | 811 | goto free_map; |
804 | } | 812 | } |
805 | /* Initialize the A/V decoder PLLs to sane defaults */ | ||
806 | cx18_call_hw(cx, CX18_HW_418_AV, core, init, (u32) CX18_AV_INIT_PLLS); | 813 | cx18_call_hw(cx, CX18_HW_418_AV, core, init, (u32) CX18_AV_INIT_PLLS); |
807 | 814 | ||
815 | /* Initialize GPIO Reset Controller to do chip resets during i2c init */ | ||
816 | if (cx->card->hw_all & CX18_HW_GPIO_RESET_CTRL) { | ||
817 | if (cx18_gpio_register(cx, CX18_HW_GPIO_RESET_CTRL) != 0) | ||
818 | CX18_WARN("Could not register GPIO reset controller" | ||
819 | "subdevice; proceeding anyway.\n"); | ||
820 | else | ||
821 | cx->hw_flags |= CX18_HW_GPIO_RESET_CTRL; | ||
822 | } | ||
823 | |||
808 | /* active i2c */ | 824 | /* active i2c */ |
809 | CX18_DEBUG_INFO("activating i2c...\n"); | 825 | CX18_DEBUG_INFO("activating i2c...\n"); |
810 | retval = init_cx18_i2c(cx); | 826 | retval = init_cx18_i2c(cx); |