aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Grenie <olivier.grenie@parrot.com>2012-12-31 07:47:10 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-22 16:15:26 -0400
commitf45f513a9325b52a5f3e26ee8d15471e8b692947 (patch)
tree06dc99661dae0b6f3e3c2dc1b7296e2278c2152a
parent5e9c85d983375fd84a4ba98b34f8fc38d4ec8766 (diff)
[media] dib7090p: remove the support for the dib7090E
The intend of this patch is to remove the support for the dib7090E. The DiB7090E-package has never left prototype state and never made it to mass-prod-state. Signed-off-by: Olivier Grenie <olivier.grenie@parrot.com> Signed-off-by: Patrick Boettcher <patrick.boettcher@parrot.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb-core/dvb-usb-ids.h3
-rw-r--r--drivers/media/usb/dvb-usb/dib0700_devices.c233
2 files changed, 29 insertions, 207 deletions
diff --git a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h
index 399e1042d351..335a8f4695b4 100644
--- a/drivers/media/dvb-core/dvb-usb-ids.h
+++ b/drivers/media/dvb-core/dvb-usb-ids.h
@@ -124,8 +124,7 @@
124#define USB_PID_DIBCOM_STK7770P 0x1e80 124#define USB_PID_DIBCOM_STK7770P 0x1e80
125#define USB_PID_DIBCOM_NIM7090 0x1bb2 125#define USB_PID_DIBCOM_NIM7090 0x1bb2
126#define USB_PID_DIBCOM_TFE7090PVR 0x1bb4 126#define USB_PID_DIBCOM_TFE7090PVR 0x1bb4
127#define USB_PID_DIBCOM_TFE7090E 0x1bb7 127#define USB_PID_DIBCOM_TFE7790P 0x1e6e
128#define USB_PID_DIBCOM_TFE7790E 0x1e6e
129#define USB_PID_DIBCOM_NIM9090M 0x2383 128#define USB_PID_DIBCOM_NIM9090M 0x2383
130#define USB_PID_DIBCOM_NIM9090MD 0x2384 129#define USB_PID_DIBCOM_NIM9090MD 0x2384
131#define USB_PID_DPOSH_M9206_COLD 0x9206 130#define USB_PID_DPOSH_M9206_COLD 0x9206
diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c b/drivers/media/usb/dvb-usb/dib0700_devices.c
index d0916c88d9c1..d8077f15e536 100644
--- a/drivers/media/usb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/usb/dvb-usb/dib0700_devices.c
@@ -2499,36 +2499,16 @@ static int dib7090_agc_restart(struct dvb_frontend *fe, u8 restart)
2499 return 0; 2499 return 0;
2500} 2500}
2501 2501
2502static int dib7090e_update_lna(struct dvb_frontend *fe, u16 agc_global) 2502static int tfe7790p_update_lna(struct dvb_frontend *fe, u16 agc_global)
2503{ 2503{
2504 u16 agc1 = 0, agc2, wbd = 0, wbd_target, wbd_offset, threshold_agc1; 2504 deb_info("update LNA: agc global=%i", agc_global);
2505 s16 wbd_delta;
2506 2505
2507 if ((fe->dtv_property_cache.frequency) < 400000000) 2506 if (agc_global < 25000) {
2508 threshold_agc1 = 25000; 2507 dib7000p_set_gpio(fe, 8, 0, 0);
2509 else 2508 dib7000p_set_agc1_min(fe, 0);
2510 threshold_agc1 = 30000;
2511
2512 wbd_target = (dib0090_get_wbd_target(fe)*8+1)/2;
2513 wbd_offset = dib0090_get_wbd_offset(fe);
2514 dib7000p_get_agc_values(fe, NULL, &agc1, &agc2, &wbd);
2515 wbd_delta = (s16)wbd - (((s16)wbd_offset+10)*4) ;
2516
2517 deb_info("update lna, agc_global=%d agc1=%d agc2=%d",
2518 agc_global, agc1, agc2);
2519 deb_info("update lna, wbd=%d wbd target=%d wbd offset=%d wbd delta=%d",
2520 wbd, wbd_target, wbd_offset, wbd_delta);
2521
2522 if ((agc1 < threshold_agc1) && (wbd_delta > 0)) {
2523 dib0090_set_switch(fe, 1, 1, 1);
2524 dib0090_set_vga(fe, 0);
2525 dib0090_update_rframp_7090(fe, 0);
2526 dib0090_update_tuning_table_7090(fe, 0);
2527 } else { 2509 } else {
2528 dib0090_set_vga(fe, 1); 2510 dib7000p_set_gpio(fe, 8, 0, 1);
2529 dib0090_update_rframp_7090(fe, 1); 2511 dib7000p_set_agc1_min(fe, 32768);
2530 dib0090_update_tuning_table_7090(fe, 1);
2531 dib0090_set_switch(fe, 0, 0, 0);
2532 } 2512 }
2533 2513
2534 return 0; 2514 return 0;
@@ -2542,15 +2522,6 @@ static struct dib0090_wbd_slope dib7090_wbd_table[] = {
2542 { 0xFFFF, 0, 0, 0, 0, 0}, 2522 { 0xFFFF, 0, 0, 0, 0, 0},
2543}; 2523};
2544 2524
2545static struct dib0090_wbd_slope dib7090e_wbd_table[] = {
2546 { 380, 81, 850, 64, 540, 4},
2547 { 700, 51, 866, 21, 320, 4},
2548 { 860, 48, 666, 18, 330, 6},
2549 {1700, 0, 250, 0, 100, 6},
2550 {2600, 0, 250, 0, 100, 6},
2551 { 0xFFFF, 0, 0, 0, 0, 0},
2552};
2553
2554static struct dibx000_agc_config dib7090_agc_config[2] = { 2525static struct dibx000_agc_config dib7090_agc_config[2] = {
2555 { 2526 {
2556 .band_caps = BAND_UHF, 2527 .band_caps = BAND_UHF,
@@ -2729,34 +2700,6 @@ static struct dib7000p_config tfe7090pvr_dib7000p_config[2] = {
2729 } 2700 }
2730}; 2701};
2731 2702
2732static struct dib7000p_config tfe7090e_dib7000p_config = {
2733 .output_mpeg2_in_188_bytes = 1,
2734 .hostbus_diversity = 1,
2735 .tuner_is_baseband = 1,
2736 .update_lna = dib7090e_update_lna,
2737
2738 .agc_config_count = 2,
2739 .agc = dib7090_agc_config,
2740
2741 .bw = &dib7090_clock_config_12_mhz,
2742
2743 .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS,
2744 .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES,
2745 .gpio_pwm_pos = DIB7000P_GPIO_DEFAULT_PWM_POS,
2746
2747 .pwm_freq_div = 0,
2748
2749 .agc_control = dib7090_agc_restart,
2750
2751 .spur_protect = 0,
2752 .disable_sample_and_hold = 0,
2753 .enable_current_mirror = 0,
2754 .diversity_delay = 0,
2755
2756 .output_mode = OUTMODE_MPEG2_FIFO,
2757 .enMpegOutput = 1,
2758};
2759
2760static const struct dib0090_config nim7090_dib0090_config = { 2703static const struct dib0090_config nim7090_dib0090_config = {
2761 .io.clock_khz = 12000, 2704 .io.clock_khz = 12000,
2762 .io.pll_bypass = 0, 2705 .io.pll_bypass = 0,
@@ -2791,47 +2734,11 @@ static const struct dib0090_config nim7090_dib0090_config = {
2791 .in_soc = 1, 2734 .in_soc = 1,
2792}; 2735};
2793 2736
2794static const struct dib0090_config tfe7090e_dib0090_config = { 2737static struct dib7000p_config tfe7790p_dib7000p_config = {
2795 .io.clock_khz = 12000,
2796 .io.pll_bypass = 0,
2797 .io.pll_range = 0,
2798 .io.pll_prediv = 3,
2799 .io.pll_loopdiv = 6,
2800 .io.adc_clock_ratio = 0,
2801 .io.pll_int_loop_filt = 0,
2802 .reset = dib7090_tuner_sleep,
2803 .sleep = dib7090_tuner_sleep,
2804
2805 .freq_offset_khz_uhf = 0,
2806 .freq_offset_khz_vhf = 0,
2807
2808 .get_adc_power = dib7090_get_adc_power,
2809
2810 .clkouttobamse = 1,
2811 .analog_output = 0,
2812
2813 .wbd_vhf_offset = 0,
2814 .wbd_cband_offset = 0,
2815 .use_pwm_agc = 1,
2816 .clkoutdrive = 0,
2817
2818 .fref_clock_ratio = 0,
2819
2820 .wbd = dib7090e_wbd_table,
2821
2822 .ls_cfg_pad_drv = 0,
2823 .data_tx_drv = 0,
2824 .low_if = NULL,
2825 .in_soc = 1,
2826 .force_cband_input = 1,
2827 .is_dib7090e = 1,
2828};
2829
2830static struct dib7000p_config tfe7790e_dib7000p_config = {
2831 .output_mpeg2_in_188_bytes = 1, 2738 .output_mpeg2_in_188_bytes = 1,
2832 .hostbus_diversity = 1, 2739 .hostbus_diversity = 1,
2833 .tuner_is_baseband = 1, 2740 .tuner_is_baseband = 1,
2834 .update_lna = dib7090e_update_lna, 2741 .update_lna = tfe7790p_update_lna,
2835 2742
2836 .agc_config_count = 2, 2743 .agc_config_count = 2,
2837 .agc = dib7090_agc_config, 2744 .agc = dib7090_agc_config,
@@ -2855,7 +2762,7 @@ static struct dib7000p_config tfe7790e_dib7000p_config = {
2855 .enMpegOutput = 1, 2762 .enMpegOutput = 1,
2856}; 2763};
2857 2764
2858static const struct dib0090_config tfe7790e_dib0090_config = { 2765static const struct dib0090_config tfe7790p_dib0090_config = {
2859 .io.clock_khz = 12000, 2766 .io.clock_khz = 12000,
2860 .io.pll_bypass = 0, 2767 .io.pll_bypass = 0,
2861 .io.pll_range = 0, 2768 .io.pll_range = 0,
@@ -2881,14 +2788,14 @@ static const struct dib0090_config tfe7790e_dib0090_config = {
2881 2788
2882 .fref_clock_ratio = 0, 2789 .fref_clock_ratio = 0,
2883 2790
2884 .wbd = dib7090e_wbd_table, 2791 .wbd = dib7090_wbd_table,
2885 2792
2886 .ls_cfg_pad_drv = 0, 2793 .ls_cfg_pad_drv = 0,
2887 .data_tx_drv = 0, 2794 .data_tx_drv = 0,
2888 .low_if = NULL, 2795 .low_if = NULL,
2889 .in_soc = 1, 2796 .in_soc = 1,
2890 .force_cband_input = 1, 2797 .force_cband_input = 0,
2891 .is_dib7090e = 1, 2798 .is_dib7090e = 0,
2892 .force_crystal_mode = 1, 2799 .force_crystal_mode = 1,
2893}; 2800};
2894 2801
@@ -3084,37 +2991,11 @@ static int tfe7090pvr_tuner1_attach(struct dvb_usb_adapter *adap)
3084 return 0; 2991 return 0;
3085} 2992}
3086 2993
3087static int tfe7090e_frontend_attach(struct dvb_usb_adapter *adap) 2994static int tfe7790p_frontend_attach(struct dvb_usb_adapter *adap)
3088{
3089 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1);
3090 msleep(20);
3091 dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1);
3092 dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1);
3093 dib0700_set_gpio(adap->dev, GPIO7, GPIO_OUT, 1);
3094 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 0);
3095
3096 msleep(20);
3097 dib0700_set_gpio(adap->dev, GPIO10, GPIO_OUT, 1);
3098 msleep(20);
3099 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1);
3100
3101 if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap,
3102 1, 0x10, &tfe7090e_dib7000p_config) != 0) {
3103 err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n",
3104 __func__);
3105 return -ENODEV;
3106 }
3107 adap->fe_adap[0].fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap,
3108 0x80, &tfe7090e_dib7000p_config);
3109
3110 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0;
3111}
3112
3113static int tfe7790e_frontend_attach(struct dvb_usb_adapter *adap)
3114{ 2995{
3115 struct dib0700_state *st = adap->dev->priv; 2996 struct dib0700_state *st = adap->dev->priv;
3116 2997
3117 /* The TFE7790E requires the dib0700 to not be in master mode */ 2998 /* The TFE7790P requires the dib0700 to not be in master mode */
3118 st->disable_streaming_master_mode = 1; 2999 st->disable_streaming_master_mode = 1;
3119 3000
3120 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); 3001 dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1);
@@ -3130,42 +3011,25 @@ static int tfe7790e_frontend_attach(struct dvb_usb_adapter *adap)
3130 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1); 3011 dib0700_set_gpio(adap->dev, GPIO0, GPIO_OUT, 1);
3131 3012
3132 if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap, 3013 if (dib7000p_i2c_enumeration(&adap->dev->i2c_adap,
3133 1, 0x10, &tfe7790e_dib7000p_config) != 0) { 3014 1, 0x10, &tfe7790p_dib7000p_config) != 0) {
3134 err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n", 3015 err("%s: dib7000p_i2c_enumeration failed. Cannot continue\n",
3135 __func__); 3016 __func__);
3136 return -ENODEV; 3017 return -ENODEV;
3137 } 3018 }
3138 adap->fe_adap[0].fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 3019 adap->fe_adap[0].fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap,
3139 0x80, &tfe7790e_dib7000p_config); 3020 0x80, &tfe7790p_dib7000p_config);
3140 3021
3141 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0; 3022 return adap->fe_adap[0].fe == NULL ? -ENODEV : 0;
3142} 3023}
3143 3024
3144static int tfe7790e_tuner_attach(struct dvb_usb_adapter *adap) 3025static int tfe7790p_tuner_attach(struct dvb_usb_adapter *adap)
3145{
3146 struct dib0700_adapter_state *st = adap->priv;
3147 struct i2c_adapter *tun_i2c =
3148 dib7090_get_i2c_tuner(adap->fe_adap[0].fe);
3149
3150 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c,
3151 &tfe7790e_dib0090_config) == NULL)
3152 return -ENODEV;
3153
3154 dib7000p_set_gpio(adap->fe_adap[0].fe, 8, 0, 1);
3155
3156 st->set_param_save = adap->fe_adap[0].fe->ops.tuner_ops.set_params;
3157 adap->fe_adap[0].fe->ops.tuner_ops.set_params = dib7090_agc_startup;
3158 return 0;
3159}
3160
3161static int tfe7090e_tuner_attach(struct dvb_usb_adapter *adap)
3162{ 3026{
3163 struct dib0700_adapter_state *st = adap->priv; 3027 struct dib0700_adapter_state *st = adap->priv;
3164 struct i2c_adapter *tun_i2c = 3028 struct i2c_adapter *tun_i2c =
3165 dib7090_get_i2c_tuner(adap->fe_adap[0].fe); 3029 dib7090_get_i2c_tuner(adap->fe_adap[0].fe);
3166 3030
3167 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c, 3031 if (dvb_attach(dib0090_register, adap->fe_adap[0].fe, tun_i2c,
3168 &tfe7090e_dib0090_config) == NULL) 3032 &tfe7790p_dib0090_config) == NULL)
3169 return -ENODEV; 3033 return -ENODEV;
3170 3034
3171 dib7000p_set_gpio(adap->fe_adap[0].fe, 8, 0, 1); 3035 dib7000p_set_gpio(adap->fe_adap[0].fe, 8, 0, 1);
@@ -3708,10 +3572,9 @@ struct usb_device_id dib0700_usb_id_table[] = {
3708/* 75 */{ USB_DEVICE(USB_VID_MEDION, USB_PID_CREATIX_CTX1921) }, 3572/* 75 */{ USB_DEVICE(USB_VID_MEDION, USB_PID_CREATIX_CTX1921) },
3709 { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV340E) }, 3573 { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV340E) },
3710 { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV340E_SE) }, 3574 { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV340E_SE) },
3711 { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_TFE7090E) }, 3575 { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_TFE7790P) },
3712 { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_TFE7790E) }, 3576 { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_TFE8096P) },
3713/* 80 */{ USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_TFE8096P) }, 3577/* 80 */{ USB_DEVICE(USB_VID_ELGATO, USB_PID_ELGATO_EYETV_DTT_2) },
3714 { USB_DEVICE(USB_VID_ELGATO, USB_PID_ELGATO_EYETV_DTT_2) },
3715 { 0 } /* Terminating entry */ 3578 { 0 } /* Terminating entry */
3716}; 3579};
3717MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table); 3580MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table);
@@ -4022,7 +3885,7 @@ struct dvb_usb_device_properties dib0700_devices[] = {
4022 { NULL }, 3885 { NULL },
4023 }, 3886 },
4024 { "Elgato EyeTV DTT rev. 2", 3887 { "Elgato EyeTV DTT rev. 2",
4025 { &dib0700_usb_id_table[81], NULL }, 3888 { &dib0700_usb_id_table[80], NULL },
4026 { NULL }, 3889 { NULL },
4027 }, 3890 },
4028 }, 3891 },
@@ -4839,48 +4702,8 @@ struct dvb_usb_device_properties dib0700_devices[] = {
4839 .pid_filter_count = 32, 4702 .pid_filter_count = 32,
4840 .pid_filter = stk70x0p_pid_filter, 4703 .pid_filter = stk70x0p_pid_filter,
4841 .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, 4704 .pid_filter_ctrl = stk70x0p_pid_filter_ctrl,
4842 .frontend_attach = tfe7090e_frontend_attach, 4705 .frontend_attach = tfe7790p_frontend_attach,
4843 .tuner_attach = tfe7090e_tuner_attach, 4706 .tuner_attach = tfe7790p_tuner_attach,
4844
4845 DIB0700_DEFAULT_STREAMING_CONFIG(0x02),
4846 } },
4847
4848 .size_of_priv =
4849 sizeof(struct dib0700_adapter_state),
4850 },
4851 },
4852
4853 .num_device_descs = 1,
4854 .devices = {
4855 { "DiBcom TFE7090E reference design",
4856 { &dib0700_usb_id_table[78], NULL },
4857 { NULL },
4858 },
4859 },
4860
4861 .rc.core = {
4862 .rc_interval = DEFAULT_RC_INTERVAL,
4863 .rc_codes = RC_MAP_DIB0700_RC5_TABLE,
4864 .module_name = "dib0700",
4865 .rc_query = dib0700_rc_query_old_firmware,
4866 .allowed_protos = RC_BIT_RC5 |
4867 RC_BIT_RC6_MCE |
4868 RC_BIT_NEC,
4869 .change_protocol = dib0700_change_protocol,
4870 },
4871 }, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
4872 .num_adapters = 1,
4873 .adapter = {
4874 {
4875 .num_frontends = 1,
4876 .fe = {{
4877 .caps = DVB_USB_ADAP_HAS_PID_FILTER |
4878 DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
4879 .pid_filter_count = 32,
4880 .pid_filter = stk70x0p_pid_filter,
4881 .pid_filter_ctrl = stk70x0p_pid_filter_ctrl,
4882 .frontend_attach = tfe7790e_frontend_attach,
4883 .tuner_attach = tfe7790e_tuner_attach,
4884 4707
4885 DIB0700_DEFAULT_STREAMING_CONFIG(0x03), 4708 DIB0700_DEFAULT_STREAMING_CONFIG(0x03),
4886 } }, 4709 } },
@@ -4892,8 +4715,8 @@ struct dvb_usb_device_properties dib0700_devices[] = {
4892 4715
4893 .num_device_descs = 1, 4716 .num_device_descs = 1,
4894 .devices = { 4717 .devices = {
4895 { "DiBcom TFE7790E reference design", 4718 { "DiBcom TFE7790P reference design",
4896 { &dib0700_usb_id_table[79], NULL }, 4719 { &dib0700_usb_id_table[78], NULL },
4897 { NULL }, 4720 { NULL },
4898 }, 4721 },
4899 }, 4722 },
@@ -4934,7 +4757,7 @@ struct dvb_usb_device_properties dib0700_devices[] = {
4934 .num_device_descs = 1, 4757 .num_device_descs = 1,
4935 .devices = { 4758 .devices = {
4936 { "DiBcom TFE8096P reference design", 4759 { "DiBcom TFE8096P reference design",
4937 { &dib0700_usb_id_table[80], NULL }, 4760 { &dib0700_usb_id_table[79], NULL },
4938 { NULL }, 4761 { NULL },
4939 }, 4762 },
4940 }, 4763 },