Subject: Re: needs MI wdc changes to support macppc's wdc
To: Izumi Tsutsui <firstname.lastname@example.org>
From: Ignatios Souvatzis <email@example.com>
Date: 10/25/1998 15:51:17
On Sun, Oct 25, 1998 at 09:24:18AM -0500, Allen Briggs wrote:
> > I'd like to use the MI wdc.c for it, but offsets of registers
> > defined in wdcreg.h don't match macppc's wdc registers.
> > The offsets of macppc's wdc registers are aligned every 16 bytes.
> > [...]
> > On the other hand, atari's wdc has also non-contiguous offsets
> > but atari's mb_bus_space_*() functions handle it as contiguous.
> > I heard that mac68k's wdc had non-contiguous offsets, too.
> The mac68k wdc has non-contiguous offsets, too. I think it's also every
> 16 bytes. I think that the cleanest solution is to make the bus_space*()
> functions handle the register addressing, but I don't know if anyone has
> measured any performance penalties that you might incur from doing so
> (for the regions that don't need the offset modified).
Look at the Amiga bus-space stuff for an example. Many Amiga ZBUS boards
are addressed at odd/even spacing, some Amiga or DraCo mainbus chips are
addressed every 4 bytes.
We do com-style serial, lpt, ARCnet and passive ISDN boards with
busified drivers, without visible performance penalty. (I benchmarked
what was otherwise the same kernel, but with the old and the busified
ARCnet driver... no speed difference doing 2-MB ftp transfers.)
Thats what the _region_ and _multi_ functions are about: avoid repeated
address calculations for bulk transfers, thus eliminating most of the
theoretical performance penalty of bus_space_xxx().