From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Matt Sealey <matt@genesi-usa.com>
Cc: IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: Re: Timing computation, values missing from table (in spec though)
Date: Fri, 10 Feb 2012 19:34:29 +0300 [thread overview]
Message-ID: <4F354715.5020909@mvista.com> (raw)
In-Reply-To: <CAKGA1bmiocDOg0Li8bA+v8MUuze1Z6yOfWx2kTh76OdJwDVg4A@mail.gmail.com>
Hello.
On 02/09/2012 11:19 PM, Matt Sealey wrote:
> A question so I can see if I can use ata_timing_compute or possibly improve it..
> The current mode timings list seems to be missing a few timings we
> need that cannot possibly (and don't seem to be attempted) to be
> resolved from the ata_timings table in libata-core.c.
> We have a bank of registers in our ATA controller where these values
> need setting; is it that the timings table is missing the values (and
> the same true of the one in ide-timings.c) no
> other drive controller actually needed such fine timings and would
> implement them as per the spec minimums by itself?
Yes.
> We need to actually set the specific time in ATA clocks in those
> registers, and there is a register for every timing reference in the
> ATA spec tables and diagrams.. specifically t4 and t9 are missing for
I have controller with t9 programmable too (and t2i NOT programmable at the
same time), so I had to use custom formula to calculate it, in order to stretch
the t2i to meet t0 timing. :-)
> PIO (and tA would be derived for iordy by the current code, right? But
> we also need to set tRD which seems not to be)
tRD has minimum value of 0 for all modes, hence I see no sense adding it to
the ata_timing[]. The same about tA which is always 35 ns min (or max?). And
wait, is tRD aven controllable by host?!
> and for DMA, several others (tM for MWDMA)
I also needed this timing in my yet unpublished driver but decided not to
clutter ata_timing[] -- unlike we did with tJ ('dmack_hold') used by only one
driver and moreover, simply computable from the driver mode.
> and I am really confused where the values for
> UDMA are meant to be derived for the controller since none of them are
> listed in the comments for struct ata_timing.
Common x86 controllers only need one timing, hence the table only has
t2CYCTYP/2.
> Is it a good or bad idea to expand the table to include the extra
> timings, or should we just include a custom table of timings and
> manage the situation ourselves? Part of my reason for wanting to use
> the libata core timings is because of all the safety checks which I
> don't get with a custom blob of numbers pulled from some older source
> code that I have no idea how they were derived..
Well, that depends on the demand on the new timings -- if more than one
driver needs them, we should add them to the table. Although with more UDMA
timings added, the table is going to become quite ugly (perhaps we should add a
new table for just UDMA timings instead of mechanically extending
ata_timing[]?). I myself decided not to add anything to ata_timing[] as my
driver seemed one-off example of needing so many timings...
MBR, Sergei
next prev parent reply other threads:[~2012-02-10 15:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 20:19 Timing computation, values missing from table (in spec though) Matt Sealey
2012-02-10 16:34 ` Sergei Shtylyov [this message]
2012-02-10 20:40 ` Matt Sealey
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=4F354715.5020909@mvista.com \
--to=sshtylyov@mvista.com \
--cc=linux-ide@vger.kernel.org \
--cc=matt@genesi-usa.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.