From: Andy Walls <awalls@md.metrocast.net>
To: Jarod Wilson <jarod@wilsonet.com>
Cc: Jean Delvare <khali@linux-fr.org>, Mike Isely <isely@isely.net>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
Jarod Wilson <jarod@redhat.com>, Janne Grunau <j@jannau.net>,
Mauro Carvalho Chehab <mchehab@redhat.com>
Subject: Re: [GIT PATCHES for 2.6.38] Zilog Z8 IR unit fixes
Date: Thu, 20 Jan 2011 08:22:52 -0500 [thread overview]
Message-ID: <1295529772.2056.24.camel@morgan.silverblock.net> (raw)
In-Reply-To: <DF6BA086-43FF-4FD9-A30E-EB8AAF451A94@wilsonet.com>
On Wed, 2011-01-19 at 23:45 -0500, Jarod Wilson wrote:
> On Jan 19, 2011, at 3:08 PM, Jarod Wilson wrote:
> > I'm working on
> > fixing up hdpvr-i2c further right now, and will do some more prodding
> > with pvrusb2, the code for which looks correct with two i2c_new_device()
> > calls in it, one for each address, so I just need to figure out why
> > lirc_zilog is getting an -EIO trying to get tx brought up.
>
> So as we were discussing on irc today, the -EIO is within lirc_zilog's
> send_boot_data() function. The firmware is loaded, and then we send the
> z8 a command to activate the firmware, immediately follow by an attempt
> to read the firmware version. The z8 is still busy when we do that, and
> throwing in a simple mdelay() remedies the problem for both the hvr-1950
> and the hdpvr -- tried 100 initially, and all the way down to 20 still
> worked, didn't try any lower.
The Z8 on my HVR-1600 is using a 18.432 MHz crystal for its clock.
The Z8 CPU Fetch and Execution units are running with a pipeline depth
of 1: 1 insn being executed while another 1 insn is being fetched. Most
Z8 fetch or execution cycle counts are in the range of 2-4 cycles. So
let's just assume an insn takes 4 cycles to execute.
18.432 MHz * 20 ms = 368,640 cycles
368,640 cycles / 4 cycles/insn = 92,160 insns
20 ms is ~90k instructions, and seems like too long a delay to be just
for Z8 latency.
I find it interesting that for the HVR-1600 the delay isn't needed at
all.
I'm wondering if there might also be some Linux/USB latency in getting
commands shoved over to the HVR-1950's controller (or maybe latency in
the HVR-1950's controller too), for which this delay is really
accounting. I suppose in kernel tracing can be used to find the latency
on shoving things across the USB and watching for any Ack from the
HVR-1950 controller. An experiment for some other day, I guess.
> And I definitely horked up the hdpvr i2c a bit, but have a follow-up
> patch that goes back to doing the right thing with two i2c_new_device()
> calls, which I've successfully tested with the latest lirc_zilog plus
> mdelay patch.
Yay!
Regards,
Andy
next prev parent reply other threads:[~2011-01-20 13:23 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-16 19:20 [GIT PATCHES for 2.6.38] Zilog Z8 IR unit fixes Andy Walls
2011-01-17 3:29 ` Andy Walls
2011-01-19 5:20 ` Jarod Wilson
2011-01-19 12:21 ` Andy Walls
2011-01-19 12:40 ` Jean Delvare
2011-01-19 13:24 ` Andy Walls
2011-01-19 13:28 ` Mike Isely
2011-01-19 13:20 ` Mike Isely
2011-01-19 13:38 ` Andy Walls
2011-01-19 13:50 ` Jean Delvare
2011-01-19 17:12 ` Jarod Wilson
2011-01-19 17:39 ` Jarod Wilson
2011-01-19 17:43 ` Jean Delvare
2011-01-19 20:08 ` Jarod Wilson
2011-01-20 4:45 ` Jarod Wilson
2011-01-20 4:52 ` Jarod Wilson
2011-01-20 13:22 ` Andy Walls [this message]
2011-01-20 21:49 ` Jarod Wilson
2011-01-21 1:10 ` Andy Walls
2011-01-21 3:58 ` Jarod Wilson
2011-01-19 14:17 ` Mike Isely
2011-01-19 16:42 ` Jarod Wilson
2011-01-19 16:57 ` Mike Isely
2011-01-19 17:07 ` Jarod Wilson
2011-01-19 16:08 ` Jarod Wilson
2011-01-19 16:10 ` Devin Heitmueller
2011-01-19 14:59 ` Jean Delvare
2011-01-19 15:09 ` Mike Isely
2011-01-19 15:18 ` Jean Delvare
-- strict thread matches above, loose matches on Subject: below --
2011-01-19 16:46 Andy Walls
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1295529772.2056.24.camel@morgan.silverblock.net \
--to=awalls@md.metrocast.net \
--cc=isely@isely.net \
--cc=j@jannau.net \
--cc=jarod@redhat.com \
--cc=jarod@wilsonet.com \
--cc=khali@linux-fr.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox