From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: linux-mips@linux-mips.org, linux-ide@vger.kernel.org,
bzolnier@gmail.com, ralf@linux-mips.org
Subject: Re: [PATCH 1/2] tx4938ide: Check minimum cycle time and SHWT range
Date: Tue, 28 Oct 2008 02:12:10 +0300 [thread overview]
Message-ID: <49064ACA.20200@ru.mvista.com> (raw)
In-Reply-To: <20081027.235224.82088530.anemo@mba.ocn.ne.jp>
Hello.
Atsushi Nemoto wrote:
> From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
> Subject: [PATCH] tx4938ide: Check minimum cycle time and SHWT range (v2)
>
> SHWT value is used as address valid to -CSx assertion and -CSx to -DIOx
> assertion setup time, and contrarywise, -DIOx to -CSx release and -CSx
> release to address invalid hold time, so it actualy applies 4 times and
> so constitutes -DIOx recovery time. Check requirement of the recovery
> time and cycle time. Also check SHWT maximum value.
>
> Suggested-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> diff --git a/drivers/ide/tx4938ide.c b/drivers/ide/tx4938ide.c
> index a0d10a9..796289c 100644
> --- a/drivers/ide/tx4938ide.c
> +++ b/drivers/ide/tx4938ide.c
> @@ -39,10 +39,17 @@ static void tx4938ide_tune_ebusc(unsigned int ebus_ch,
> /* Address-valid to DIOR/DIOW setup */
> shwt = DIV_ROUND_UP(t->setup, cycle);
>
> + /* -DIOx recovery time (SHWT * 4) and cycle time requirement */
> + while ((shwt * 4 + wt + (wt ? 2 : 3)) * cycle < t->cycle)
>
Besides, it's worth making 'wt' variable signed, otherwise you're
risking underflow when subtracting 2 above...
WBR, Sergei
next prev parent reply other threads:[~2008-10-27 23:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-27 13:39 [PATCH 1/2] tx4938ide: Check minimum cycle time and SHWT range Atsushi Nemoto
2008-10-27 14:07 ` Sergei Shtylyov
2008-10-27 14:52 ` Atsushi Nemoto
2008-10-27 23:12 ` Sergei Shtylyov [this message]
2008-10-29 19:12 ` Bartlomiej Zolnierkiewicz
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=49064ACA.20200@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=anemo@mba.ocn.ne.jp \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/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.