Subject: Re: tulip for big-endian bus
To: Atsushi Onoe <onoe@sm.sony.co.jp>
From: Jason R Thorpe <thorpej@zembu.com>
List: port-newsmips
Date: 10/10/2000 10:56:13
On Wed, Oct 11, 2000 at 12:59:59AM +0900, Atsushi Onoe wrote:
> I'm porting tulip driver to newsmips.
Cool!
> There is a 21140A (without MII) board for APbus, which is a big-endian bus
> for NWS-4000/5000 series of newsmips. Since all PCI I/O and DMA access for
> tulip is translated to APbus (big-endian bus) within the board, I have to
> set BUSMODE_BLE, and BUSMODE_DBO to live with htole32()/le32toh() in tulip.c
> for descriptor access. Also PBL is required to restrict burst length on
> some hardware.
Oh foo. I really need to get off my duff and do the bus_dma mods that
I want to do... but anyway, we can get around this...
> How should I set these BUSMODE flags for tulip? Is it reasonable to move
> sc_preinit() hook after initialization of sc->sc_busmode?
No, that won't work. You have to do preinit before reset.
How about adding:
sc_busmode_pbl
members to the tulip_softc structure to indicate the default PBL to use
for that chip (initialize it to something appropriate in the existing
front-ends), and add new TULIPF_BLE and TULIPF_DBO flags that the front-end
can set to indicate that tlp_init() should set those BUSMODE bits.
Does that sound reasonable?
--
-- Jason R. Thorpe <thorpej@zembu.com>