Subject: Re: better sonic -- Re: bus_dma on jazzio
To: Toru Nishimura <nisimura@itc.aist-nara.ac.jp>
From: Wayne Knowles <w.knowles@niwa.cri.nz>
List: port-arc
Date: 02/24/2001 12:56:35
On Fri, 23 Feb 2001, Toru Nishimura wrote:

> Tic-tic-tic.  Purse 32bit sane, endian neutral, RISC friendly driver
> first, please.   R4000 Magnum designer was very careful to populate
> hardware registers useful in endian neutral way.  For the target chip
> register are 8bit-wise, they can be written in 0x......VV where upper
> 24bit bit value is "don't-care", and when read, upper 24bit value is
> unpredictable and to be masked off before use.  Then, as long as chip
> registers are accessed 32bit (or 64bit) chunk, kernel can have few
> endian dependency in the aspect.
> 
> Wayne, due to the way you wrote driver, NetBSD/mipsco for R3000 Magnum
> is BE only.  As you know the hardware can be booted in another endian.
> NetBSD/mipsco could be useful in LE when rewritten.

True - there is an output bit on the keyboard controller that can force a
LE mode on the next reboot.  There is no other reference to say what the
bit number and corresponding keyboard controller sub-command is to toggle
the bit.   There is a good chance that you need totally different firmware
PROMS for LE mode - possibly a new i8042 keyboard controller as well.

However,  fixing the bus_space will be quite trivial.  I did attempt
to do this in the early stages of implementation, but for reasons known
only to the low level hardware it didn't work - there appears to be some
"rules" on word access that have been enforced by hardware.  From what I
can tell some word accesses don't work, possibly to avoid word prefetches
when writing byte or half-word data (write combining in the output
buffers)

I do plan to re-address (no pun intended) this issue in the future when I
add extra bus space interfaces for ISA and VMEbus support 

> BTW, NetBSD/mipsco is the most beautifully implemented MIPS NetBSD.
> When you guys start another MIPS port, look at it first and stale the
> code from there.  NetBSD/pmax is the worst example (I admit...)

There are plans to add a generic "dma engine" hook around the ASC
driver.  This is needed for the VMEbus based RC3350 (and RC3250/3360)
processor board(s) which also uses the 53c94 SCSI controller but with
the radically different "Gensis" DMA architecture.

The R4000 Magnum machines have yet another DMA architecure, so the above
changes should allow us to have a similar (if not identical) asc driver
between the mipsco and arc ports.

Wayne
-- 
  _____	   	Wayne Knowles,  Systems Manager
 / o   \/   	National Institute of Water & Atmospheric Research Ltd
 \/  v /\   	P.O. Box 14-901 Kilbirnie, Wellington, NEW ZEALAND
  `---'     	Email:   w.knowles@niwa.cri.nz