All of lore.kernel.org
 help / color / mirror / Atom feed
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,
	Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	ralf@linux-mips.org
Subject: Re: [PATCH 1/2] tx4938ide: Check minimum cycle time and SHWT range
Date: Mon, 27 Oct 2008 17:07:05 +0300	[thread overview]
Message-ID: <4905CB09.5020805@ru.mvista.com> (raw)
In-Reply-To: <20081027.223913.128619425.anemo@mba.ocn.ne.jp>

Hello.

Atsushi Nemoto wrote:

> 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>

> diff --git a/drivers/ide/tx4938ide.c b/drivers/ide/tx4938ide.c
> index fa660f9..7e4820e 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 * cycle * 4 + t->act8b < t->cycle)

    This can lead to adding an extra setup cycle due to use of "non-quantized" 
active time, here's more precise expression for the cycle time:

    (shwt * 4 + wt + (wt ? 2 : 3)) * cycle

or even this, more obsure:

    (shwt * 4 + wt + !wt + 2) * cycle

MBR, Sergei

  reply	other threads:[~2008-10-27 14:07 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 [this message]
2008-10-27 14:52   ` Atsushi Nemoto
2008-10-27 23:12     ` Sergei Shtylyov
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=4905CB09.5020805@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.