/*
 * Realtek RTL2830 demodulator driver
 *
 * Copyright (c) 2008 Realtek
 * Copyright (c) 2008 Jan Hoogenraad, Barnaby Shearer, Andy Hasper
 * Copyright (C) 2009 Antti Palosaari <crope@iki.fi>
 *
 *    This program is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation; either version 2 of the License, or
 *    (at your option) any later version.
 *
 *    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., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 *
 * Thanks to Realtek for a lot of support we received !
 */

#ifndef RTL2830_PRIV_H
#define RTL2830_PRIV_H

#define LOG_PREFIX "rtl2830"

#define dprintk(var, level, args...) \
	    do { if ((var & level)) printk(args); } while (0)

#define debug_dump(b, l, func) {\
	int loop_; \
	for (loop_ = 0; loop_ < l; loop_++) \
		func("%02x ", b[loop_]); \
	func("\n");\
}

#define deb_info(args...) dprintk(rtl2830_debug, 0x01, args)

#undef err
#define err(f, arg...)  printk(KERN_ERR     LOG_PREFIX": " f "\n" , ## arg)
#undef info
#define info(f, arg...) printk(KERN_INFO    LOG_PREFIX": " f "\n" , ## arg)
#undef warn
#define warn(f, arg...) printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg)

//#define CFREQ_OFF_RATIO (1<<28) + (0x9d<<20) + (4<<12) + (23<<12) + (4<<0)
// 4bit page + 8bit addr + 8bit pos + 12bit len
// 0x19d04017
// 0x10000000 (1<<28)
// 0x 9D00000 (0x9d<<20)
// 0x   04000 (4<<12)
// 0x     017 (23<<0)

/*
page 0-4 = 3bit
reg 0-255 = 8bit
msb 0-31 = 5bit
lsb 0-7 = 3bit
len 0-31 = 5bit

*/
#if 1
#define DWBT_OPT_ADC_IQ		(0<<28) + (0x06<<20) + (4<<12) + (2<<0) //RTL2832","COL_M",5
#define DWBT_AD_EN_REG		(0<<28) + (0x08<<20) + (7<<12) + (1<<0) //RTL2832","COL_M",7
#define DWBT_AD_EN_REG1		(0<<28) + (0x08<<20) + (6<<12) + (1<<0) //RTL2832","COL_M",6
#define DWBT_BW_INDEX		(0<<28) + (0x08<<20) + (1<<12) + (2<<0) //RTL2830","COL_M",2
#define DWBT_AD_AV_REF		(0<<28) + (0x09<<20) + (0<<12) + (7<<0) //RTL2832","COL_M",6
#define DWBT_AD_AVI		(0<<28) + (0x09<<20) + (0<<12) + (2<<0) //RTL2832","COL_M",1
#define DWBT_AD_AVQ		(0<<28) + (0x09<<20) + (2<<12) + (2<<0) //RTL2832","COL_M",3
#define DWBT_REG_PI		(0<<28) + (0x0a<<20) + (0<<12) + (3<<0) //RTL283x","COL_M",2
#define DWBT_PD_DA8		(0<<28) + (0x0d<<20) + (4<<12) + (1<<0) //RTL2830","COL_M",4
#define DWBT_REG_GPE		(0<<28) + (0x0d<<20) + (7<<12) + (1<<0) //RTL2832","COL_M",7
#define DWBT_REG_MON		(0<<28) + (0x0d<<20) + (0<<12) + (2<<0) //RTL2832","COL_M",1
#define DWBT_REG_MONSEL		(0<<28) + (0x0d<<20) + (2<<12) + (1<<0) //RTL2832","COL_M",2
#define DWBT_REG_PFREQ_1_0	(0<<28) + (0x0d<<20) + (0<<12) + (2<<0) //RTL2830","COL_M",1
#define DWBT_SPEC_INIT_1	(0<<28) + (0x0d<<20) + (3<<12) + (1<<0) //RTL2830","COL_M",3
#define DWBT_POLAR_IF_AGC	(0<<28) + (0x0e<<20) + (0<<12) + (1<<0) //RTL283x","COL_M",0
#define DWBT_POLAR_RF_AGC	(0<<28) + (0x0e<<20) + (1<<12) + (1<<0) //RTL283x","COL_M",1
#define DWBT_REG_GPO		(0<<28) + (0x10<<20) + (0<<12) + (1<<0) //RTL2832","COL_M",0
#define DWBT_AD7_SETTING	(0<<28) + (0x11<<20) + (0<<12) + (16<<0) //RTL2832","COL_M",15
#define DWBT_REG_4MSEL		(0<<28) + (0x13<<20) + (0<<12) + (1<<0) //RTL2832","COL_M",0
#define DWBT_PIP_ON		(0<<28) + (0x21<<20) + (3<<12) + (1<<0) //RTL2832","COL_M",3
#define DWBT_CKOUT_PWR_PIP	(0<<28) + (0xb7<<20) + (3<<12) + (1<<0) //RTL2832","COL_M",3
#define DWBT_CKOUTPAR_PIP	(0<<28) + (0xb7<<20) + (4<<12) + (1<<0) //RTL2832","COL_M",4
#define DWBT_ERR_LVL_PIP	(0<<28) + (0xb7<<20) + (1<<12) + (1<<0) //RTL2832","COL_M",1
#define DWBT_SYNC_LVL_PIP	(0<<28) + (0xb7<<20) + (2<<12) + (1<<0) //RTL2832","COL_M",2
#define DWBT_VAL_LVL_PIP	(0<<28) + (0xb7<<20) + (0<<12) + (1<<0) //RTL2832","COL_M",0
#define DWBT_CKOUT_PWR_PID	(0<<28) + (0xb9<<20) + (3<<12) + (1<<0) //RTL2832","COL_M",3
#define DWBT_CKOUTPAR_PID	(0<<28) + (0xb9<<20) + (4<<12) + (1<<0) //RTL2832","COL_M",4
#define DWBT_ERR_LVL_PID	(0<<28) + (0xb9<<20) + (1<<12) + (1<<0) //RTL2832","COL_M",1
#define DWBT_SYNC_LVL_PID	(0<<28) + (0xb9<<20) + (2<<12) + (1<<0) //RTL2832","COL_M",2
#define DWBT_VAL_LVL_PID	(0<<28) + (0xb9<<20) + (0<<12) + (1<<0) //RTL2832","COL_M",0
#define DWBT_IIC_REPEAT		(1<<28) + (0x01<<20) + (3<<12) + (1<<0) //RTL283x","COL_M",3
#define DWBT_SOFT_RST		(1<<28) + (0x01<<20) + (2<<12) + (1<<0) //RTL283x","COL_M",2
#define DWBT_AGC_TARG_VAL_0	(1<<28) + (0x02<<20) + (0<<12) + (1<<0) //RTL2832","COL_M",0
#define DWBT_AGC_TARG_VAL	(1<<28) + (0x03<<20) + (0<<12) + (8<<0) //RTL2830","COL_M",7
#define DWBT_AGC_TARG_VAL_8_1	(1<<28) + (0x03<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_AAGC_HOLD		(1<<28) + (0x04<<20) + (5<<12) + (1<<0) //RTL283x","COL_M",5
#define DWBT_EN_IF_AGC		(1<<28) + (0x04<<20) + (7<<12) + (1<<0) //RTL283x","COL_M",7
#define DWBT_EN_RF_AGC		(1<<28) + (0x04<<20) + (6<<12) + (1<<0) //RTL283x","COL_M",6
#define DWBT_LOOP_GAIN_3_0	(1<<28) + (0x04<<20) + (1<<12) + (4<<0) //RTL2830","COL_M",4
#define DWBT_LOOP_GAIN2_3_0	(1<<28) + (0x04<<20) + (1<<12) + (4<<0) //RTL2832","COL_M",4
#define DWBT_LOOP_GAIN_4	(1<<28) + (0x05<<20) + (7<<12) + (1<<0) //RTL2830","COL_M",7
#define DWBT_LOOP_GAIN2_4	(1<<28) + (0x05<<20) + (7<<12) + (1<<0) //RTL2832","COL_M",7
#define DWBT_VTOP		(1<<28) + (0x06<<20) + (0<<12) + (6<<0) //RTL2830","COL_M",5
#define DWBT_VTOP1		(1<<28) + (0x06<<20) + (0<<12) + (6<<0) //RTL2832","COL_M",5
#define DWBT_KRF		(1<<28) + (0x07<<20) + (0<<12) + (6<<0) //RTL2830","COL_M",5
#define DWBT_KRF2		(1<<28) + (0x07<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_IF_AGC_MIN		(1<<28) + (0x08<<20) + (0<<12) + (8<<0) //RTL283x","COL_M",7
#define DWBT_IF_AGC_MAX		(1<<28) + (0x09<<20) + (0<<12) + (8<<0) //RTL283x","COL_M",7
#define DWBT_RF_AGC_MIN		(1<<28) + (0x0a<<20) + (0<<12) + (8<<0) //RTL283x","COL_M",7
#define DWBT_RF_AGC_MAX		(1<<28) + (0x0b<<20) + (0<<12) + (8<<0) //RTL283x","COL_M",7
#define DWBT_IF_AGC_MAN		(1<<28) + (0x0c<<20) + (6<<12) + (1<<0) //RTL283x","COL_M",6
#define DWBT_IF_AGC_MAN_VAL	(1<<28) + (0x0c<<20) + (0<<12) + (14<<0) //RTL283x","COL_M",13
#define DWBT_RF_AGC_MAN		(1<<28) + (0x0e<<20) + (6<<12) + (1<<0) //RTL283x","COL_M",6
#define DWBT_RF_AGC_MAN_VAL	(1<<28) + (0x0e<<20) + (0<<12) + (14<<0) //RTL283x","COL_M",13
#define DWBT_LOCK_TH		(1<<28) + (0x10<<20) + (0<<12) + (2<<0) //RTL2830","COL_M",1
#define DWBT_LOCK_TH_LEN	(1<<28) + (0x10<<20) + (2<<12) + (2<<0) //RTL2830","COL_M",3
#define DWBT_DAGC_TRG_VAL	(1<<28) + (0x12<<20) + (0<<12) + (8<<0) //RTL283x","COL_M",7
#define DWBT_SPEC_INV		(1<<28) + (0x15<<20) + (0<<12) + (1<<0) //RTL283x","COL_M",0
#define DWBT_PSET_IFFREQ	(1<<28) + (0x19<<20) + (0<<12) + (22<<0) //RTL283x","COL_M",21
#define DWBT_CCI_MON_SCAL	(1<<28) + (0x40<<20) + (6<<12) + (2<<0) //RTL2830","COL_M",7
#define DWBT_CCI_THRE		(1<<28) + (0x40<<20) + (2<<12) + (4<<0) //RTL2830","COL_M",5
#define DWBT_FUNC5_REG8		(1<<28) + (0x40<<20) + (0<<12) + (1<<0) //RTL2830","COL_M",0
#define DWBT_FUNC5_REG5		(1<<28) + (0x41<<20) + (0<<12) + (3<<0) //RTL2830","COL_M",2
#define DWBT_FUNC5_REG6		(1<<28) + (0x41<<20) + (3<<12) + (4<<0) //RTL2830","COL_M",6
#define DWBT_FUNC5_REG7		(1<<28) + (0x41<<20) + (7<<12) + (1<<0) //RTL2830","COL_M",7
#define DWBT_FUNC5_REG13	(1<<28) + (0x42<<20) + (7<<12) + (17<<0) //RTL2830","COL_M",23
#define DWBT_FUNC5_REG16	(1<<28) + (0x44<<20) + (6<<12) + (17<<0) //RTL2830","COL_M",22
#define DWBT_FUNC5_REG14	(1<<28) + (0x46<<20) + (5<<12) + (17<<0) //RTL2830","COL_M",21
#define DWBT_FUNC5_REG17	(1<<28) + (0x48<<20) + (4<<12) + (17<<0) //RTL2830","COL_M",20
#define DWBT_FUNC5_REG15	(1<<28) + (0x4a<<20) + (3<<12) + (17<<0) //RTL2830","COL_M",19
#define DWBT_FUNC5_REG18	(1<<28) + (0x4c<<20) + (2<<12) + (17<<0) //RTL2830","COL_M",18
#define DWBT_FUNC5_REG10	(1<<28) + (0x53<<20) + (0<<12) + (13<<0) //RTL2830","COL_M",12
#define DWBT_FUNC5_REG11	(1<<28) + (0x55<<20) + (0<<12) + (13<<0) //RTL2830","COL_M",12
#define DWBT_FUNC5_REG12	(1<<28) + (0x57<<20) + (0<<12) + (13<<0) //RTL2830","COL_M",12
#define DWBT_CCI_M0		(1<<28) + (0x5b<<20) + (0<<12) + (3<<0) //RTL2830","COL_M",2
#define DWBT_CCI_M1		(1<<28) + (0x5b<<20) + (3<<12) + (3<<0) //RTL2830","COL_M",5
#define DWBT_CCI_M2		(1<<28) + (0x5c<<20) + (0<<12) + (3<<0) //RTL2830","COL_M",2
#define DWBT_CCI_M3		(1<<28) + (0x5c<<20) + (3<<12) + (3<<0) //RTL2830","COL_M",5
#define DWBT_EN_CACQ_NOTCH	(1<<28) + (0x61<<20) + (4<<12) + (1<<0) //RTL2832","COL_M",4
#define DWBT_FUNC4_REG9		(1<<28) + (0x64<<20) + (0<<12) + (1<<0) //RTL2830","COL_M",0
#define DWBT_KB_P1		(1<<28) + (0x64<<20) + (1<<12) + (3<<0) //RTL2832","COL_M",3
#define DWBT_KB_P2		(1<<28) + (0x64<<20) + (4<<12) + (3<<0) //RTL2832","COL_M",6
#define DWBT_BTHD_P3		(1<<28) + (0x65<<20) + (0<<12) + (3<<0) //RTL2830","COL_M",2
#define DWBT_FUNC4_REG1		(1<<28) + (0x65<<20) + (0<<12) + (8<<0) //RTL2830","COL_M",7
#define DWBT_KB_P3		(1<<28) + (0x65<<20) + (0<<12) + (3<<0) //RTL2832","COL_M",2
#define DWBT_BTHD_D3		(1<<28) + (0x68<<20) + (4<<12) + (2<<0) //RTL2830","COL_M",5
#define DWBT_FUNC4_REG2		(1<<28) + (0x68<<20) + (0<<12) + (8<<0) //RTL2830","COL_M",7
#define DWBT_EN_TRK_SPAN	(1<<28) + (0x6d<<20) + (0<<12) + (1<<0) //RTL2830","COL_M",0
#define DWBT_TRK_KS_P2		(1<<28) + (0x6f<<20) + (0<<12) + (3<<0) //RTL283x","COL_M",2
#define DWBT_TRK_KS_I2		(1<<28) + (0x70<<20) + (3<<12) + (3<<0) //RTL283x","COL_M",5
#define DWBT_TR_THD_SET2	(1<<28) + (0x72<<20) + (0<<12) + (4<<0) //RTL283x","COL_M",3
#define DWBT_TRK_KC_P2		(1<<28) + (0x73<<20) + (3<<12) + (3<<0) //RTL283x","COL_M",5
#define DWBT_TRK_KC_I2		(1<<28) + (0x75<<20) + (0<<12) + (3<<0) //RTL283x","COL_M",2
#define DWBT_CR_THD_SET2	(1<<28) + (0x76<<20) + (6<<12) + (2<<0) //RTL283x","COL_M",7
#define DWBT_CK_OUT_PAR		(1<<28) + (0x7b<<20) + (5<<12) + (1<<0) //RTL2830","COL_M",5
#define DWBT_CK_OUT_PWR		(1<<28) + (0x7b<<20) + (6<<12) + (1<<0) //RTL2830","COL_M",6
#define DWBT_CKOUT_PWR		(1<<28) + (0x7b<<20) + (6<<12) + (1<<0) //RTL2832","COL_M",6
#define DWBT_CKOUTPAR		(1<<28) + (0x7b<<20) + (5<<12) + (1<<0) //RTL2832","COL_M",5
#define DWBT_SYNC_DUR		(1<<28) + (0x7b<<20) + (7<<12) + (1<<0) //RTL283x","COL_M",7
#define DWBT_ERR_DUR		(1<<28) + (0x7c<<20) + (0<<12) + (1<<0) //RTL283x","COL_M",0
#define DWBT_ERR_LVL		(1<<28) + (0x7c<<20) + (2<<12) + (1<<0) //RTL283x","COL_M",2
#define DWBT_SER_LSB		(1<<28) + (0x7c<<20) + (5<<12) + (1<<0) //RTL283x","COL_M",5
#define DWBT_SERIAL		(1<<28) + (0x7c<<20) + (4<<12) + (1<<0) //RTL283x","COL_M",4
#define DWBT_SYNC_LVL		(1<<28) + (0x7c<<20) + (1<<12) + (1<<0) //RTL283x","COL_M",1
#define DWBT_VAL_LVL		(1<<28) + (0x7c<<20) + (3<<12) + (1<<0) //RTL283x","COL_M",3
#define DWBT_CDIV_PH0		(1<<28) + (0x7d<<20) + (0<<12) + (4<<0) //RTL283x","COL_M",3
#define DWBT_CDIV_PH1		(1<<28) + (0x7d<<20) + (4<<12) + (4<<0) //RTL283x","COL_M",7
#define DWBT_TR_WAIT_MIN_8K	(1<<28) + (0x88<<20) + (2<<12) + (10<<0) //RTL283x","COL_M",11
#define DWBT_BER_PASS_SCAL	(1<<28) + (0x8c<<20) + (6<<12) + (6<<0) //RTL2830","COL_M",11
#define DWBT_RSD_BER_FAIL_VAL (1<<28) + (0x8f<<20) + (0<<12) + (16<<0) //RTL283x","COL_M",15
#define DWBT_FUNC4_REG0		(1<<28) + (0x93<<20) + (2<<12) + (2<<0) //RTL2830","COL_M",3
#define DWBT_SM_BYPASS		(1<<28) + (0x93<<20) + (0<<12) + (12<<0) //RTL2830","COL_M",11
#define DWBT_SM_PASS		(1<<28) + (0x93<<20) + (0<<12) + (12<<0) //RTL2832","COL_M",11
#define DWBT_SPEC_INIT_2	(1<<28) + (0x94<<20) + (1<<12) + (1<<0) //RTL2830","COL_M",1
#define DWBT_MGD_THD0		(1<<28) + (0x95<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_TEST_REG_1		(1<<28) + (0x95<<20) + (2<<12) + (5<<0) //RTL2830","COL_M",6
#define DWBT_MGD_THD1		(1<<28) + (0x96<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_TEST_REG_2		(1<<28) + (0x96<<20) + (3<<12) + (11<<0) //RTL2830","COL_M",13
#define DWBT_MGD_THD2		(1<<28) + (0x97<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_TEST_REG_3		(1<<28) + (0x97<<20) + (0<<12) + (22<<0) //RTL2830","COL_M",21
#define DWBT_MGD_THD3		(1<<28) + (0x98<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_TEST_REG_4		(1<<28) + (0x98<<20) + (1<<12) + (29<<0) //RTL2830","COL_M",29
#define DWBT_MGD_THD4		(1<<28) + (0x99<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_MGD_THD5		(1<<28) + (0x9a<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_MGD_THD6		(1<<28) + (0x9b<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_MGD_THD7		(1<<28) + (0x9c<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_CFREQ_OFF_RATIO	(1<<28) + (0x9d<<20) + (4<<12) + (20<<0) //RTL2832","COL_M",23
#define DWBT_RSAMP_RATIO	(1<<28) + (0x9f<<20) + (2<<12) + (26<<0) //RTL2832","COL_M",27
#define DWBT_EN_BK_TRK		(1<<28) + (0xa6<<20) + (7<<12) + (1<<0) //RTL283x","COL_M",7
#define DWBT_EN_BBIN		(1<<28) + (0xb1<<20) + (0<<12) + (1<<0) //RTL2832","COL_M",0
#define DWBT_AAGC_LOOP_GAIN	(1<<28) + (0xc7<<20) + (1<<12) + (5<<0) //RTL2832","COL_M",5
#define DWBT_LOOP_GAIN3		(1<<28) + (0xc8<<20) + (0<<12) + (5<<0) //RTL2832","COL_M",4
#define DWBT_VTOP2		(1<<28) + (0xc9<<20) + (0<<12) + (6<<0) //RTL2832","COL_M",5
#define DWBT_VTOP3		(1<<28) + (0xca<<20) + (0<<12) + (6<<0) //RTL2832","COL_M",5
#define DWBT_KRF1		(1<<28) + (0xcb<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_KRF3		(1<<28) + (0xcd<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_KRF4		(1<<28) + (0xce<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_EN_AGC_PGA		(1<<28) + (0xd7<<20) + (0<<12) + (1<<0) //RTL2832","COL_M",0
#define DWBT_INTER_CNT_LEN	(1<<28) + (0xd8<<20) + (0<<12) + (4<<0) //RTL2832","COL_M",3
#define DWBT_THD_LOCK_UP	(1<<28) + (0xd9<<20) + (0<<12) + (9<<0) //RTL2832","COL_M",8
#define DWBT_THD_LOCK_DW	(1<<28) + (0xdb<<20) + (0<<12) + (9<<0) //RTL2832","COL_M",8
#define DWBT_THD_UP1		(1<<28) + (0xdd<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_THD_DW1		(1<<28) + (0xde<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_EN_GI_PGA		(1<<28) + (0xe5<<20) + (0<<12) + (1<<0) //RTL2832","COL_M",0
#define DWBT_GI_PGA_STATE	(1<<28) + (0xe6<<20) + (3<<12) + (1<<0) //RTL2832","COL_M",3
#define DWBT_SCALE1_B92		(2<<28) + (0x92<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_SCALE1_B93		(2<<28) + (0x93<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_SCALE1_BA7		(2<<28) + (0xa7<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_SCALE1_BA9		(2<<28) + (0xa9<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_SCALE1_BAA		(2<<28) + (0xaa<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_SCALE1_BAB		(2<<28) + (0xab<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_SCALE1_BAC		(2<<28) + (0xac<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_K1_CR_STEP12	(2<<28) + (0xad<<20) + (4<<12) + (6<<0) //RTL2832","COL_M",9
#define DWBT_SCALE1_BB0		(2<<28) + (0xb0<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_SCALE1_BB1		(2<<28) + (0xb1<<20) + (0<<12) + (8<<0) //RTL2832","COL_M",7
#define DWBT_CE_FFSM_BYPASS	(2<<28) + (0xd5<<20) + (1<<12) + (1<<0) //RTL2830","COL_M",1
#define DWBT_FUNC5_REG9		(2<<28) + (0xdd<<20) + (0<<12) + (7<<0) //RTL2830","COL_M",6
#define DWBT_UPDATE_REG_2	(2<<28) + (0xe4<<20) + (7<<12) + (1<<0) //RTL2830","COL_M",7
#define DWBT_ALPHAIIR_DIF	(2<<28) + (0xf1<<20) + (3<<12) + (5<<0) //RTL2830","COL_M",7
#define DWBT_ALPHAIIR_N		(2<<28) + (0xf1<<20) + (1<<12) + (2<<0) //RTL2830","COL_M",2
#define DWBT_RSSI_R		(3<<28) + (0x01<<20) + (0<<12) + (7<<0) //RTL2832","COL_M",6
#define DWBT_SPEC_INIT_0	(3<<28) + (0x01<<20) + (0<<12) + (12<<0) //RTL2830","COL_M",11
#define DWBT_DAGC_VAL		(3<<28) + (0x05<<20) + (0<<12) + (8<<0) //RTL283x","COL_M",7
#define DWBT_ACI_DET_IND	(3<<28) + (0x12<<20) + (0<<12) + (1<<0) //RTL2832","COL_M",0
#define DWBT_SFREQ_OFF		(3<<28) + (0x18<<20) + (0<<12) + (14<<0) //RTL2832","COL_M",13
#define DWBT_FUNC5_REG1		(3<<28) + (0x1a<<20) + (3<<12) + (13<<0) //RTL2830","COL_M",15
#define DWBT_FUNC5_REG2		(3<<28) + (0x1c<<20) + (3<<12) + (13<<0) //RTL2830","COL_M",15
#define DWBT_FUNC5_REG3		(3<<28) + (0x1e<<20) + (3<<12) + (13<<0) //RTL2830","COL_M",15
#define DWBT_FUNC5_REG4		(3<<28) + (0x20<<20) + (3<<12) + (13<<0) //RTL2830","COL_M",15
#define DWBT_FUNC4_REG8		(3<<28) + (0x28<<20) + (3<<12) + (4<<0) //RTL2830","COL_M",6
#define DWBT_FUNC5_REG0		(3<<28) + (0x28<<20) + (3<<12) + (4<<0) //RTL2830","COL_M",6
#define DWBT_RX_CONSTEL		(3<<28) + (0x3c<<20) + (2<<12) + (2<<0) //RTL283x","COL_M",3
#define DWBT_RX_HIER		(3<<28) + (0x3c<<20) + (4<<12) + (3<<0) //RTL283x","COL_M",6
#define DWBT_FUNC4_REG3		(3<<28) + (0x3d<<20) + (6<<12) + (1<<0) //RTL2830","COL_M",6
#define DWBT_FUNC4_REG4		(3<<28) + (0x3d<<20) + (7<<12) + (1<<0) //RTL2830","COL_M",7
#define DWBT_RX_C_RATE_HP	(3<<28) + (0x3d<<20) + (3<<12) + (3<<0) //RTL283x","COL_M",5
#define DWBT_RX_C_RATE_LP	(3<<28) + (0x3d<<20) + (0<<12) + (3<<0) //RTL283x","COL_M",2
#define DWBT_RSD_BER_EST	(3<<28) + (0x4e<<20) + (0<<12) + (16<<0) //RTL283x","COL_M",15
#define DWBT_FUNC4_REG5		(3<<28) + (0x50<<20) + (0<<12) + (1<<0) //RTL2830","COL_M",0
#define DWBT_FUNC4_REG6		(3<<28) + (0x50<<20) + (1<<12) + (1<<0) //RTL2830","COL_M",1
#define DWBT_FFT_MODE_IDX	(3<<28) + (0x51<<20) + (2<<12) + (1<<0) //RTL283x","COL_M",2
#define DWBT_FSM_STAGE		(3<<28) + (0x51<<20) + (3<<12) + (4<<0) //RTL283x","COL_M",6
#define DWBT_GI_IDX		(3<<28) + (0x51<<20) + (0<<12) + (2<<0) //RTL283x","COL_M",1
#define DWBT_IF_AGC_VAL		(3<<28) + (0x59<<20) + (0<<12) + (14<<0) //RTL283x","COL_M",13
#define DWBT_RF_AGC_VAL		(3<<28) + (0x5b<<20) + (0<<12) + (14<<0) //RTL283x","COL_M",13
#define DWBT_CFREQ_OFF		(3<<28) + (0x5f<<20) + (0<<12) + (18<<0) //RTL2832","COL_M",17
#define DWBT_CE_EST_EVM		(4<<28) + (0x0c<<20) + (0<<12) + (16<<0) //RTL2832","COL_M",15
#define DWBT_EST_EVM		(4<<28) + (0x0c<<20) + (0<<12) + (16<<0) //RTL2830","COL_M",15
#define DWBT_FUNC4_REG10	(4<<28) + (0x10<<20) + (0<<12) + (14<<0) //RTL2830","COL_M",13
#define DWBT_FUNC4_REG7		(4<<28) + (0xad<<20) + (0<<12) + (4<<0) //RTL2830","COL_M",3
#endif
#endif                          /* RTL2830_PRIV_H */
