linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@cs.anu.edu.au>
To: tas@mindspring.com
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: Great IDE perf (WAS: Strange PMAC IDE performance)
Date: Thu, 7 Jan 1999 22:32:47 +1100	[thread overview]
Message-ID: <199901071132.WAA01174@tango.anu.edu.au> (raw)
In-Reply-To: <v04011701b2ba429e00af@[209.86.156.161]> (tas@mindspring.com)


Tim Seufert <tas@mindspring.com> wrote:

> This works on the PowerBook 2400 as well.  It so happens that the IDE
> controllers also sit at 0xf3020000 and 0xf3021000 on the O'Hare.  The value
> of the register at offset 0x200 is slightly different under MacOS:
> 0x221025.  I tried both values, it didn't seem to make a difference.  I did
> a quick hack to ide-pmac.c (it just stuffs the value in, no questions
> asked, though it does actually use the correct base address instead of hard
> coding 0xf3020000) and that worked.  Performance is up to 5.6 MB/s (was in
> the region of 1.6 before).
> 
> Right now my cheap hack is using 0x221025, but if somebody wants I will do
> 0x211025 instead for an extended period to see if there are any problems.

The hack also works on my powerbook 3400, but I only get 4.3MB/s.  On
the iMac I get 10.53MB/s with 211025, but only 8.47MB/s with 221025.

I did some fiddling around, testing the speed with different values in
the register, and I think it is something like this:

- the 3ff000 bits control the speed of dma accesses, the 000fff bits
  control the speed of PIO accesses
- I think the 3f0000 and 00f000 bits control different aspects of dma
  access speed
- the c00, 300 and ff bitfields seem to control different aspects of
  PIO timing.  I think there are bitfields inside of the ff bitfield,
  but I haven't worked out exactly what's going on.  Time for a CRO
  maybe :-)

I think probably any modern drive would be OK with 211025.  Ideally we
would work out exactly how the values relate to the PIO and DMA modes
defined in the ATA-2 spec, then implement the code for selecting
PIO/DMA modes in the ide-pmac driver as requested by the higher level
IDE driver (based on the capabilities reported by the disk).

> Any guesses about the meaning of this register?  It feels wrong somehow to
> just ape MacOS without knowing what's really going on.  :)

It's nice to know what's really going on, but we have managed without
it more-or-less in several other places (e.g. the swim3 floppy
driver).

Paul.

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

  reply	other threads:[~1999-01-07 11:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-05  8:52 Strange PMAC IDE performance problem Timothy A. Seufert
1999-01-05 11:33 ` Albrecht Dreß
1999-01-05 17:52   ` Marcus H. Mendenhall
1999-01-05 18:49   ` Timothy A. Seufert
1999-01-05 22:48     ` Benjamin Herrenschmidt
1999-01-06  5:56       ` Dan Malek
1999-01-06  9:59         ` Benjamin Herrenschmidt
1999-01-06  9:23       ` Albrecht Dreß
1999-01-06 10:02         ` Benjamin Herrenschmidt
1999-01-06 23:22           ` Paul Mackerras
1999-01-07  9:11             ` Benjamin Herrenschmidt
1999-01-05 22:39 ` Paul Mackerras
1999-01-06  6:01   ` Paul Mackerras
1999-01-06 11:51     ` Benjamin Herrenschmidt
1999-01-06 16:02     ` Great IDE perf (WAS: Strange PMAC IDE performance) Benjamin Herrenschmidt
1999-01-07 11:12       ` Timothy A. Seufert
1999-01-07 11:32         ` Paul Mackerras [this message]
1999-01-07 18:59           ` Timothy A. Seufert
1999-01-07 11:59         ` Benjamin Herrenschmidt
1999-01-07 18:59           ` Timothy A. Seufert
1999-01-07 20:15             ` Benjamin Herrenschmidt
1999-01-08  2:06           ` Paul Mackerras
1999-01-08  3:30             ` Benjamin Herrenschmidt
     [not found] <19990106170222.030778>
1999-01-06 17:21 ` Benjamin Herrenschmidt

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=199901071132.WAA01174@tango.anu.edu.au \
    --to=paulus@cs.anu.edu.au \
    --cc=Paul.Mackerras@cs.anu.edu.au \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=tas@mindspring.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;
as well as URLs for NNTP newsgroup(s).