19a0bf528SMauro Carvalho Chehab /*
29a0bf528SMauro Carvalho Chehab  * drxd_firm.c : DRXD firmware tables
39a0bf528SMauro Carvalho Chehab  *
49a0bf528SMauro Carvalho Chehab  * Copyright (C) 2006-2007 Micronas
59a0bf528SMauro Carvalho Chehab  *
69a0bf528SMauro Carvalho Chehab  * This program is free software; you can redistribute it and/or
79a0bf528SMauro Carvalho Chehab  * modify it under the terms of the GNU General Public License
89a0bf528SMauro Carvalho Chehab  * version 2 only, as published by the Free Software Foundation.
99a0bf528SMauro Carvalho Chehab  *
109a0bf528SMauro Carvalho Chehab  *
119a0bf528SMauro Carvalho Chehab  * This program is distributed in the hope that it will be useful,
129a0bf528SMauro Carvalho Chehab  * but WITHOUT ANY WARRANTY; without even the implied warranty of
139a0bf528SMauro Carvalho Chehab  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
149a0bf528SMauro Carvalho Chehab  * GNU General Public License for more details.
159a0bf528SMauro Carvalho Chehab  *
169a0bf528SMauro Carvalho Chehab  *
179a0bf528SMauro Carvalho Chehab  * You should have received a copy of the GNU General Public License
189a0bf528SMauro Carvalho Chehab  * along with this program; if not, write to the Free Software
199a0bf528SMauro Carvalho Chehab  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
209a0bf528SMauro Carvalho Chehab  * 02110-1301, USA
219a0bf528SMauro Carvalho Chehab  * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
229a0bf528SMauro Carvalho Chehab  */
239a0bf528SMauro Carvalho Chehab 
249a0bf528SMauro Carvalho Chehab /* TODO: generate this file with a script from a settings file */
259a0bf528SMauro Carvalho Chehab 
269a0bf528SMauro Carvalho Chehab /* Contains A2 firmware version: 1.4.2
279a0bf528SMauro Carvalho Chehab  * Contains B1 firmware version: 3.3.33
289a0bf528SMauro Carvalho Chehab  * Contains settings from driver 1.4.23
299a0bf528SMauro Carvalho Chehab */
309a0bf528SMauro Carvalho Chehab 
319a0bf528SMauro Carvalho Chehab #include "drxd_firm.h"
329a0bf528SMauro Carvalho Chehab 
339a0bf528SMauro Carvalho Chehab #define ADDRESS(x)     ((x) & 0xFF), (((x)>>8) & 0xFF), (((x)>>16) & 0xFF), (((x)>>24) & 0xFF)
349a0bf528SMauro Carvalho Chehab #define LENGTH(x)      ((x) & 0xFF), (((x)>>8) & 0xFF)
359a0bf528SMauro Carvalho Chehab 
369a0bf528SMauro Carvalho Chehab /* Is written via block write, must be little endian */
379a0bf528SMauro Carvalho Chehab #define DATA16(x)      ((x) & 0xFF), (((x)>>8) & 0xFF)
389a0bf528SMauro Carvalho Chehab 
399a0bf528SMauro Carvalho Chehab #define WRBLOCK(a, l) ADDRESS(a), LENGTH(l)
409a0bf528SMauro Carvalho Chehab #define WR16(a, d) ADDRESS(a), LENGTH(1), DATA16(d)
419a0bf528SMauro Carvalho Chehab 
429a0bf528SMauro Carvalho Chehab #define END_OF_TABLE      0xFF, 0xFF, 0xFF, 0xFF
439a0bf528SMauro Carvalho Chehab 
449a0bf528SMauro Carvalho Chehab /* HI firmware patches */
459a0bf528SMauro Carvalho Chehab 
469a0bf528SMauro Carvalho Chehab #define HI_TR_FUNC_ADDR HI_IF_RAM_USR_BEGIN__A
479a0bf528SMauro Carvalho Chehab #define HI_TR_FUNC_SIZE 9	/* size of this function in instruction words */
489a0bf528SMauro Carvalho Chehab 
499a0bf528SMauro Carvalho Chehab u8 DRXD_InitAtomicRead[] = {
509a0bf528SMauro Carvalho Chehab 	WRBLOCK(HI_TR_FUNC_ADDR, HI_TR_FUNC_SIZE),
519a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;           */
529a0bf528SMauro Carvalho Chehab 	0x60, 0x04,		/* r0rami.dt -> ring.xba;           */
539a0bf528SMauro Carvalho Chehab 	0x61, 0x04,		/* r0rami.dt -> ring.xad;           */
549a0bf528SMauro Carvalho Chehab 	0xE3, 0x07,		/* HI_RA_RAM_USR_BEGIN -> ring.iad; */
559a0bf528SMauro Carvalho Chehab 	0x40, 0x00,		/* (long immediate)                 */
569a0bf528SMauro Carvalho Chehab 	0x64, 0x04,		/* r0rami.dt -> ring.len;           */
579a0bf528SMauro Carvalho Chehab 	0x65, 0x04,		/* r0rami.dt -> ring.ctl;           */
589a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;           */
599a0bf528SMauro Carvalho Chehab 	0x38, 0x00,		/* 0         -> jumps.ad;           */
609a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
619a0bf528SMauro Carvalho Chehab };
629a0bf528SMauro Carvalho Chehab 
639a0bf528SMauro Carvalho Chehab /* Pins D0 and D1 of the parallel MPEG output can be used
649a0bf528SMauro Carvalho Chehab    to set the I2C address of a device. */
659a0bf528SMauro Carvalho Chehab 
669a0bf528SMauro Carvalho Chehab #define HI_RST_FUNC_ADDR (HI_IF_RAM_USR_BEGIN__A + HI_TR_FUNC_SIZE)
679a0bf528SMauro Carvalho Chehab #define HI_RST_FUNC_SIZE 54	/* size of this function in instruction words */
689a0bf528SMauro Carvalho Chehab 
699a0bf528SMauro Carvalho Chehab /* D0 Version */
709a0bf528SMauro Carvalho Chehab u8 DRXD_HiI2cPatch_1[] = {
719a0bf528SMauro Carvalho Chehab 	WRBLOCK(HI_RST_FUNC_ADDR, HI_RST_FUNC_SIZE),
729a0bf528SMauro Carvalho Chehab 	0xC8, 0x07, 0x01, 0x00,	/* MASK      -> reg0.dt;                        */
739a0bf528SMauro Carvalho Chehab 	0xE0, 0x07, 0x15, 0x02,	/* (EC__BLK << 6) + EC_OC_REG__BNK -> ring.xba; */
749a0bf528SMauro Carvalho Chehab 	0xE1, 0x07, 0x12, 0x00,	/* EC_OC_REG_OC_MPG_SIO__A -> ring.xad;         */
759a0bf528SMauro Carvalho Chehab 	0xA2, 0x00,		/* M_BNK_ID_DAT -> ring.iba;                    */
769a0bf528SMauro Carvalho Chehab 	0x23, 0x00,		/* &data     -> ring.iad;                       */
779a0bf528SMauro Carvalho Chehab 	0x24, 0x00,		/* 0         -> ring.len;                       */
789a0bf528SMauro Carvalho Chehab 	0xA5, 0x02,		/* M_RC_CTR_SWAP | M_RC_CTR_READ -> ring.ctl;   */
799a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;                       */
809a0bf528SMauro Carvalho Chehab 	0x42, 0x00,		/* &data+1   -> w0ram.ad;                       */
819a0bf528SMauro Carvalho Chehab 	0xC0, 0x07, 0xFF, 0x0F,	/* -1        -> w0ram.dt;                       */
829a0bf528SMauro Carvalho Chehab 	0x63, 0x00,		/* &data+1   -> ring.iad;                       */
839a0bf528SMauro Carvalho Chehab 	0x65, 0x02,		/* M_RC_CTR_SWAP | M_RC_CTR_WRITE -> ring.ctl;  */
849a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;                       */
859a0bf528SMauro Carvalho Chehab 	0xE1, 0x07, 0x38, 0x00,	/* EC_OC_REG_OCR_MPG_USR_DAT__A -> ring.xad;    */
869a0bf528SMauro Carvalho Chehab 	0xA5, 0x02,		/* M_RC_CTR_SWAP | M_RC_CTR_READ -> ring.ctl;   */
879a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;                       */
889a0bf528SMauro Carvalho Chehab 	0xE1, 0x07, 0x12, 0x00,	/* EC_OC_REG_OC_MPG_SIO__A -> ring.xad;         */
899a0bf528SMauro Carvalho Chehab 	0x23, 0x00,		/* &data     -> ring.iad;                       */
909a0bf528SMauro Carvalho Chehab 	0x65, 0x02,		/* M_RC_CTR_SWAP | M_RC_CTR_WRITE -> ring.ctl;  */
919a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;                       */
929a0bf528SMauro Carvalho Chehab 	0x42, 0x00,		/* &data+1   -> w0ram.ad;                       */
939a0bf528SMauro Carvalho Chehab 	0x0F, 0x04,		/* r0ram.dt  -> and.op;                         */
949a0bf528SMauro Carvalho Chehab 	0x1C, 0x06,		/* reg0.dt   -> and.tr;                         */
959a0bf528SMauro Carvalho Chehab 	0xCF, 0x04,		/* and.rs    -> add.op;                         */
969a0bf528SMauro Carvalho Chehab 	0xD0, 0x07, 0x70, 0x00,	/* DEF_DEV_ID -> add.tr;                        */
979a0bf528SMauro Carvalho Chehab 	0xD0, 0x04,		/* add.rs    -> add.tr;                         */
989a0bf528SMauro Carvalho Chehab 	0xC8, 0x04,		/* add.rs    -> reg0.dt;                        */
999a0bf528SMauro Carvalho Chehab 	0x60, 0x00,		/* reg0.dt   -> w0ram.dt;                       */
1009a0bf528SMauro Carvalho Chehab 	0xC2, 0x07, 0x10, 0x00,	/* SLV0_BASE -> w0rami.ad;                      */
1019a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
1029a0bf528SMauro Carvalho Chehab 	0x01, 0x06,		/* reg0.dt   -> w0rami.dt;                      */
1039a0bf528SMauro Carvalho Chehab 	0xC2, 0x07, 0x20, 0x00,	/* SLV1_BASE -> w0rami.ad;                      */
1049a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
1059a0bf528SMauro Carvalho Chehab 	0x01, 0x06,		/* reg0.dt   -> w0rami.dt;                      */
1069a0bf528SMauro Carvalho Chehab 	0xC2, 0x07, 0x30, 0x00,	/* CMD_BASE  -> w0rami.ad;                      */
1079a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
1089a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
1099a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
1109a0bf528SMauro Carvalho Chehab 	0x68, 0x00,		/* M_IC_SEL_PT1 -> i2c.sel;                     */
1119a0bf528SMauro Carvalho Chehab 	0x29, 0x00,		/* M_IC_CMD_RESET -> i2c.cmd;                   */
1129a0bf528SMauro Carvalho Chehab 	0x28, 0x00,		/* M_IC_SEL_PT0 -> i2c.sel;                     */
1139a0bf528SMauro Carvalho Chehab 	0x29, 0x00,		/* M_IC_CMD_RESET -> i2c.cmd;                   */
1149a0bf528SMauro Carvalho Chehab 	0xF8, 0x07, 0x2F, 0x00,	/* 0x2F      -> jumps.ad;                       */
1159a0bf528SMauro Carvalho Chehab 
1169a0bf528SMauro Carvalho Chehab 	WR16((B_HI_IF_RAM_TRP_BPT0__AX + ((2 * 0) + 1)),
1179a0bf528SMauro Carvalho Chehab 	     (u16) (HI_RST_FUNC_ADDR & 0x3FF)),
1189a0bf528SMauro Carvalho Chehab 	WR16((B_HI_IF_RAM_TRP_BPT0__AX + ((2 * 1) + 1)),
1199a0bf528SMauro Carvalho Chehab 	     (u16) (HI_RST_FUNC_ADDR & 0x3FF)),
1209a0bf528SMauro Carvalho Chehab 	WR16((B_HI_IF_RAM_TRP_BPT0__AX + ((2 * 2) + 1)),
1219a0bf528SMauro Carvalho Chehab 	     (u16) (HI_RST_FUNC_ADDR & 0x3FF)),
1229a0bf528SMauro Carvalho Chehab 	WR16((B_HI_IF_RAM_TRP_BPT0__AX + ((2 * 3) + 1)),
1239a0bf528SMauro Carvalho Chehab 	     (u16) (HI_RST_FUNC_ADDR & 0x3FF)),
1249a0bf528SMauro Carvalho Chehab 
1259a0bf528SMauro Carvalho Chehab 	/* Force quick and dirty reset */
1269a0bf528SMauro Carvalho Chehab 	WR16(B_HI_CT_REG_COMM_STATE__A, 0),
1279a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
1289a0bf528SMauro Carvalho Chehab };
1299a0bf528SMauro Carvalho Chehab 
1309a0bf528SMauro Carvalho Chehab /* D0,D1 Version */
1319a0bf528SMauro Carvalho Chehab u8 DRXD_HiI2cPatch_3[] = {
1329a0bf528SMauro Carvalho Chehab 	WRBLOCK(HI_RST_FUNC_ADDR, HI_RST_FUNC_SIZE),
1339a0bf528SMauro Carvalho Chehab 	0xC8, 0x07, 0x03, 0x00,	/* MASK      -> reg0.dt;                        */
1349a0bf528SMauro Carvalho Chehab 	0xE0, 0x07, 0x15, 0x02,	/* (EC__BLK << 6) + EC_OC_REG__BNK -> ring.xba; */
1359a0bf528SMauro Carvalho Chehab 	0xE1, 0x07, 0x12, 0x00,	/* EC_OC_REG_OC_MPG_SIO__A -> ring.xad;         */
1369a0bf528SMauro Carvalho Chehab 	0xA2, 0x00,		/* M_BNK_ID_DAT -> ring.iba;                    */
1379a0bf528SMauro Carvalho Chehab 	0x23, 0x00,		/* &data     -> ring.iad;                       */
1389a0bf528SMauro Carvalho Chehab 	0x24, 0x00,		/* 0         -> ring.len;                       */
1399a0bf528SMauro Carvalho Chehab 	0xA5, 0x02,		/* M_RC_CTR_SWAP | M_RC_CTR_READ -> ring.ctl;   */
1409a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;                       */
1419a0bf528SMauro Carvalho Chehab 	0x42, 0x00,		/* &data+1   -> w0ram.ad;                       */
1429a0bf528SMauro Carvalho Chehab 	0xC0, 0x07, 0xFF, 0x0F,	/* -1        -> w0ram.dt;                       */
1439a0bf528SMauro Carvalho Chehab 	0x63, 0x00,		/* &data+1   -> ring.iad;                       */
1449a0bf528SMauro Carvalho Chehab 	0x65, 0x02,		/* M_RC_CTR_SWAP | M_RC_CTR_WRITE -> ring.ctl;  */
1459a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;                       */
1469a0bf528SMauro Carvalho Chehab 	0xE1, 0x07, 0x38, 0x00,	/* EC_OC_REG_OCR_MPG_USR_DAT__A -> ring.xad;    */
1479a0bf528SMauro Carvalho Chehab 	0xA5, 0x02,		/* M_RC_CTR_SWAP | M_RC_CTR_READ -> ring.ctl;   */
1489a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;                       */
1499a0bf528SMauro Carvalho Chehab 	0xE1, 0x07, 0x12, 0x00,	/* EC_OC_REG_OC_MPG_SIO__A -> ring.xad;         */
1509a0bf528SMauro Carvalho Chehab 	0x23, 0x00,		/* &data     -> ring.iad;                       */
1519a0bf528SMauro Carvalho Chehab 	0x65, 0x02,		/* M_RC_CTR_SWAP | M_RC_CTR_WRITE -> ring.ctl;  */
1529a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* 0         -> ring.rdy;                       */
1539a0bf528SMauro Carvalho Chehab 	0x42, 0x00,		/* &data+1   -> w0ram.ad;                       */
1549a0bf528SMauro Carvalho Chehab 	0x0F, 0x04,		/* r0ram.dt  -> and.op;                         */
1559a0bf528SMauro Carvalho Chehab 	0x1C, 0x06,		/* reg0.dt   -> and.tr;                         */
1569a0bf528SMauro Carvalho Chehab 	0xCF, 0x04,		/* and.rs    -> add.op;                         */
1579a0bf528SMauro Carvalho Chehab 	0xD0, 0x07, 0x70, 0x00,	/* DEF_DEV_ID -> add.tr;                        */
1589a0bf528SMauro Carvalho Chehab 	0xD0, 0x04,		/* add.rs    -> add.tr;                         */
1599a0bf528SMauro Carvalho Chehab 	0xC8, 0x04,		/* add.rs    -> reg0.dt;                        */
1609a0bf528SMauro Carvalho Chehab 	0x60, 0x00,		/* reg0.dt   -> w0ram.dt;                       */
1619a0bf528SMauro Carvalho Chehab 	0xC2, 0x07, 0x10, 0x00,	/* SLV0_BASE -> w0rami.ad;                      */
1629a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
1639a0bf528SMauro Carvalho Chehab 	0x01, 0x06,		/* reg0.dt   -> w0rami.dt;                      */
1649a0bf528SMauro Carvalho Chehab 	0xC2, 0x07, 0x20, 0x00,	/* SLV1_BASE -> w0rami.ad;                      */
1659a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
1669a0bf528SMauro Carvalho Chehab 	0x01, 0x06,		/* reg0.dt   -> w0rami.dt;                      */
1679a0bf528SMauro Carvalho Chehab 	0xC2, 0x07, 0x30, 0x00,	/* CMD_BASE  -> w0rami.ad;                      */
1689a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
1699a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
1709a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* 0         -> w0rami.dt;                      */
1719a0bf528SMauro Carvalho Chehab 	0x68, 0x00,		/* M_IC_SEL_PT1 -> i2c.sel;                     */
1729a0bf528SMauro Carvalho Chehab 	0x29, 0x00,		/* M_IC_CMD_RESET -> i2c.cmd;                   */
1739a0bf528SMauro Carvalho Chehab 	0x28, 0x00,		/* M_IC_SEL_PT0 -> i2c.sel;                     */
1749a0bf528SMauro Carvalho Chehab 	0x29, 0x00,		/* M_IC_CMD_RESET -> i2c.cmd;                   */
1759a0bf528SMauro Carvalho Chehab 	0xF8, 0x07, 0x2F, 0x00,	/* 0x2F      -> jumps.ad;                       */
1769a0bf528SMauro Carvalho Chehab 
1779a0bf528SMauro Carvalho Chehab 	WR16((B_HI_IF_RAM_TRP_BPT0__AX + ((2 * 0) + 1)),
1789a0bf528SMauro Carvalho Chehab 	     (u16) (HI_RST_FUNC_ADDR & 0x3FF)),
1799a0bf528SMauro Carvalho Chehab 	WR16((B_HI_IF_RAM_TRP_BPT0__AX + ((2 * 1) + 1)),
1809a0bf528SMauro Carvalho Chehab 	     (u16) (HI_RST_FUNC_ADDR & 0x3FF)),
1819a0bf528SMauro Carvalho Chehab 	WR16((B_HI_IF_RAM_TRP_BPT0__AX + ((2 * 2) + 1)),
1829a0bf528SMauro Carvalho Chehab 	     (u16) (HI_RST_FUNC_ADDR & 0x3FF)),
1839a0bf528SMauro Carvalho Chehab 	WR16((B_HI_IF_RAM_TRP_BPT0__AX + ((2 * 3) + 1)),
1849a0bf528SMauro Carvalho Chehab 	     (u16) (HI_RST_FUNC_ADDR & 0x3FF)),
1859a0bf528SMauro Carvalho Chehab 
1869a0bf528SMauro Carvalho Chehab 	/* Force quick and dirty reset */
1879a0bf528SMauro Carvalho Chehab 	WR16(B_HI_CT_REG_COMM_STATE__A, 0),
1889a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
1899a0bf528SMauro Carvalho Chehab };
1909a0bf528SMauro Carvalho Chehab 
1919a0bf528SMauro Carvalho Chehab u8 DRXD_ResetCEFR[] = {
1929a0bf528SMauro Carvalho Chehab 	WRBLOCK(CE_REG_FR_TREAL00__A, 57),
1939a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL00__A */
1949a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG00__A */
1959a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL01__A */
1969a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG01__A */
1979a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL02__A */
1989a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG02__A */
1999a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL03__A */
2009a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG03__A */
2019a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL04__A */
2029a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG04__A */
2039a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL05__A */
2049a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG05__A */
2059a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL06__A */
2069a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG06__A */
2079a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL07__A */
2089a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG07__A */
2099a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL08__A */
2109a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG08__A */
2119a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL09__A */
2129a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG09__A */
2139a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL10__A */
2149a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG10__A */
2159a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_TREAL11__A */
2169a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_TIMAG11__A */
2179a0bf528SMauro Carvalho Chehab 
2189a0bf528SMauro Carvalho Chehab 	0x52, 0x00,		/* CE_REG_FR_MID_TAP__A */
2199a0bf528SMauro Carvalho Chehab 
2209a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G00__A */
2219a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G01__A */
2229a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G02__A */
2239a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G03__A */
2249a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G04__A */
2259a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G05__A */
2269a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G06__A */
2279a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G07__A */
2289a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G08__A */
2299a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G09__A */
2309a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G10__A */
2319a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G11__A */
2329a0bf528SMauro Carvalho Chehab 	0x0B, 0x00,		/* CE_REG_FR_SQS_G12__A */
2339a0bf528SMauro Carvalho Chehab 
2349a0bf528SMauro Carvalho Chehab 	0xFF, 0x01,		/* CE_REG_FR_RIO_G00__A */
2359a0bf528SMauro Carvalho Chehab 	0x90, 0x01,		/* CE_REG_FR_RIO_G01__A */
2369a0bf528SMauro Carvalho Chehab 	0x0B, 0x01,		/* CE_REG_FR_RIO_G02__A */
2379a0bf528SMauro Carvalho Chehab 	0xC8, 0x00,		/* CE_REG_FR_RIO_G03__A */
2389a0bf528SMauro Carvalho Chehab 	0xA0, 0x00,		/* CE_REG_FR_RIO_G04__A */
2399a0bf528SMauro Carvalho Chehab 	0x85, 0x00,		/* CE_REG_FR_RIO_G05__A */
2409a0bf528SMauro Carvalho Chehab 	0x72, 0x00,		/* CE_REG_FR_RIO_G06__A */
2419a0bf528SMauro Carvalho Chehab 	0x64, 0x00,		/* CE_REG_FR_RIO_G07__A */
2429a0bf528SMauro Carvalho Chehab 	0x59, 0x00,		/* CE_REG_FR_RIO_G08__A */
2439a0bf528SMauro Carvalho Chehab 	0x50, 0x00,		/* CE_REG_FR_RIO_G09__A */
2449a0bf528SMauro Carvalho Chehab 	0x49, 0x00,		/* CE_REG_FR_RIO_G10__A */
2459a0bf528SMauro Carvalho Chehab 
2469a0bf528SMauro Carvalho Chehab 	0x10, 0x00,		/* CE_REG_FR_MODE__A     */
2479a0bf528SMauro Carvalho Chehab 	0x78, 0x00,		/* CE_REG_FR_SQS_TRH__A  */
2489a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_FR_RIO_GAIN__A */
2499a0bf528SMauro Carvalho Chehab 	0x00, 0x02,		/* CE_REG_FR_BYPASS__A   */
2509a0bf528SMauro Carvalho Chehab 	0x0D, 0x00,		/* CE_REG_FR_PM_SET__A   */
2519a0bf528SMauro Carvalho Chehab 	0x07, 0x00,		/* CE_REG_FR_ERR_SH__A   */
2529a0bf528SMauro Carvalho Chehab 	0x04, 0x00,		/* CE_REG_FR_MAN_SH__A   */
2539a0bf528SMauro Carvalho Chehab 	0x06, 0x00,		/* CE_REG_FR_TAP_SH__A   */
2549a0bf528SMauro Carvalho Chehab 
2559a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
2569a0bf528SMauro Carvalho Chehab };
2579a0bf528SMauro Carvalho Chehab 
2589a0bf528SMauro Carvalho Chehab u8 DRXD_InitFEA2_1[] = {
2599a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_AD_REG_PD__A, 3),
2609a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AD_REG_PD__A          */
2619a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* FE_AD_REG_INVEXT__A      */
2629a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AD_REG_CLKNEG__A      */
2639a0bf528SMauro Carvalho Chehab 
2649a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_AG_REG_DCE_AUR_CNT__A, 2),
2659a0bf528SMauro Carvalho Chehab 	0x10, 0x00,		/* FE_AG_REG_DCE_AUR_CNT__A */
2669a0bf528SMauro Carvalho Chehab 	0x10, 0x00,		/* FE_AG_REG_DCE_RUR_CNT__A */
2679a0bf528SMauro Carvalho Chehab 
2689a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_AG_REG_ACE_AUR_CNT__A, 2),
2699a0bf528SMauro Carvalho Chehab 	0x0E, 0x00,		/* FE_AG_REG_ACE_AUR_CNT__A */
2709a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_ACE_RUR_CNT__A */
2719a0bf528SMauro Carvalho Chehab 
2729a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_AG_REG_EGC_FLA_RGN__A, 5),
2739a0bf528SMauro Carvalho Chehab 	0x04, 0x00,		/* FE_AG_REG_EGC_FLA_RGN__A */
2749a0bf528SMauro Carvalho Chehab 	0x1F, 0x00,		/* FE_AG_REG_EGC_SLO_RGN__A */
2759a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_EGC_JMP_PSN__A */
2769a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_EGC_FLA_INC__A */
2779a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_EGC_FLA_DEC__A */
2789a0bf528SMauro Carvalho Chehab 
2799a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_AG_REG_GC1_AGC_MAX__A, 2),
2809a0bf528SMauro Carvalho Chehab 	0xFF, 0x01,		/* FE_AG_REG_GC1_AGC_MAX__A */
2819a0bf528SMauro Carvalho Chehab 	0x00, 0xFE,		/* FE_AG_REG_GC1_AGC_MIN__A */
2829a0bf528SMauro Carvalho Chehab 
2839a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_AG_REG_IND_WIN__A, 29),
2849a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_IND_WIN__A     */
2859a0bf528SMauro Carvalho Chehab 	0x05, 0x00,		/* FE_AG_REG_IND_THD_LOL__A */
2869a0bf528SMauro Carvalho Chehab 	0x0F, 0x00,		/* FE_AG_REG_IND_THD_HIL__A */
2879a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_IND_DEL__A     don't care */
2889a0bf528SMauro Carvalho Chehab 	0x1E, 0x00,		/* FE_AG_REG_IND_PD1_WRI__A */
2899a0bf528SMauro Carvalho Chehab 	0x0C, 0x00,		/* FE_AG_REG_PDA_AUR_CNT__A */
2909a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_PDA_RUR_CNT__A */
2919a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_PDA_AVE_DAT__A don't care  */
2929a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_PDC_RUR_CNT__A */
2939a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* FE_AG_REG_PDC_SET_LVL__A */
2949a0bf528SMauro Carvalho Chehab 	0x02, 0x00,		/* FE_AG_REG_PDC_FLA_RGN__A */
2959a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_PDC_JMP_PSN__A don't care  */
2969a0bf528SMauro Carvalho Chehab 	0xFF, 0xFF,		/* FE_AG_REG_PDC_FLA_STP__A */
2979a0bf528SMauro Carvalho Chehab 	0xFF, 0xFF,		/* FE_AG_REG_PDC_SLO_STP__A */
2989a0bf528SMauro Carvalho Chehab 	0x00, 0x1F,		/* FE_AG_REG_PDC_PD2_WRI__A don't care  */
2999a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_PDC_MAP_DAT__A don't care  */
3009a0bf528SMauro Carvalho Chehab 	0x02, 0x00,		/* FE_AG_REG_PDC_MAX__A     */
3019a0bf528SMauro Carvalho Chehab 	0x0C, 0x00,		/* FE_AG_REG_TGA_AUR_CNT__A */
3029a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_TGA_RUR_CNT__A */
3039a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_TGA_AVE_DAT__A don't care  */
3049a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_TGC_RUR_CNT__A */
3059a0bf528SMauro Carvalho Chehab 	0x22, 0x00,		/* FE_AG_REG_TGC_SET_LVL__A */
3069a0bf528SMauro Carvalho Chehab 	0x15, 0x00,		/* FE_AG_REG_TGC_FLA_RGN__A */
3079a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_TGC_JMP_PSN__A don't care  */
3089a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* FE_AG_REG_TGC_FLA_STP__A */
3099a0bf528SMauro Carvalho Chehab 	0x0A, 0x00,		/* FE_AG_REG_TGC_SLO_STP__A */
3109a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_TGC_MAP_DAT__A don't care  */
3119a0bf528SMauro Carvalho Chehab 	0x10, 0x00,		/* FE_AG_REG_FGA_AUR_CNT__A */
3129a0bf528SMauro Carvalho Chehab 	0x10, 0x00,		/* FE_AG_REG_FGA_RUR_CNT__A */
3139a0bf528SMauro Carvalho Chehab 
3149a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_AG_REG_BGC_FGC_WRI__A, 2),
3159a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_BGC_FGC_WRI__A */
3169a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_AG_REG_BGC_CGC_WRI__A */
3179a0bf528SMauro Carvalho Chehab 
3189a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_FD_REG_SCL__A, 3),
3199a0bf528SMauro Carvalho Chehab 	0x05, 0x00,		/* FE_FD_REG_SCL__A         */
3209a0bf528SMauro Carvalho Chehab 	0x03, 0x00,		/* FE_FD_REG_MAX_LEV__A     */
3219a0bf528SMauro Carvalho Chehab 	0x05, 0x00,		/* FE_FD_REG_NR__A          */
3229a0bf528SMauro Carvalho Chehab 
3239a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_CF_REG_SCL__A, 5),
3249a0bf528SMauro Carvalho Chehab 	0x16, 0x00,		/* FE_CF_REG_SCL__A         */
3259a0bf528SMauro Carvalho Chehab 	0x04, 0x00,		/* FE_CF_REG_MAX_LEV__A     */
3269a0bf528SMauro Carvalho Chehab 	0x06, 0x00,		/* FE_CF_REG_NR__A          */
3279a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_CF_REG_IMP_VAL__A     */
3289a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* FE_CF_REG_MEAS_VAL__A    */
3299a0bf528SMauro Carvalho Chehab 
3309a0bf528SMauro Carvalho Chehab 	WRBLOCK(FE_CU_REG_FRM_CNT_RST__A, 2),
3319a0bf528SMauro Carvalho Chehab 	0x00, 0x08,		/* FE_CU_REG_FRM_CNT_RST__A */
3329a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* FE_CU_REG_FRM_CNT_STR__A */
3339a0bf528SMauro Carvalho Chehab 
3349a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
3359a0bf528SMauro Carvalho Chehab };
3369a0bf528SMauro Carvalho Chehab 
3379a0bf528SMauro Carvalho Chehab    /* with PGA */
3389a0bf528SMauro Carvalho Chehab /*   WR16COND( DRXD_WITH_PGA, FE_AG_REG_AG_PGA_MODE__A   , 0x0004), */
3399a0bf528SMauro Carvalho Chehab    /* without PGA */
3409a0bf528SMauro Carvalho Chehab /*   WR16COND( DRXD_WITHOUT_PGA, FE_AG_REG_AG_PGA_MODE__A   , 0x0001), */
3419a0bf528SMauro Carvalho Chehab /*   WR16(FE_AG_REG_AG_AGC_SIO__A,  (extAttr -> FeAgRegAgAgcSio), 0x0000 );*/
3429a0bf528SMauro Carvalho Chehab /*   WR16(FE_AG_REG_AG_PWD__A        ,(extAttr -> FeAgRegAgPwd), 0x0000 );*/
3439a0bf528SMauro Carvalho Chehab 
3449a0bf528SMauro Carvalho Chehab u8 DRXD_InitFEA2_2[] = {
3459a0bf528SMauro Carvalho Chehab 	WR16(FE_AG_REG_CDR_RUR_CNT__A, 0x0010),
3469a0bf528SMauro Carvalho Chehab 	WR16(FE_AG_REG_FGM_WRI__A, 48),
3479a0bf528SMauro Carvalho Chehab 	/* Activate measurement, activate scale */
3489a0bf528SMauro Carvalho Chehab 	WR16(FE_FD_REG_MEAS_VAL__A, 0x0001),
3499a0bf528SMauro Carvalho Chehab 
3509a0bf528SMauro Carvalho Chehab 	WR16(FE_CU_REG_COMM_EXEC__A, 0x0001),
3519a0bf528SMauro Carvalho Chehab 	WR16(FE_CF_REG_COMM_EXEC__A, 0x0001),
3529a0bf528SMauro Carvalho Chehab 	WR16(FE_IF_REG_COMM_EXEC__A, 0x0001),
3539a0bf528SMauro Carvalho Chehab 	WR16(FE_FD_REG_COMM_EXEC__A, 0x0001),
3549a0bf528SMauro Carvalho Chehab 	WR16(FE_FS_REG_COMM_EXEC__A, 0x0001),
3559a0bf528SMauro Carvalho Chehab 	WR16(FE_AD_REG_COMM_EXEC__A, 0x0001),
3569a0bf528SMauro Carvalho Chehab 	WR16(FE_AG_REG_COMM_EXEC__A, 0x0001),
3579a0bf528SMauro Carvalho Chehab 	WR16(FE_AG_REG_AG_MODE_LOP__A, 0x895E),
3589a0bf528SMauro Carvalho Chehab 
3599a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
3609a0bf528SMauro Carvalho Chehab };
3619a0bf528SMauro Carvalho Chehab 
3629a0bf528SMauro Carvalho Chehab u8 DRXD_InitFEB1_1[] = {
3639a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AD_REG_PD__A, 0x0000),
3649a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AD_REG_CLKNEG__A, 0x0000),
3659a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_BGC_FGC_WRI__A, 0x0000),
3669a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_BGC_CGC_WRI__A, 0x0000),
3679a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_AG_MODE_LOP__A, 0x000a),
3689a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_IND_PD1_WRI__A, 35),
3699a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_IND_WIN__A, 0),
3709a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_IND_THD_LOL__A, 8),
3719a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_IND_THD_HIL__A, 8),
3729a0bf528SMauro Carvalho Chehab 	WR16(B_FE_CF_REG_IMP_VAL__A, 1),
3739a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_EGC_FLA_RGN__A, 7),
3749a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
3759a0bf528SMauro Carvalho Chehab };
3769a0bf528SMauro Carvalho Chehab 
3779a0bf528SMauro Carvalho Chehab 	/* with PGA */
3789a0bf528SMauro Carvalho Chehab /*      WR16(B_FE_AG_REG_AG_PGA_MODE__A   , 0x0000, 0x0000); */
3799a0bf528SMauro Carvalho Chehab        /* without PGA */
3809a0bf528SMauro Carvalho Chehab /*      WR16(B_FE_AG_REG_AG_PGA_MODE__A   ,
3819a0bf528SMauro Carvalho Chehab 	     B_FE_AG_REG_AG_PGA_MODE_PFN_PCN_AFY_REN, 0x0000);*/
3829a0bf528SMauro Carvalho Chehab 									     /*   WR16(B_FE_AG_REG_AG_AGC_SIO__A,(extAttr -> FeAgRegAgAgcSio), 0x0000 );*//*added HS 23-05-2005 */
3839a0bf528SMauro Carvalho Chehab /*   WR16(B_FE_AG_REG_AG_PWD__A    ,(extAttr -> FeAgRegAgPwd), 0x0000 );*/
3849a0bf528SMauro Carvalho Chehab 
3859a0bf528SMauro Carvalho Chehab u8 DRXD_InitFEB1_2[] = {
3869a0bf528SMauro Carvalho Chehab 	WR16(B_FE_COMM_EXEC__A, 0x0001),
3879a0bf528SMauro Carvalho Chehab 
3889a0bf528SMauro Carvalho Chehab 	/* RF-AGC setup */
3899a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_PDA_AUR_CNT__A, 0x0C),
3909a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_PDC_SET_LVL__A, 0x01),
3919a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_PDC_FLA_RGN__A, 0x02),
3929a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_PDC_FLA_STP__A, 0xFFFF),
3939a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_PDC_SLO_STP__A, 0xFFFF),
3949a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_PDC_MAX__A, 0x02),
3959a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_TGA_AUR_CNT__A, 0x0C),
3969a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_TGC_SET_LVL__A, 0x22),
3979a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_TGC_FLA_RGN__A, 0x15),
3989a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_TGC_FLA_STP__A, 0x01),
3999a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AG_REG_TGC_SLO_STP__A, 0x0A),
4009a0bf528SMauro Carvalho Chehab 
4019a0bf528SMauro Carvalho Chehab 	WR16(B_FE_CU_REG_DIV_NFC_CLP__A, 0),
4029a0bf528SMauro Carvalho Chehab 	WR16(B_FE_CU_REG_CTR_NFC_OCR__A, 25000),
4039a0bf528SMauro Carvalho Chehab 	WR16(B_FE_CU_REG_CTR_NFC_ICR__A, 1),
4049a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
4059a0bf528SMauro Carvalho Chehab };
4069a0bf528SMauro Carvalho Chehab 
4079a0bf528SMauro Carvalho Chehab u8 DRXD_InitCPA2[] = {
4089a0bf528SMauro Carvalho Chehab 	WRBLOCK(CP_REG_BR_SPL_OFFSET__A, 2),
4099a0bf528SMauro Carvalho Chehab 	0x07, 0x00,		/* CP_REG_BR_SPL_OFFSET__A  */
4109a0bf528SMauro Carvalho Chehab 	0x0A, 0x00,		/* CP_REG_BR_STR_DEL__A     */
4119a0bf528SMauro Carvalho Chehab 
4129a0bf528SMauro Carvalho Chehab 	WRBLOCK(CP_REG_RT_ANG_INC0__A, 4),
4139a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CP_REG_RT_ANG_INC0__A    */
4149a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CP_REG_RT_ANG_INC1__A    */
4159a0bf528SMauro Carvalho Chehab 	0x03, 0x00,		/* CP_REG_RT_DETECT_ENA__A  */
4169a0bf528SMauro Carvalho Chehab 	0x03, 0x00,		/* CP_REG_RT_DETECT_TRH__A  */
4179a0bf528SMauro Carvalho Chehab 
4189a0bf528SMauro Carvalho Chehab 	WRBLOCK(CP_REG_AC_NEXP_OFFS__A, 5),
4199a0bf528SMauro Carvalho Chehab 	0x32, 0x00,		/* CP_REG_AC_NEXP_OFFS__A   */
4209a0bf528SMauro Carvalho Chehab 	0x62, 0x00,		/* CP_REG_AC_AVER_POW__A    */
4219a0bf528SMauro Carvalho Chehab 	0x82, 0x00,		/* CP_REG_AC_MAX_POW__A     */
4229a0bf528SMauro Carvalho Chehab 	0x26, 0x00,		/* CP_REG_AC_WEIGHT_MAN__A  */
4239a0bf528SMauro Carvalho Chehab 	0x0F, 0x00,		/* CP_REG_AC_WEIGHT_EXP__A  */
4249a0bf528SMauro Carvalho Chehab 
4259a0bf528SMauro Carvalho Chehab 	WRBLOCK(CP_REG_AC_AMP_MODE__A, 2),
4269a0bf528SMauro Carvalho Chehab 	0x02, 0x00,		/* CP_REG_AC_AMP_MODE__A    */
4279a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* CP_REG_AC_AMP_FIX__A     */
4289a0bf528SMauro Carvalho Chehab 
4299a0bf528SMauro Carvalho Chehab 	WR16(CP_REG_INTERVAL__A, 0x0005),
4309a0bf528SMauro Carvalho Chehab 	WR16(CP_REG_RT_EXP_MARG__A, 0x0004),
4319a0bf528SMauro Carvalho Chehab 	WR16(CP_REG_AC_ANG_MODE__A, 0x0003),
4329a0bf528SMauro Carvalho Chehab 
4339a0bf528SMauro Carvalho Chehab 	WR16(CP_REG_COMM_EXEC__A, 0x0001),
4349a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
4359a0bf528SMauro Carvalho Chehab };
4369a0bf528SMauro Carvalho Chehab 
4379a0bf528SMauro Carvalho Chehab u8 DRXD_InitCPB1[] = {
4389a0bf528SMauro Carvalho Chehab 	WR16(B_CP_REG_BR_SPL_OFFSET__A, 0x0008),
4399a0bf528SMauro Carvalho Chehab 	WR16(B_CP_COMM_EXEC__A, 0x0001),
4409a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
4419a0bf528SMauro Carvalho Chehab };
4429a0bf528SMauro Carvalho Chehab 
4439a0bf528SMauro Carvalho Chehab u8 DRXD_InitCEA2[] = {
4449a0bf528SMauro Carvalho Chehab 	WRBLOCK(CE_REG_AVG_POW__A, 4),
4459a0bf528SMauro Carvalho Chehab 	0x62, 0x00,		/* CE_REG_AVG_POW__A        */
4469a0bf528SMauro Carvalho Chehab 	0x78, 0x00,		/* CE_REG_MAX_POW__A        */
4479a0bf528SMauro Carvalho Chehab 	0x62, 0x00,		/* CE_REG_ATT__A            */
4489a0bf528SMauro Carvalho Chehab 	0x17, 0x00,		/* CE_REG_NRED__A           */
4499a0bf528SMauro Carvalho Chehab 
4509a0bf528SMauro Carvalho Chehab 	WRBLOCK(CE_REG_NE_ERR_SELECT__A, 2),
4519a0bf528SMauro Carvalho Chehab 	0x07, 0x00,		/* CE_REG_NE_ERR_SELECT__A  */
4529a0bf528SMauro Carvalho Chehab 	0xEB, 0xFF,		/* CE_REG_NE_TD_CAL__A      */
4539a0bf528SMauro Carvalho Chehab 
4549a0bf528SMauro Carvalho Chehab 	WRBLOCK(CE_REG_NE_MIXAVG__A, 2),
4559a0bf528SMauro Carvalho Chehab 	0x06, 0x00,		/* CE_REG_NE_MIXAVG__A      */
4569a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_NE_NUPD_OFS__A    */
4579a0bf528SMauro Carvalho Chehab 
4589a0bf528SMauro Carvalho Chehab 	WRBLOCK(CE_REG_PE_NEXP_OFFS__A, 2),
4599a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_PE_NEXP_OFFS__A   */
4609a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_PE_TIMESHIFT__A   */
4619a0bf528SMauro Carvalho Chehab 
4629a0bf528SMauro Carvalho Chehab 	WRBLOCK(CE_REG_TP_A0_TAP_NEW__A, 3),
4639a0bf528SMauro Carvalho Chehab 	0x00, 0x01,		/* CE_REG_TP_A0_TAP_NEW__A       */
4649a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* CE_REG_TP_A0_TAP_NEW_VALID__A */
4659a0bf528SMauro Carvalho Chehab 	0x0E, 0x00,		/* CE_REG_TP_A0_MU_LMS_STEP__A   */
4669a0bf528SMauro Carvalho Chehab 
4679a0bf528SMauro Carvalho Chehab 	WRBLOCK(CE_REG_TP_A1_TAP_NEW__A, 3),
4689a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_TP_A1_TAP_NEW__A        */
4699a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* CE_REG_TP_A1_TAP_NEW_VALID__A  */
4709a0bf528SMauro Carvalho Chehab 	0x0A, 0x00,		/* CE_REG_TP_A1_MU_LMS_STEP__A    */
4719a0bf528SMauro Carvalho Chehab 
4729a0bf528SMauro Carvalho Chehab 	WRBLOCK(CE_REG_FI_SHT_INCR__A, 2),
4739a0bf528SMauro Carvalho Chehab 	0x12, 0x00,		/* CE_REG_FI_SHT_INCR__A          */
4749a0bf528SMauro Carvalho Chehab 	0x0C, 0x00,		/* CE_REG_FI_EXP_NORM__A          */
4759a0bf528SMauro Carvalho Chehab 
4769a0bf528SMauro Carvalho Chehab 	WRBLOCK(CE_REG_IR_INPUTSEL__A, 3),
4779a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_IR_INPUTSEL__A          */
4789a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* CE_REG_IR_STARTPOS__A          */
4799a0bf528SMauro Carvalho Chehab 	0xFF, 0x00,		/* CE_REG_IR_NEXP_THRES__A        */
4809a0bf528SMauro Carvalho Chehab 
4819a0bf528SMauro Carvalho Chehab 	WR16(CE_REG_TI_NEXP_OFFS__A, 0x0000),
4829a0bf528SMauro Carvalho Chehab 
4839a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
4849a0bf528SMauro Carvalho Chehab };
4859a0bf528SMauro Carvalho Chehab 
4869a0bf528SMauro Carvalho Chehab u8 DRXD_InitCEB1[] = {
4879a0bf528SMauro Carvalho Chehab 	WR16(B_CE_REG_TI_PHN_ENABLE__A, 0x0001),
4889a0bf528SMauro Carvalho Chehab 	WR16(B_CE_REG_FR_PM_SET__A, 0x000D),
4899a0bf528SMauro Carvalho Chehab 
4909a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
4919a0bf528SMauro Carvalho Chehab };
4929a0bf528SMauro Carvalho Chehab 
4939a0bf528SMauro Carvalho Chehab u8 DRXD_InitEQA2[] = {
4949a0bf528SMauro Carvalho Chehab 	WRBLOCK(EQ_REG_OT_QNT_THRES0__A, 4),
4959a0bf528SMauro Carvalho Chehab 	0x1E, 0x00,		/* EQ_REG_OT_QNT_THRES0__A        */
4969a0bf528SMauro Carvalho Chehab 	0x1F, 0x00,		/* EQ_REG_OT_QNT_THRES1__A        */
4979a0bf528SMauro Carvalho Chehab 	0x06, 0x00,		/* EQ_REG_OT_CSI_STEP__A          */
4989a0bf528SMauro Carvalho Chehab 	0x02, 0x00,		/* EQ_REG_OT_CSI_OFFSET__A        */
4999a0bf528SMauro Carvalho Chehab 
5009a0bf528SMauro Carvalho Chehab 	WR16(EQ_REG_TD_REQ_SMB_CNT__A, 0x0200),
5019a0bf528SMauro Carvalho Chehab 	WR16(EQ_REG_IS_CLIP_EXP__A, 0x001F),
5029a0bf528SMauro Carvalho Chehab 	WR16(EQ_REG_SN_OFFSET__A, (u16) (-7)),
5039a0bf528SMauro Carvalho Chehab 	WR16(EQ_REG_RC_SEL_CAR__A, 0x0002),
5049a0bf528SMauro Carvalho Chehab 	WR16(EQ_REG_COMM_EXEC__A, 0x0001),
5059a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
5069a0bf528SMauro Carvalho Chehab };
5079a0bf528SMauro Carvalho Chehab 
5089a0bf528SMauro Carvalho Chehab u8 DRXD_InitEQB1[] = {
5099a0bf528SMauro Carvalho Chehab 	WR16(B_EQ_REG_COMM_EXEC__A, 0x0001),
5109a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
5119a0bf528SMauro Carvalho Chehab };
5129a0bf528SMauro Carvalho Chehab 
5139a0bf528SMauro Carvalho Chehab u8 DRXD_ResetECRAM[] = {
5149a0bf528SMauro Carvalho Chehab 	/* Reset packet sync bytes in EC_VD ram */
5159a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (0 * 17), 0x0000),
5169a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (1 * 17), 0x0000),
5179a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (2 * 17), 0x0000),
5189a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (3 * 17), 0x0000),
5199a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (4 * 17), 0x0000),
5209a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (5 * 17), 0x0000),
5219a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (6 * 17), 0x0000),
5229a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (7 * 17), 0x0000),
5239a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (8 * 17), 0x0000),
5249a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (9 * 17), 0x0000),
5259a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (10 * 17), 0x0000),
5269a0bf528SMauro Carvalho Chehab 
5279a0bf528SMauro Carvalho Chehab 	/* Reset packet sync bytes in EC_RS ram */
5289a0bf528SMauro Carvalho Chehab 	WR16(EC_RS_EC_RAM__A, 0x0000),
5299a0bf528SMauro Carvalho Chehab 	WR16(EC_RS_EC_RAM__A + 204, 0x0000),
5309a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
5319a0bf528SMauro Carvalho Chehab };
5329a0bf528SMauro Carvalho Chehab 
5339a0bf528SMauro Carvalho Chehab u8 DRXD_InitECA2[] = {
5349a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_SB_REG_CSI_HI__A, 6),
5359a0bf528SMauro Carvalho Chehab 	0x1F, 0x00,		/* EC_SB_REG_CSI_HI__A            */
5369a0bf528SMauro Carvalho Chehab 	0x1E, 0x00,		/* EC_SB_REG_CSI_LO__A            */
5379a0bf528SMauro Carvalho Chehab 	0x01, 0x00,		/* EC_SB_REG_SMB_TGL__A           */
5389a0bf528SMauro Carvalho Chehab 	0x7F, 0x00,		/* EC_SB_REG_SNR_HI__A            */
5399a0bf528SMauro Carvalho Chehab 	0x7F, 0x00,		/* EC_SB_REG_SNR_MID__A           */
5409a0bf528SMauro Carvalho Chehab 	0x7F, 0x00,		/* EC_SB_REG_SNR_LO__A            */
5419a0bf528SMauro Carvalho Chehab 
5429a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_RS_REG_REQ_PCK_CNT__A, 2),
5439a0bf528SMauro Carvalho Chehab 	0x00, 0x10,		/* EC_RS_REG_REQ_PCK_CNT__A       */
5449a0bf528SMauro Carvalho Chehab 	DATA16(EC_RS_REG_VAL_PCK),	/* EC_RS_REG_VAL__A               */
5459a0bf528SMauro Carvalho Chehab 
5469a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_OC_REG_TMD_TOP_MODE__A, 5),
5479a0bf528SMauro Carvalho Chehab 	0x03, 0x00,		/* EC_OC_REG_TMD_TOP_MODE__A      */
5489a0bf528SMauro Carvalho Chehab 	0xF4, 0x01,		/* EC_OC_REG_TMD_TOP_CNT__A       */
5499a0bf528SMauro Carvalho Chehab 	0xC0, 0x03,		/* EC_OC_REG_TMD_HIL_MAR__A       */
5509a0bf528SMauro Carvalho Chehab 	0x40, 0x00,		/* EC_OC_REG_TMD_LOL_MAR__A       */
5519a0bf528SMauro Carvalho Chehab 	0x03, 0x00,		/* EC_OC_REG_TMD_CUR_CNT__A       */
5529a0bf528SMauro Carvalho Chehab 
5539a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_OC_REG_AVR_ASH_CNT__A, 2),
5549a0bf528SMauro Carvalho Chehab 	0x06, 0x00,		/* EC_OC_REG_AVR_ASH_CNT__A       */
5559a0bf528SMauro Carvalho Chehab 	0x02, 0x00,		/* EC_OC_REG_AVR_BSH_CNT__A       */
5569a0bf528SMauro Carvalho Chehab 
5579a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_OC_REG_RCN_MODE__A, 7),
5589a0bf528SMauro Carvalho Chehab 	0x07, 0x00,		/* EC_OC_REG_RCN_MODE__A          */
5599a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* EC_OC_REG_RCN_CRA_LOP__A       */
5609a0bf528SMauro Carvalho Chehab 	0xc0, 0x00,		/* EC_OC_REG_RCN_CRA_HIP__A       */
5619a0bf528SMauro Carvalho Chehab 	0x00, 0x10,		/* EC_OC_REG_RCN_CST_LOP__A       */
5629a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* EC_OC_REG_RCN_CST_HIP__A       */
5639a0bf528SMauro Carvalho Chehab 	0xFF, 0x01,		/* EC_OC_REG_RCN_SET_LVL__A       */
5649a0bf528SMauro Carvalho Chehab 	0x0D, 0x00,		/* EC_OC_REG_RCN_GAI_LVL__A       */
5659a0bf528SMauro Carvalho Chehab 
5669a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_OC_REG_RCN_CLP_LOP__A, 2),
5679a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* EC_OC_REG_RCN_CLP_LOP__A       */
5689a0bf528SMauro Carvalho Chehab 	0xC0, 0x00,		/* EC_OC_REG_RCN_CLP_HIP__A       */
5699a0bf528SMauro Carvalho Chehab 
5709a0bf528SMauro Carvalho Chehab 	WR16(EC_SB_REG_CSI_OFS__A, 0x0001),
5719a0bf528SMauro Carvalho Chehab 	WR16(EC_VD_REG_FORCE__A, 0x0002),
5729a0bf528SMauro Carvalho Chehab 	WR16(EC_VD_REG_REQ_SMB_CNT__A, 0x0001),
5739a0bf528SMauro Carvalho Chehab 	WR16(EC_VD_REG_RLK_ENA__A, 0x0001),
5749a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_REG_SYNC__A, 0x0664),
5759a0bf528SMauro Carvalho Chehab 	WR16(EC_OC_REG_OC_MON_SIO__A, 0x0000),
5769a0bf528SMauro Carvalho Chehab 	WR16(EC_OC_REG_SNC_ISC_LVL__A, 0x0D0C),
5779a0bf528SMauro Carvalho Chehab 	/* Output zero on monitorbus pads, power saving */
5789a0bf528SMauro Carvalho Chehab 	WR16(EC_OC_REG_OCR_MON_UOS__A,
5799a0bf528SMauro Carvalho Chehab 	     (EC_OC_REG_OCR_MON_UOS_DAT_0_ENABLE |
5809a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_1_ENABLE |
5819a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_2_ENABLE |
5829a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_3_ENABLE |
5839a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_4_ENABLE |
5849a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_5_ENABLE |
5859a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_6_ENABLE |
5869a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_7_ENABLE |
5879a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_8_ENABLE |
5889a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_9_ENABLE |
5899a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_VAL_ENABLE |
5909a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_CLK_ENABLE)),
5919a0bf528SMauro Carvalho Chehab 	WR16(EC_OC_REG_OCR_MON_WRI__A,
5929a0bf528SMauro Carvalho Chehab 	     EC_OC_REG_OCR_MON_WRI_INIT),
5939a0bf528SMauro Carvalho Chehab 
5949a0bf528SMauro Carvalho Chehab /*   CHK_ERROR(ResetECRAM(demod)); */
5959a0bf528SMauro Carvalho Chehab 	/* Reset packet sync bytes in EC_VD ram */
5969a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (0 * 17), 0x0000),
5979a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (1 * 17), 0x0000),
5989a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (2 * 17), 0x0000),
5999a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (3 * 17), 0x0000),
6009a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (4 * 17), 0x0000),
6019a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (5 * 17), 0x0000),
6029a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (6 * 17), 0x0000),
6039a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (7 * 17), 0x0000),
6049a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (8 * 17), 0x0000),
6059a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (9 * 17), 0x0000),
6069a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (10 * 17), 0x0000),
6079a0bf528SMauro Carvalho Chehab 
6089a0bf528SMauro Carvalho Chehab 	/* Reset packet sync bytes in EC_RS ram */
6099a0bf528SMauro Carvalho Chehab 	WR16(EC_RS_EC_RAM__A, 0x0000),
6109a0bf528SMauro Carvalho Chehab 	WR16(EC_RS_EC_RAM__A + 204, 0x0000),
6119a0bf528SMauro Carvalho Chehab 
6129a0bf528SMauro Carvalho Chehab 	WR16(EC_SB_REG_COMM_EXEC__A, 0x0001),
6139a0bf528SMauro Carvalho Chehab 	WR16(EC_VD_REG_COMM_EXEC__A, 0x0001),
6149a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_REG_COMM_EXEC__A, 0x0001),
6159a0bf528SMauro Carvalho Chehab 	WR16(EC_RS_REG_COMM_EXEC__A, 0x0001),
6169a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
6179a0bf528SMauro Carvalho Chehab };
6189a0bf528SMauro Carvalho Chehab 
6199a0bf528SMauro Carvalho Chehab u8 DRXD_InitECB1[] = {
6209a0bf528SMauro Carvalho Chehab 	WR16(B_EC_SB_REG_CSI_OFS0__A, 0x0001),
6219a0bf528SMauro Carvalho Chehab 	WR16(B_EC_SB_REG_CSI_OFS1__A, 0x0001),
6229a0bf528SMauro Carvalho Chehab 	WR16(B_EC_SB_REG_CSI_OFS2__A, 0x0001),
6239a0bf528SMauro Carvalho Chehab 	WR16(B_EC_SB_REG_CSI_LO__A, 0x000c),
6249a0bf528SMauro Carvalho Chehab 	WR16(B_EC_SB_REG_CSI_HI__A, 0x0018),
6259a0bf528SMauro Carvalho Chehab 	WR16(B_EC_SB_REG_SNR_HI__A, 0x007f),
6269a0bf528SMauro Carvalho Chehab 	WR16(B_EC_SB_REG_SNR_MID__A, 0x007f),
6279a0bf528SMauro Carvalho Chehab 	WR16(B_EC_SB_REG_SNR_LO__A, 0x007f),
6289a0bf528SMauro Carvalho Chehab 
6299a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_DTO_CLKMODE__A, 0x0002),
6309a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_DTO_PER__A, 0x0006),
6319a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_DTO_BUR__A, 0x0001),
6329a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_RCR_CLKMODE__A, 0x0000),
6339a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_RCN_GAI_LVL__A, 0x000D),
6349a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_OC_MPG_SIO__A, 0x0000),
6359a0bf528SMauro Carvalho Chehab 
6369a0bf528SMauro Carvalho Chehab 	/* Needed because shadow registers do not have correct default value */
6379a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_RCN_CST_LOP__A, 0x1000),
6389a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_RCN_CST_HIP__A, 0x0000),
6399a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_RCN_CRA_LOP__A, 0x0000),
6409a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_RCN_CRA_HIP__A, 0x00C0),
6419a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_RCN_CLP_LOP__A, 0x0000),
6429a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_RCN_CLP_HIP__A, 0x00C0),
6439a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_DTO_INC_LOP__A, 0x0000),
6449a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_DTO_INC_HIP__A, 0x00C0),
6459a0bf528SMauro Carvalho Chehab 
6469a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OD_REG_SYNC__A, 0x0664),
6479a0bf528SMauro Carvalho Chehab 	WR16(B_EC_RS_REG_REQ_PCK_CNT__A, 0x1000),
6489a0bf528SMauro Carvalho Chehab 
6499a0bf528SMauro Carvalho Chehab /*   CHK_ERROR(ResetECRAM(demod)); */
6509a0bf528SMauro Carvalho Chehab 	/* Reset packet sync bytes in EC_VD ram */
6519a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (0 * 17), 0x0000),
6529a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (1 * 17), 0x0000),
6539a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (2 * 17), 0x0000),
6549a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (3 * 17), 0x0000),
6559a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (4 * 17), 0x0000),
6569a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (5 * 17), 0x0000),
6579a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (6 * 17), 0x0000),
6589a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (7 * 17), 0x0000),
6599a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (8 * 17), 0x0000),
6609a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (9 * 17), 0x0000),
6619a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (10 * 17), 0x0000),
6629a0bf528SMauro Carvalho Chehab 
6639a0bf528SMauro Carvalho Chehab 	/* Reset packet sync bytes in EC_RS ram */
6649a0bf528SMauro Carvalho Chehab 	WR16(EC_RS_EC_RAM__A, 0x0000),
6659a0bf528SMauro Carvalho Chehab 	WR16(EC_RS_EC_RAM__A + 204, 0x0000),
6669a0bf528SMauro Carvalho Chehab 
6679a0bf528SMauro Carvalho Chehab 	WR16(B_EC_SB_REG_COMM_EXEC__A, 0x0001),
6689a0bf528SMauro Carvalho Chehab 	WR16(B_EC_VD_REG_COMM_EXEC__A, 0x0001),
6699a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OD_REG_COMM_EXEC__A, 0x0001),
6709a0bf528SMauro Carvalho Chehab 	WR16(B_EC_RS_REG_COMM_EXEC__A, 0x0001),
6719a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
6729a0bf528SMauro Carvalho Chehab };
6739a0bf528SMauro Carvalho Chehab 
6749a0bf528SMauro Carvalho Chehab u8 DRXD_ResetECA2[] = {
6759a0bf528SMauro Carvalho Chehab 
6769a0bf528SMauro Carvalho Chehab 	WR16(EC_OC_REG_COMM_EXEC__A, 0x0000),
6779a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_REG_COMM_EXEC__A, 0x0000),
6789a0bf528SMauro Carvalho Chehab 
6799a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_OC_REG_TMD_TOP_MODE__A, 5),
6809a0bf528SMauro Carvalho Chehab 	0x03, 0x00,		/* EC_OC_REG_TMD_TOP_MODE__A      */
6819a0bf528SMauro Carvalho Chehab 	0xF4, 0x01,		/* EC_OC_REG_TMD_TOP_CNT__A       */
6829a0bf528SMauro Carvalho Chehab 	0xC0, 0x03,		/* EC_OC_REG_TMD_HIL_MAR__A       */
6839a0bf528SMauro Carvalho Chehab 	0x40, 0x00,		/* EC_OC_REG_TMD_LOL_MAR__A       */
6849a0bf528SMauro Carvalho Chehab 	0x03, 0x00,		/* EC_OC_REG_TMD_CUR_CNT__A       */
6859a0bf528SMauro Carvalho Chehab 
6869a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_OC_REG_AVR_ASH_CNT__A, 2),
6879a0bf528SMauro Carvalho Chehab 	0x06, 0x00,		/* EC_OC_REG_AVR_ASH_CNT__A       */
6889a0bf528SMauro Carvalho Chehab 	0x02, 0x00,		/* EC_OC_REG_AVR_BSH_CNT__A       */
6899a0bf528SMauro Carvalho Chehab 
6909a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_OC_REG_RCN_MODE__A, 7),
6919a0bf528SMauro Carvalho Chehab 	0x07, 0x00,		/* EC_OC_REG_RCN_MODE__A          */
6929a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* EC_OC_REG_RCN_CRA_LOP__A       */
6939a0bf528SMauro Carvalho Chehab 	0xc0, 0x00,		/* EC_OC_REG_RCN_CRA_HIP__A       */
6949a0bf528SMauro Carvalho Chehab 	0x00, 0x10,		/* EC_OC_REG_RCN_CST_LOP__A       */
6959a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* EC_OC_REG_RCN_CST_HIP__A       */
6969a0bf528SMauro Carvalho Chehab 	0xFF, 0x01,		/* EC_OC_REG_RCN_SET_LVL__A       */
6979a0bf528SMauro Carvalho Chehab 	0x0D, 0x00,		/* EC_OC_REG_RCN_GAI_LVL__A       */
6989a0bf528SMauro Carvalho Chehab 
6999a0bf528SMauro Carvalho Chehab 	WRBLOCK(EC_OC_REG_RCN_CLP_LOP__A, 2),
7009a0bf528SMauro Carvalho Chehab 	0x00, 0x00,		/* EC_OC_REG_RCN_CLP_LOP__A       */
7019a0bf528SMauro Carvalho Chehab 	0xC0, 0x00,		/* EC_OC_REG_RCN_CLP_HIP__A       */
7029a0bf528SMauro Carvalho Chehab 
7039a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_REG_SYNC__A, 0x0664),
7049a0bf528SMauro Carvalho Chehab 	WR16(EC_OC_REG_OC_MON_SIO__A, 0x0000),
7059a0bf528SMauro Carvalho Chehab 	WR16(EC_OC_REG_SNC_ISC_LVL__A, 0x0D0C),
7069a0bf528SMauro Carvalho Chehab 	/* Output zero on monitorbus pads, power saving */
7079a0bf528SMauro Carvalho Chehab 	WR16(EC_OC_REG_OCR_MON_UOS__A,
7089a0bf528SMauro Carvalho Chehab 	     (EC_OC_REG_OCR_MON_UOS_DAT_0_ENABLE |
7099a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_1_ENABLE |
7109a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_2_ENABLE |
7119a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_3_ENABLE |
7129a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_4_ENABLE |
7139a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_5_ENABLE |
7149a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_6_ENABLE |
7159a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_7_ENABLE |
7169a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_8_ENABLE |
7179a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_DAT_9_ENABLE |
7189a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_VAL_ENABLE |
7199a0bf528SMauro Carvalho Chehab 	      EC_OC_REG_OCR_MON_UOS_CLK_ENABLE)),
7209a0bf528SMauro Carvalho Chehab 	WR16(EC_OC_REG_OCR_MON_WRI__A,
7219a0bf528SMauro Carvalho Chehab 	     EC_OC_REG_OCR_MON_WRI_INIT),
7229a0bf528SMauro Carvalho Chehab 
7239a0bf528SMauro Carvalho Chehab /*   CHK_ERROR(ResetECRAM(demod)); */
7249a0bf528SMauro Carvalho Chehab 	/* Reset packet sync bytes in EC_VD ram */
7259a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (0 * 17), 0x0000),
7269a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (1 * 17), 0x0000),
7279a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (2 * 17), 0x0000),
7289a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (3 * 17), 0x0000),
7299a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (4 * 17), 0x0000),
7309a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (5 * 17), 0x0000),
7319a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (6 * 17), 0x0000),
7329a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (7 * 17), 0x0000),
7339a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (8 * 17), 0x0000),
7349a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (9 * 17), 0x0000),
7359a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_DEINT_RAM__A + 0x3b7 + (10 * 17), 0x0000),
7369a0bf528SMauro Carvalho Chehab 
7379a0bf528SMauro Carvalho Chehab 	/* Reset packet sync bytes in EC_RS ram */
7389a0bf528SMauro Carvalho Chehab 	WR16(EC_RS_EC_RAM__A, 0x0000),
7399a0bf528SMauro Carvalho Chehab 	WR16(EC_RS_EC_RAM__A + 204, 0x0000),
7409a0bf528SMauro Carvalho Chehab 
7419a0bf528SMauro Carvalho Chehab 	WR16(EC_OD_REG_COMM_EXEC__A, 0x0001),
7429a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
7439a0bf528SMauro Carvalho Chehab };
7449a0bf528SMauro Carvalho Chehab 
7459a0bf528SMauro Carvalho Chehab u8 DRXD_InitSC[] = {
7469a0bf528SMauro Carvalho Chehab 	WR16(SC_COMM_EXEC__A, 0),
7479a0bf528SMauro Carvalho Chehab 	WR16(SC_COMM_STATE__A, 0),
7489a0bf528SMauro Carvalho Chehab 
7499a0bf528SMauro Carvalho Chehab #ifdef COMPILE_FOR_QT
7509a0bf528SMauro Carvalho Chehab 	WR16(SC_RA_RAM_BE_OPT_DELAY__A, 0x100),
7519a0bf528SMauro Carvalho Chehab #endif
7529a0bf528SMauro Carvalho Chehab 
7539a0bf528SMauro Carvalho Chehab 	/* SC is not started, this is done in SetChannels() */
7549a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
7559a0bf528SMauro Carvalho Chehab };
7569a0bf528SMauro Carvalho Chehab 
7579a0bf528SMauro Carvalho Chehab /* Diversity settings */
7589a0bf528SMauro Carvalho Chehab 
7599a0bf528SMauro Carvalho Chehab u8 DRXD_InitDiversityFront[] = {
7609a0bf528SMauro Carvalho Chehab 	/* Start demod ********* RF in , diversity out **************************** */
7619a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_CONFIG__A, B_SC_RA_RAM_CONFIG_FR_ENABLE__M |
7629a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_CONFIG_FREQSCAN__M),
7639a0bf528SMauro Carvalho Chehab 
7649a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_LC_ABS_2K__A, 0x7),
7659a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_LC_ABS_8K__A, 0x7),
7669a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_8K_LENGTH__A, IRLEN_COARSE_8K),
7679a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_8K_FREQINC__A, 1 << (11 - IRLEN_COARSE_8K)),
7689a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_8K_KAISINC__A, 1 << (17 - IRLEN_COARSE_8K)),
7699a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_8K_LENGTH__A, IRLEN_FINE_8K),
7709a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_8K_FREQINC__A, 1 << (11 - IRLEN_FINE_8K)),
7719a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_8K_KAISINC__A, 1 << (17 - IRLEN_FINE_8K)),
7729a0bf528SMauro Carvalho Chehab 
7739a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_2K_LENGTH__A, IRLEN_COARSE_2K),
7749a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_2K_FREQINC__A, 1 << (11 - IRLEN_COARSE_2K)),
7759a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_2K_KAISINC__A, 1 << (17 - IRLEN_COARSE_2K)),
7769a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_2K_LENGTH__A, IRLEN_FINE_2K),
7779a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_2K_FREQINC__A, 1 << (11 - IRLEN_FINE_2K)),
7789a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_2K_KAISINC__A, 1 << (17 - IRLEN_FINE_2K)),
7799a0bf528SMauro Carvalho Chehab 
7809a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_CRMM_A__A, 7),
7819a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_CRMM_B__A, 4),
7829a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_SRMM_A__A, 7),
7839a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_SRMM_B__A, 4),
7849a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_SYM_SET__A, 500),
7859a0bf528SMauro Carvalho Chehab 
7869a0bf528SMauro Carvalho Chehab 	WR16(B_CC_REG_DIVERSITY__A, 0x0001),
7879a0bf528SMauro Carvalho Chehab 	WR16(B_EC_OC_REG_OC_MODE_HIP__A, 0x0010),
7889a0bf528SMauro Carvalho Chehab 	WR16(B_EQ_REG_RC_SEL_CAR__A, B_EQ_REG_RC_SEL_CAR_PASS_B_CE |
7899a0bf528SMauro Carvalho Chehab 	     B_EQ_REG_RC_SEL_CAR_LOCAL_B_CE | B_EQ_REG_RC_SEL_CAR_MEAS_B_CE),
7909a0bf528SMauro Carvalho Chehab 
7919a0bf528SMauro Carvalho Chehab 	/*    0x2a ), *//* CE to PASS mux */
7929a0bf528SMauro Carvalho Chehab 
7939a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
7949a0bf528SMauro Carvalho Chehab };
7959a0bf528SMauro Carvalho Chehab 
7969a0bf528SMauro Carvalho Chehab u8 DRXD_InitDiversityEnd[] = {
7979a0bf528SMauro Carvalho Chehab 	/* End demod *********** combining RF in and diversity in, MPEG TS out **** */
7989a0bf528SMauro Carvalho Chehab 	/* disable near/far; switch on timing slave mode */
7999a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_CONFIG__A, B_SC_RA_RAM_CONFIG_FR_ENABLE__M |
8009a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_CONFIG_FREQSCAN__M |
8019a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_CONFIG_DIV_ECHO_ENABLE__M |
8029a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_CONFIG_SLAVE__M |
8039a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_CONFIG_DIV_BLANK_ENABLE__M
8049a0bf528SMauro Carvalho Chehab /* MV from CtrlDiversity */
8059a0bf528SMauro Carvalho Chehab 	    ),
8069a0bf528SMauro Carvalho Chehab #ifdef DRXDDIV_SRMM_SLAVING
8079a0bf528SMauro Carvalho Chehab 	WR16(SC_RA_RAM_LC_ABS_2K__A, 0x3c7),
8089a0bf528SMauro Carvalho Chehab 	WR16(SC_RA_RAM_LC_ABS_8K__A, 0x3c7),
8099a0bf528SMauro Carvalho Chehab #else
8109a0bf528SMauro Carvalho Chehab 	WR16(SC_RA_RAM_LC_ABS_2K__A, 0x7),
8119a0bf528SMauro Carvalho Chehab 	WR16(SC_RA_RAM_LC_ABS_8K__A, 0x7),
8129a0bf528SMauro Carvalho Chehab #endif
8139a0bf528SMauro Carvalho Chehab 
8149a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_8K_LENGTH__A, IRLEN_COARSE_8K),
8159a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_8K_FREQINC__A, 1 << (11 - IRLEN_COARSE_8K)),
8169a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_8K_KAISINC__A, 1 << (17 - IRLEN_COARSE_8K)),
8179a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_8K_LENGTH__A, IRLEN_FINE_8K),
8189a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_8K_FREQINC__A, 1 << (11 - IRLEN_FINE_8K)),
8199a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_8K_KAISINC__A, 1 << (17 - IRLEN_FINE_8K)),
8209a0bf528SMauro Carvalho Chehab 
8219a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_2K_LENGTH__A, IRLEN_COARSE_2K),
8229a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_2K_FREQINC__A, 1 << (11 - IRLEN_COARSE_2K)),
8239a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_2K_KAISINC__A, 1 << (17 - IRLEN_COARSE_2K)),
8249a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_2K_LENGTH__A, IRLEN_FINE_2K),
8259a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_2K_FREQINC__A, 1 << (11 - IRLEN_FINE_2K)),
8269a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_2K_KAISINC__A, 1 << (17 - IRLEN_FINE_2K)),
8279a0bf528SMauro Carvalho Chehab 
8289a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_CRMM_A__A, 7),
8299a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_CRMM_B__A, 4),
8309a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_SRMM_A__A, 7),
8319a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_SRMM_B__A, 4),
8329a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_SYM_SET__A, 500),
8339a0bf528SMauro Carvalho Chehab 
8349a0bf528SMauro Carvalho Chehab 	WR16(B_CC_REG_DIVERSITY__A, 0x0001),
8359a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
8369a0bf528SMauro Carvalho Chehab };
8379a0bf528SMauro Carvalho Chehab 
8389a0bf528SMauro Carvalho Chehab u8 DRXD_DisableDiversity[] = {
8399a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_LC_ABS_2K__A, B_SC_RA_RAM_LC_ABS_2K__PRE),
8409a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_LC_ABS_8K__A, B_SC_RA_RAM_LC_ABS_8K__PRE),
8419a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_8K_LENGTH__A,
8429a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_COARSE_8K_LENGTH__PRE),
8439a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_8K_FREQINC__A,
8449a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_COARSE_8K_FREQINC__PRE),
8459a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_8K_KAISINC__A,
8469a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_COARSE_8K_KAISINC__PRE),
8479a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_8K_LENGTH__A,
8489a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_FINE_8K_LENGTH__PRE),
8499a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_8K_FREQINC__A,
8509a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_FINE_8K_FREQINC__PRE),
8519a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_8K_KAISINC__A,
8529a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_FINE_8K_KAISINC__PRE),
8539a0bf528SMauro Carvalho Chehab 
8549a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_2K_LENGTH__A,
8559a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_COARSE_2K_LENGTH__PRE),
8569a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_2K_FREQINC__A,
8579a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_COARSE_2K_FREQINC__PRE),
8589a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_COARSE_2K_KAISINC__A,
8599a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_COARSE_2K_KAISINC__PRE),
8609a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_2K_LENGTH__A,
8619a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_FINE_2K_LENGTH__PRE),
8629a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_2K_FREQINC__A,
8639a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_FINE_2K_FREQINC__PRE),
8649a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_IR_FINE_2K_KAISINC__A,
8659a0bf528SMauro Carvalho Chehab 	     B_SC_RA_RAM_IR_FINE_2K_KAISINC__PRE),
8669a0bf528SMauro Carvalho Chehab 
8679a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_CRMM_A__A, B_LC_RA_RAM_FILTER_CRMM_A__PRE),
8689a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_CRMM_B__A, B_LC_RA_RAM_FILTER_CRMM_B__PRE),
8699a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_SRMM_A__A, B_LC_RA_RAM_FILTER_SRMM_A__PRE),
8709a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_SRMM_B__A, B_LC_RA_RAM_FILTER_SRMM_B__PRE),
8719a0bf528SMauro Carvalho Chehab 	WR16(B_LC_RA_RAM_FILTER_SYM_SET__A, B_LC_RA_RAM_FILTER_SYM_SET__PRE),
8729a0bf528SMauro Carvalho Chehab 
8739a0bf528SMauro Carvalho Chehab 	WR16(B_CC_REG_DIVERSITY__A, 0x0000),
8749a0bf528SMauro Carvalho Chehab 	WR16(B_EQ_REG_RC_SEL_CAR__A, B_EQ_REG_RC_SEL_CAR_INIT),	/* combining disabled */
8759a0bf528SMauro Carvalho Chehab 
8769a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
8779a0bf528SMauro Carvalho Chehab };
8789a0bf528SMauro Carvalho Chehab 
8799a0bf528SMauro Carvalho Chehab u8 DRXD_StartDiversityFront[] = {
8809a0bf528SMauro Carvalho Chehab 	/* Start demod, RF in and diversity out, no combining */
8819a0bf528SMauro Carvalho Chehab 	WR16(B_FE_CF_REG_IMP_VAL__A, 0x0),
8829a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AD_REG_FDB_IN__A, 0x0),
8839a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AD_REG_INVEXT__A, 0x0),
8849a0bf528SMauro Carvalho Chehab 	WR16(B_EQ_REG_COMM_MB__A, 0x12),	/* EQ to MB out */
8859a0bf528SMauro Carvalho Chehab 	WR16(B_EQ_REG_RC_SEL_CAR__A, B_EQ_REG_RC_SEL_CAR_PASS_B_CE |	/* CE to PASS mux */
8869a0bf528SMauro Carvalho Chehab 	     B_EQ_REG_RC_SEL_CAR_LOCAL_B_CE | B_EQ_REG_RC_SEL_CAR_MEAS_B_CE),
8879a0bf528SMauro Carvalho Chehab 
8889a0bf528SMauro Carvalho Chehab 	WR16(SC_RA_RAM_ECHO_SHIFT_LIM__A, 2),
8899a0bf528SMauro Carvalho Chehab 
8909a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
8919a0bf528SMauro Carvalho Chehab };
8929a0bf528SMauro Carvalho Chehab 
8939a0bf528SMauro Carvalho Chehab u8 DRXD_StartDiversityEnd[] = {
8949a0bf528SMauro Carvalho Chehab 	/* End demod, combining RF in and diversity in, MPEG TS out */
8959a0bf528SMauro Carvalho Chehab 	WR16(B_FE_CF_REG_IMP_VAL__A, 0x0),	/* disable impulse noise cruncher */
8969a0bf528SMauro Carvalho Chehab 	WR16(B_FE_AD_REG_INVEXT__A, 0x0),	/* clock inversion (for sohard board) */
8979a0bf528SMauro Carvalho Chehab 	WR16(B_CP_REG_BR_STR_DEL__A, 10),	/* apperently no mb delay matching is best */
8989a0bf528SMauro Carvalho Chehab 
8999a0bf528SMauro Carvalho Chehab 	WR16(B_EQ_REG_RC_SEL_CAR__A, B_EQ_REG_RC_SEL_CAR_DIV_ON |	/* org = 0x81 combining enabled */
9009a0bf528SMauro Carvalho Chehab 	     B_EQ_REG_RC_SEL_CAR_MEAS_A_CC |
9019a0bf528SMauro Carvalho Chehab 	     B_EQ_REG_RC_SEL_CAR_PASS_A_CC | B_EQ_REG_RC_SEL_CAR_LOCAL_A_CC),
9029a0bf528SMauro Carvalho Chehab 
9039a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
9049a0bf528SMauro Carvalho Chehab };
9059a0bf528SMauro Carvalho Chehab 
9069a0bf528SMauro Carvalho Chehab u8 DRXD_DiversityDelay8MHZ[] = {
9079a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_2K_32__A, 1150 - 50),
9089a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_2K_16__A, 1100 - 50),
9099a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_2K_8__A, 1000 - 50),
9109a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_2K_4__A, 800 - 50),
9119a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_8K_32__A, 5420 - 50),
9129a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_8K_16__A, 5200 - 50),
9139a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_8K_8__A, 4800 - 50),
9149a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_8K_4__A, 4000 - 50),
9159a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
9169a0bf528SMauro Carvalho Chehab };
9179a0bf528SMauro Carvalho Chehab 
9189a0bf528SMauro Carvalho Chehab u8 DRXD_DiversityDelay6MHZ[] =	/* also used ok for 7 MHz */
9199a0bf528SMauro Carvalho Chehab {
9209a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_2K_32__A, 1100 - 50),
9219a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_2K_16__A, 1000 - 50),
9229a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_2K_8__A, 900 - 50),
9239a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_2K_4__A, 600 - 50),
9249a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_8K_32__A, 5300 - 50),
9259a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_8K_16__A, 5000 - 50),
9269a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_8K_8__A, 4500 - 50),
9279a0bf528SMauro Carvalho Chehab 	WR16(B_SC_RA_RAM_DIVERSITY_DELAY_8K_4__A, 3500 - 50),
9289a0bf528SMauro Carvalho Chehab 	END_OF_TABLE
9299a0bf528SMauro Carvalho Chehab };
930