* [PATCH 6/12] tm6000: tuner reset timeing optimation
@ 2010-02-05 23:04 stefan.ringel
2010-02-08 11:23 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 4+ messages in thread
From: stefan.ringel @ 2010-02-05 23:04 UTC (permalink / raw)
To: linux-media; +Cc: mchehab, dheitmueller, Stefan Ringel
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;
}
}
--
1.6.6.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 6/12] tm6000: tuner reset timeing optimation
2010-02-05 23:04 [PATCH 6/12] tm6000: tuner reset timeing optimation stefan.ringel
@ 2010-02-08 11:23 ` Mauro Carvalho Chehab
2010-02-10 15:59 ` Stefan Ringel
0 siblings, 1 reply; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2010-02-08 11:23 UTC (permalink / raw)
To: stefan.ringel; +Cc: linux-media, dheitmueller
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.
--
Cheers,
Mauro
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 6/12] tm6000: tuner reset timeing optimation
2010-02-08 11:23 ` Mauro Carvalho Chehab
@ 2010-02-10 15:59 ` Stefan Ringel
2010-02-10 16:08 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Ringel @ 2010-02-10 15:59 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, dheitmueller
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 <stefan.ringel@arcor.de>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 6/12] tm6000: tuner reset timeing optimation
2010-02-10 15:59 ` Stefan Ringel
@ 2010-02-10 16:08 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2010-02-10 16:08 UTC (permalink / raw)
To: Stefan Ringel; +Cc: linux-media, dheitmueller
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.
--
Cheers,
Mauro
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-02-10 16:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-05 23:04 [PATCH 6/12] tm6000: tuner reset timeing optimation stefan.ringel
2010-02-08 11:23 ` Mauro Carvalho Chehab
2010-02-10 15:59 ` Stefan Ringel
2010-02-10 16:08 ` Mauro Carvalho Chehab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox