Subject: Re: needs MI wdc changes to support macppc's wdc
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-kern
Date: 11/04/1998 19:22:29
On Nov 4, Jason Thorpe wrote
> 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.
For the big vs little endian problem at last, I consider the IDE bus as being
a plain, little endian bus (i.e. it can need its own bus_space tag and
handles). This matches the hardware, as the registers are in the drives
themselve, not on the controller. The controller is just a bridge.
On the IDE bus registers are always contigous, so if the controller impose
a stride I think this should be handled by the IDE bus_space functions/tags.
These functions and tag can be the same as the bus the controller is attached
to (like wdc at isa) or be different because of endianness of both busses
are different (IDE is a LE bus). I think register spacing should be handled
the same way (I suggested the use of offset arrays, just because I didn't
think about handling it in the bus_space functions).
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
--