comparison driver/pt1_tuner.c @ 79:3c2123189edf

improve PT2 support. - update read check in initialization - PT2 specific RAM phase initialization
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 07 Dec 2009 15:01:57 +0900
parents 517e61637f7b
children c940283dd890
comparison
equal deleted inserted replaced
78:5a0126d8af17 79:3c2123189edf
104 104
105 // 初期化1(なぜかREADなので) 105 // 初期化1(なぜかREADなので)
106 memcpy(&wk, &isdb_s_init1, sizeof(WBLOCK)); 106 memcpy(&wk, &isdb_s_init1, sizeof(WBLOCK));
107 wk.addr = addr; 107 wk.addr = addr;
108 val = i2c_read(regs, lock, &wk, 1); 108 val = i2c_read(regs, lock, &wk, 1);
109 if((val & 0xff) != 0x41){
110 printk(KERN_INFO "PT1:ISDB-S Read(%x)\n", val);
111 return -EIO ;
112 }
113 109
114 if(cardtype == PT1) { 110 if(cardtype == PT1) {
115 for(lp = 0 ; lp < PT1_MAX_ISDB_S_INIT ; lp++){ 111 if((val & 0xff) != 0x4c) {
112 printk(KERN_INFO "PT1:ISDB-S Read(%x)\n", val);
113 return -EIO ;
114 }
115 for(lp = 0 ; lp < PT1_MAX_ISDB_S_INIT ; lp++) {
116 memcpy(&wk, isdb_s_initial_pt1[lp], sizeof(WBLOCK)); 116 memcpy(&wk, isdb_s_initial_pt1[lp], sizeof(WBLOCK));
117 wk.addr = addr; 117 wk.addr = addr;
118 i2c_write(regs, lock, &wk); 118 i2c_write(regs, lock, &wk);
119 } 119 }
120 } 120 }
121 else if(cardtype == PT2) { 121 else if(cardtype == PT2) {
122 for(lp = 0 ; lp < PT2_MAX_ISDB_S_INIT ; lp++){ 122 if((val & 0xff) != 0x52) {
123 printk(KERN_INFO "PT2:ISDB-S Read(%x)\n", val);
124 return -EIO ;
125 }
126 for(lp = 0 ; lp < PT2_MAX_ISDB_S_INIT ; lp++) {
123 memcpy(&wk, isdb_s_initial_pt2[lp], sizeof(WBLOCK)); 127 memcpy(&wk, isdb_s_initial_pt2[lp], sizeof(WBLOCK));
124 wk.addr = addr; 128 wk.addr = addr;
125 i2c_write(regs, lock, &wk); 129 i2c_write(regs, lock, &wk);
126 } 130 }
127 } 131 }