Message ID | 1265411060-12125-6-git-send-email-stefan.ringel@arcor.de (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Return-path: <linux-media-owner@vger.kernel.org> Envelope-to: mchehab@infradead.org Delivery-date: Fri, 05 Feb 2010 23:05:15 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra with IMAP (fetchmail-6.3.6) for <mchehab@localhost> (single-drop); Sat, 06 Feb 2010 23:31:15 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NdXEh-0001xq-54; Fri, 05 Feb 2010 23:05:15 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755091Ab0BEXFM (ORCPT <rfc822; kmpark@infradead.org> + 1 other); Fri, 5 Feb 2010 18:05:12 -0500 Received: from mail-in-01.arcor-online.net ([151.189.21.41]:44426 "EHLO mail-in-01.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750968Ab0BEXFL (ORCPT <rfc822;linux-media@vger.kernel.org>); Fri, 5 Feb 2010 18:05:11 -0500 Received: from mail-in-07-z2.arcor-online.net (mail-in-07-z2.arcor-online.net [151.189.8.19]) by mx.arcor.de (Postfix) with ESMTP id 44D0A332A73; Sat, 6 Feb 2010 00:05:09 +0100 (CET) Received: from mail-in-05.arcor-online.net (mail-in-05.arcor-online.net [151.189.21.45]) by mail-in-07-z2.arcor-online.net (Postfix) with ESMTP id 3A1122C7C00; Sat, 6 Feb 2010 00:05:09 +0100 (CET) Received: from localhost.localdomain (dslb-188-103-200-186.pools.arcor-ip.net [188.103.200.186]) (Authenticated sender: stefan.ringel@arcor.de) by mail-in-05.arcor-online.net (Postfix) with ESMTPA id D67953329C6; Sat, 6 Feb 2010 00:05:08 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-05.arcor-online.net D67953329C6 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arcor.de; s=mail-in; t=1265411109; bh=7M5WE2wb2FOD32fJnZrIy79TgDMLvLXXPRJJPdcrgqs=; h=From:To:Cc:Subject:Date:Message-Id; b=GMAUe5aOpM404cVTtzimmuQbsu3oyh50gf7flMZiHkx0M0zfj7PsUODgQPSnP9ava ALIdkOrntFHTeVbAE4JTMVYT8w2AqlFRy99t0HlIBymXBm5ulhKdVkN/Oe/5xr+Q7J cmFPzyb54rYGuqddQZLmGc7Ajr4nlE0LwfxpZ/IU= From: stefan.ringel@arcor.de To: linux-media@vger.kernel.org Cc: mchehab@redhat.com, dheitmueller@kernellabs.com, Stefan Ringel <stefan.ringel@arcor.de> Subject: [PATCH 6/12] tm6000: tuner reset timeing optimation Date: Sat, 6 Feb 2010 00:04:14 +0100 Message-Id: <1265411060-12125-6-git-send-email-stefan.ringel@arcor.de> X-Mailer: git-send-email 1.6.6.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org |
Commit Message
Stefan Ringel
Feb. 5, 2010, 11:04 p.m. UTC
From: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> --- drivers/staging/tm6000/tm6000-cards.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-)
Comments
stefan.ringel@arcor.de wrote: > From: Stefan Ringel <stefan.ringel@arcor.de> > > Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> > --- > drivers/staging/tm6000/tm6000-cards.c | 11 +++++++---- > 1 files changed, 7 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c > index 1167b01..5cf5d58 100644 > --- a/drivers/staging/tm6000/tm6000-cards.c > +++ b/drivers/staging/tm6000/tm6000-cards.c > @@ -271,11 +271,14 @@ static int tm6000_tuner_callback(void *ptr, int component, int command, int arg) > switch (arg) { > case 0: > 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(130); > + msleep(75); > tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, > dev->tuner_reset_gpio, 0x01); > - msleep(130); > + msleep(60); > break; > case 1: > tm6000_set_reg (dev, REQ_04_EN_DISABLE_MCU_INT, > @@ -288,10 +291,10 @@ static int tm6000_tuner_callback(void *ptr, int component, int command, int arg) > TM6000_GPIO_CLK, 0); > if (rc<0) > return rc; > - msleep(100); > + msleep(10); > rc=tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, > TM6000_GPIO_CLK, 1); > - msleep(100); > + msleep(10); > break; > } > } This sequence and the timeouts are board-specific. Please add a switch(dev->model) and test for your specific board, since your sequence will break for example 10moons, where you really need a longer delay to work.
Am 08.02.2010 12:23, schrieb Mauro Carvalho Chehab: > stefan.ringel@arcor.de wrote: > >> From: Stefan Ringel <stefan.ringel@arcor.de> >> >> Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> >> --- >> drivers/staging/tm6000/tm6000-cards.c | 11 +++++++---- >> 1 files changed, 7 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c >> index 1167b01..5cf5d58 100644 >> --- a/drivers/staging/tm6000/tm6000-cards.c >> +++ b/drivers/staging/tm6000/tm6000-cards.c >> @@ -271,11 +271,14 @@ static int tm6000_tuner_callback(void *ptr, int component, int command, int arg) >> switch (arg) { >> case 0: >> 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(130); >> + msleep(75); >> tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, >> dev->tuner_reset_gpio, 0x01); >> - msleep(130); >> + msleep(60); >> break; >> case 1: >> tm6000_set_reg (dev, REQ_04_EN_DISABLE_MCU_INT, >> @@ -288,10 +291,10 @@ static int tm6000_tuner_callback(void *ptr, int component, int command, int arg) >> TM6000_GPIO_CLK, 0); >> if (rc<0) >> return rc; >> - msleep(100); >> + msleep(10); >> rc=tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, >> TM6000_GPIO_CLK, 1); >> - msleep(100); >> + msleep(10); >> break; >> } >> } >> > This sequence and the timeouts are board-specific. Please add a switch(dev->model) and > test for your specific board, since your sequence will break for example 10moons, where > you really need a longer delay to work. > > What for tuner modell have you, xc2028, xc3028 or xc3028L ? I have xc3028L, And it can reset faster. I'm adding a switch(dev->modell).
Stefan Ringel wrote: > Am 08.02.2010 12:23, schrieb Mauro Carvalho Chehab: >> stefan.ringel@arcor.de wrote: >> >>> From: Stefan Ringel <stefan.ringel@arcor.de> >>> >>> Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> >>> --- >>> drivers/staging/tm6000/tm6000-cards.c | 11 +++++++---- >>> 1 files changed, 7 insertions(+), 4 deletions(-) >>> >>> diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c >>> index 1167b01..5cf5d58 100644 >>> --- a/drivers/staging/tm6000/tm6000-cards.c >>> +++ b/drivers/staging/tm6000/tm6000-cards.c >>> @@ -271,11 +271,14 @@ static int tm6000_tuner_callback(void *ptr, int component, int command, int arg) >>> switch (arg) { >>> case 0: >>> 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(130); >>> + msleep(75); >>> tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, >>> dev->tuner_reset_gpio, 0x01); >>> - msleep(130); >>> + msleep(60); >>> break; >>> case 1: >>> tm6000_set_reg (dev, REQ_04_EN_DISABLE_MCU_INT, >>> @@ -288,10 +291,10 @@ static int tm6000_tuner_callback(void *ptr, int component, int command, int arg) >>> TM6000_GPIO_CLK, 0); >>> if (rc<0) >>> return rc; >>> - msleep(100); >>> + msleep(10); >>> rc=tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, >>> TM6000_GPIO_CLK, 1); >>> - msleep(100); >>> + msleep(10); >>> break; >>> } >>> } >>> >> This sequence and the timeouts are board-specific. Please add a switch(dev->model) and >> test for your specific board, since your sequence will break for example 10moons, where >> you really need a longer delay to work. >> >> > What for tuner modell have you, xc2028, xc3028 or xc3028L ? I have > xc3028L, And it can reset faster. I'm adding a switch(dev->modell). I have one device with each of the above, but the one with xc3028 stopped working when I tried to replace the tm6000revA by a tm6000revD. The newest one has tm6010/xc3028L. I suspect that it supports a faster reset, but I don't remember the exact timings measured based on the m$ driver. the 10moons has a xc2028 and a tm5600, and it hangs if commands are sent too fast to the device.
diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index 1167b01..5cf5d58 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -271,11 +271,14 @@ static int tm6000_tuner_callback(void *ptr, int component, int command, int arg) switch (arg) { case 0: 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(130); + msleep(75); tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, dev->tuner_reset_gpio, 0x01); - msleep(130); + msleep(60); break; case 1: tm6000_set_reg (dev, REQ_04_EN_DISABLE_MCU_INT, @@ -288,10 +291,10 @@ static int tm6000_tuner_callback(void *ptr, int component, int command, int arg) TM6000_GPIO_CLK, 0); if (rc<0) return rc; - msleep(100); + msleep(10); rc=tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN, TM6000_GPIO_CLK, 1); - msleep(100); + msleep(10); break; } }