Subject: bus_spacing a FreeBSD driver
To: None <tech-kern@netbsd.org>
From: Matthias Scheler <tron@lyssa.owl.de>
List: tech-kern
Date: 09/11/1998 22:21:22
	Hi,

I'm trying to convert a FreeBSD PCI driver which is i386 only so far to
use bus_space. In its include file it defines register datatypes ...

typedef volatile u_int  bregister_t;

#define BTBYTE(what)    bregister_t  what:8; int :24
#define BTWORD(what)    bregister_t  what:16; int: 16
#define BTLONG(what)    bregister_t  what:32

... and a structure with lots of registers using these types.
Later it does access like this:

        bt848->dstatus = 0x00;

So how do I change this? Can I modify this structure, map it properly
and still peek into it? Or will I have to use bus_map_*_read() with
a base address and some kind of offset?

[Sorry, if these question are stupid but this is my first encounter
 with kernel hardware handling.]

-- 
Matthias Scheler                                http://home.owl.de/~tron/