Subject: Re: needs MI wdc changes to support macppc's wdc
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Ignatios Souvatzis <is@jocelyn.rhein.de>
List: tech-kern
Date: 11/04/1998 22:26:51
On Wed, Nov 04, 1998 at 08:50:50AM -0800, Jason Thorpe wrote:
> On Wed, 4 Nov 1998 10:30:37 +0100 
>  Ignatios Souvatzis <ignatios@theory.cs.uni-bonn.de> wrote:
> 
>  > Yes, but ports as the Amiga that need variable strides in bus_space anyway
>  > will get the double overhead.
> 
> Yes, fine...
> 
> But the issue is whether or not the stride is a device thing or a bus
> thing.
> 
> Let's say for example that you have a Cyberdyne Frobnitz workstation.  On
> the mainboard is an IDE controller and a 16550 serial port.  The registers
> on these devices are spaced mod 4... 1 byte, followed by 3 bytes of gap,
> etc.  On this system, it is clearly a stride imposed by the bus they're
> attached to.
> 
> Now, let's say you have the newer 7000 model ... On this system the
> serial port registers are linear (no gap), but the IDE registers are
> spaced mod 16.  On this system, it's an issue of how the individual
> chips are wired up, i.e. the stride is per-device.
> 
> In the first example, it's appropriate to use stride in the bus space
> tag.  In the second example, it's appropriate to add register map
> support in the driver.

Uhm, my other answer wasnt really clear, maybe. So, behind the zbus abstraction
or the mainboard, on Amiga, there are hiding:

A normal 1:1 mapped real devices.
B bytewise mapped, on word physical busses, using one of the 2 byte lanes.
C bytewise mapped, on longword physical busses, using one of the 4 byte lanes

a mixture of B (for the normal registers) and A (for the wordwise view of 
the data port) for the IDE interface.

All of this can handled without making the chipset drivers ugly, if the attach
code is allowed to sort-of-know how to create this devices' bus-space tag and
handle (thats what the Amiga port is doing).

Regards,
	-is