diff mbox

[04/11] tm6000: add different tuner reset for terratec

Message ID 1266255444-7422-4-git-send-email-stefan.ringel@arcor.de (mailing list archive)
State Accepted
Headers show

Commit Message

Stefan Ringel Feb. 15, 2010, 5:37 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c
index ff04bba..5a8d716 100644
--- a/drivers/staging/tm6000/tm6000-cards.c
+++ b/drivers/staging/tm6000/tm6000-cards.c
@@ -269,12 +269,28 @@  int tm6000_tuner_callback(void *ptr, int component, int command, int arg)
 		/* Reset codes during load firmware */
 		switch (arg) {
 		case 0:
-			tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
-					dev->tuner_reset_gpio, 0x00);
-			msleep(130);
-			tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
-					dev->tuner_reset_gpio, 0x01);
-			msleep(130);
+			/* newer tuner can faster reset */
+			switch(dev->model) {
+			case TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE:
+				tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
+						dev->tuner_reset_gpio, 0x01);
+				msleep(60);
+				tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
+						dev->tuner_reset_gpio, 0x00);
+				msleep(75);
+				tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
+						dev->tuner_reset_gpio, 0x01);
+				msleep(60);
+				break;
+			default:
+				tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
+						dev->tuner_reset_gpio, 0x00);
+				msleep(130);
+				tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
+						dev->tuner_reset_gpio, 0x01);
+				msleep(130);
+				break;
+			}
 			break;
 		case 1:
 			tm6000_set_reg (dev, REQ_04_EN_DISABLE_MCU_INT,