Subject: Re: problem with bus_space_map
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Anand Lalgondar <solarflares@fastmail.fm>
List: tech-kern
Date: 02/13/2004 10:19:19
> > The on-chip devices and the on-board devices will be allocated some fixed
> > physical address that are mapped to some virtual address. All of the
> > devices may not require bus_space functionality to be implemeted. But, it
> 
> In NetBSD all device drivers should use bus_space :)
> device drivers not using bus_space are machine-dependant, so they can
> update
> the bus_space informations if needed.
> 
Thats true and I compeletely agree. But, when you want to write a driver
to an on-chip or on-board pheripheral device the first thing would be to
test the basic functionality of the device without bothering about the
bus_space tag/handle. Finally when the basic flow is ready then you have
to use bus_space tag/handle to make a machine independent interface
point, where the machine dependent code will attach to the same. Now,
again the tags and handles are provided by the parent to this interface
point  (machine independent framework), at this stage if you have a
mapping information of the devices then you could decide what memory to
use.

The main information required is the memory ranges allocated to the
parent devices, since most of the child devices would be using a memory
window thats within the range of its parent.

 - Anand

-- 
http://www.fastmail.fm - Consolidate POP email and Hotmail in one place