Mercurial > pt1
diff driver/pt1_tuner.c @ 64:98a92ce5382e
added fake support code for PT2. the PT2 part is not expected to work. be careful!
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Thu, 22 Oct 2009 02:18:12 +0900 |
parents | 07b2fc07ff48 |
children | c701bbc532b4 |
line wrap: on
line diff
--- a/driver/pt1_tuner.c Sat Oct 10 01:11:34 2009 +0900 +++ b/driver/pt1_tuner.c Thu Oct 22 02:18:12 2009 +0900 @@ -35,7 +35,7 @@ }isdb_t_freq_add_table; isdb_t_freq_add_table isdb_t_freq_add[10] = { - { 7, 0x8081}, // 0¡Á7Ëø + { 7, 0x8081}, // 0¡Á7Ëø { 12, 0x80A1}, // 8¡Á12Ëø { 21, 0x8062}, // 13¡Á21Ëø { 39, 0x80A2}, // 22¡Á39Ëø @@ -47,20 +47,39 @@ {112, 0x80E4} // 101¡Á112Ëø }; -void settuner_reset(void __iomem *regs, __u32 lnb, __u32 tuner) +void settuner_reset(void __iomem *regs, int cardtype, __u32 lnb, __u32 tuner) { __u32 val = 0; switch(lnb){ - case LNB_11V: val = (1 << BIT_LNB_DOWN); break ; - case LNB_15V: val = (1 << BIT_LNB_UP) | (1 << BIT_LNB_DOWN) ; break ; + case LNB_11V: + val = (1 << BIT_LNB_DOWN); + break ; + case LNB_15V: + val = (1 << BIT_LNB_UP) | (1 << BIT_LNB_DOWN); + break ; } - switch(tuner){ - case TUNER_POWER_ON_RESET_ENABLE: val |= (1 << BIT_TUNER) ; break ; - case TUNER_POWER_ON_RESET_DISABLE: val |= (1 << BIT_TUNER) | (1 << BIT_RESET) ; break ; + if(cardtype == PT1) { + switch(tuner){ + case TUNER_POWER_ON_RESET_ENABLE: + val |= (1 << BIT_TUNER); + break; + case TUNER_POWER_ON_RESET_DISABLE: + val |= (1 << BIT_TUNER) | (1 << BIT_RESET); + break ; + } } - - writel(val, (regs + 4)); + else if(cardtype == PT2) { + switch(tuner){ + case TUNER_POWER_ON_RESET_ENABLE: + val |= (1 << BIT_TUNER) | (1 << BIT_FRONTEND); + break; + case TUNER_POWER_ON_RESET_DISABLE: + val |= (1 << BIT_TUNER) | (1 << BIT_FRONTEND) | (1 << BIT_RESET); + break ; + } + } + writel(val, (regs + CFG_REGS_ADDR)); } static int init_isdb_s(void __iomem *regs, struct mutex *lock, __u32 addr) { @@ -139,8 +158,12 @@ if(type == TYPE_WAKEUP){ switch(tuner_type){ - case CHANNEL_TYPE_ISDB_S:memcpy(&wk, &isdb_s_wake, sizeof(WBLOCK));break ; - case CHANNEL_TYPE_ISDB_T:memcpy(&wk, &isdb_t_wake, sizeof(WBLOCK));break ; + case CHANNEL_TYPE_ISDB_S: + memcpy(&wk, &isdb_s_wake, sizeof(WBLOCK)); + break ; + case CHANNEL_TYPE_ISDB_T: + memcpy(&wk, &isdb_t_wake, sizeof(WBLOCK)); + break ; } wk.addr = address ; i2c_write(regs, lock, &wk);