Subject: Re: New SONIC driver
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Jason R Thorpe <thorpej@zembu.com>
List: port-arc
Date: 07/03/2001 08:14:35
On Tue, Jul 03, 2001 at 11:30:33PM +0900, Izumi Tsutsui wrote:

 > BTW, I think the MI SONIC driver should also be shared with
 > mac68k and newsmips, then I have some questions:

Yes, I agree they should share it.

 > 1) Some SONIC boards for mac68k uses 16-bit mode.
 >    (see mac68k/dev/if_snvar.h) How is it handled in your driver?

What I did was defined both versions of the chip's data structures,
and then decide which ones to use at run-time based on `sc->sc_32bit'.
I've tried to encapsulate these inside macros when possible (like when
sync'ing the structures, etc.).

I also handle the BMODE pin at run-time, in the event there's a system
with 2 SONICs configured for different byte-orders (like one on-board
and one in an ISA/VME slot, or something).

 > 2) It seems that the AP-bus SONIC for newsmips can only transfer
 >    data into/from on-board memory. How should we handle this?
 >    Should we implement special bus_dma(9) functions for it
 >    to perform bounce buffer?

Sigh, I was afraid someone was going to say that :-)

Yah, I think special bus_dma functions would be the best thing, here.  If
we encounter some MI need for this, I suppose we can burn that bridge when
we come to it.

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>