aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/tdmb/tcc3170/inc/tcbd_drv_ip.h
blob: 7789d1ca3ff6c06de85ee4ab3d049a340b9f945e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
 * tcbd_drv_ip.h
 *
 * Author:  <linux@telechips.com>
 * Description: Telechips broadcast driver
 *
 * Copyright (c) Telechips, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef __TCBD_DRV_IP_H__
#define __TCBD_DRV_IP_H__

enum tcbd_remap_type {
	EP_RAM0_RAM1 = 0, /**< Ep can access RAM0 and RAM1 */
	EP_RAM0_RAM1_PC0,  /**< Ep can access RAM0, RAM1 and initial pc is 0 */
	OP_RAM0_RAM1_PC2,  /**< Op can access RAM0, RAM1 and initial pc is 0x2000*/
	OP_RAM0_EP_RAM1_PC2 /**< Op can access RAM0. Ep can access RAM1.
						 *  Initial pc is 0x2000 */
};

TCBB_FUNC s32 tcbd_send_spur_data(
	struct tcbd_device *_device, s32 _freq_khz);
TCBB_FUNC s32 tcbd_send_agc_data(
	struct tcbd_device *_device, enum tcbd_band_type _band_type);
TCBB_FUNC s32 tcbd_send_frequency(
	struct tcbd_device *_device, s32 _freq_khz);
TCBB_FUNC s32 tcbd_send_service_info(struct tcbd_device *_device);

TCBB_FUNC s32 tcbd_get_rom_version(
	struct tcbd_device *_device, u32 *_bootVersion);

TCBB_FUNC s32 tcbd_enable_buffer(struct tcbd_device *_device);
TCBB_FUNC s32 tcbd_disable_buffer(struct tcbd_device *_device);
TCBB_FUNC s32 tcbd_init_buffer_region(struct tcbd_device *_device);
TCBB_FUNC s32 tcbd_change_memory_view(
	struct tcbd_device *_device, enum tcbd_remap_type _remap);

TCBB_FUNC s32 tcbd_demod_tune_frequency(
	struct tcbd_device *_device, u32 _freq_khz,	s32 _bw_khz);

TCBB_FUNC s32 tcbd_dsp_cold_start(struct tcbd_device *_device);
TCBB_FUNC s32 tcbd_dsp_warm_start(struct tcbd_device *_device);

TCBB_FUNC s32 tcbd_change_chip_addr(
	struct tcbd_device *_device, u8 addr);
TCBB_FUNC s32 tcbd_enable_slave_command_ack(
	struct tcbd_device *_device);

TCBB_FUNC s32 tcbd_enable_peri(struct tcbd_device *_device);
TCBB_FUNC s32 tcbd_disable_peri(struct tcbd_device *_device);
TCBB_FUNC s32 tcbd_init_bias_key(struct tcbd_device *_device);
TCBB_FUNC u32 tcbd_get_osc_clock(struct tcbd_device *_device);
TCBB_FUNC s32 tcbd_init_pll(
	struct tcbd_device *_device, enum tcbd_clock_type _clock_type);
TCBB_FUNC s32 tcbd_init_div_io(
	struct tcbd_device *_device, enum tcbd_div_io_type _div_io);
TCBB_FUNC s32 tcbd_init_dsp(
	struct tcbd_device *_device, u8 *_boot_code, s32 _size);

TCBB_FUNC s32 tcbd_check_dsp_status(struct tcbd_device *_device);

#define FILTER_ENABLE          (1<<2)
#define FILTER_SYNCERR         (1<<3)
TCBB_FUNC s32 tcbd_set_pid_filter(struct tcbd_device *_device, u32 _filter);
#endif /*__TCBD_DRV_IP_H__*/