Subject: Re: needs MI wdc changes to support macppc's wdc
To: None <ignatios@theory.cs.uni-bonn.de, thorpej@nas.nasa.gov>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-kern
Date: 11/04/1998 19:16:40
ignatios@theory.cs.uni-bonn.de wrote:

> On Tue, Nov 03, 1998 at 11:15:09AM -0800, Jason Thorpe wrote:

> > I don't think it will be much overhead.  For multi-pio, the address will
> > be computed only once.  I think the reg map in the wdc driver is the right
> > way to go.
> 
> Yes, but ports as the Amiga that need variable strides in bus_space anyway
> will get the double overhead.

Currently, my patch is using the reg map array
only if `WDC_NONCONTIG_REG' is defined.
Otherwise the array offset is used as register address offset.
There are following defines in /sys/dev/ic/wdcvar.h:

---
#if defined(macppc)
# define WDC_NONCONTIG_REG
#endif

#ifdef WDC_NONCONTIG_REG
#define wdcregoff(chp, a)	(chp)->wdc->reg_offset[a]
#else
#define wdcregoff(chp, a)	(a)
#endif
---

This implementation avoids overheads on archs which have
only contiguous offsets, but I'm not sure whether these
defines are appropriate.

---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp