diff 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
line wrap: on
line diff
--- a/driver/pt1_tuner.c	Tue Dec 01 20:24:22 2009 +0900
+++ b/driver/pt1_tuner.c	Mon Dec 07 15:01:57 2009 +0900
@@ -106,20 +106,24 @@
 	memcpy(&wk, &isdb_s_init1, sizeof(WBLOCK));
 	wk.addr = addr;
 	val = i2c_read(regs, lock, &wk, 1);
-	if((val & 0xff) != 0x41){
-		printk(KERN_INFO "PT1:ISDB-S Read(%x)\n", val);
-		return -EIO ;
-	}
 
 	if(cardtype == PT1) {
-		for(lp = 0 ; lp < PT1_MAX_ISDB_S_INIT ; lp++){
+		if((val & 0xff) != 0x4c) {
+			printk(KERN_INFO "PT1:ISDB-S Read(%x)\n", val);
+			return -EIO ;
+		}
+		for(lp = 0 ; lp < PT1_MAX_ISDB_S_INIT ; lp++) {
 			memcpy(&wk, isdb_s_initial_pt1[lp], sizeof(WBLOCK));
 			wk.addr = addr;
 			i2c_write(regs, lock, &wk);
 		}
 	}
 	else if(cardtype == PT2) {
-		for(lp = 0 ; lp < PT2_MAX_ISDB_S_INIT ; lp++){
+		if((val & 0xff) != 0x52) {
+			printk(KERN_INFO "PT2:ISDB-S Read(%x)\n", val);
+			return -EIO ;
+		}
+		for(lp = 0 ; lp < PT2_MAX_ISDB_S_INIT ; lp++) {
 			memcpy(&wk, isdb_s_initial_pt2[lp], sizeof(WBLOCK));
 			wk.addr = addr;
 			i2c_write(regs, lock, &wk);