On Fri, 21 Jan 2000, Tony Frank (EPA) wrote:
> I think I could configure the card to use the range 0xd0000 - 0xd3fff
> for the SRAM and then 0xd4000 - 0xd5fff for the MMIO, thus having a
> continuous block between 0xd0000 and 0xd5fff that I might be able to
> allocate in one hit.  This however seems to be a bit of a workaround.

I'm not sure how using 1 memory area is a workaround; from your driver
point of view you're just going to be assigning pointers in your softc to
physical memory addresses in that range no?

> Essentially I have been using the source from other drivers to try and
> understand how the system works, but I am yet to find one that allocates two
> sets of memory.

Thats what 'rid' is for; since you can probably ask the card what its
resources are you really don't need to use the ISA hint mechanism; you can
do something like this:

device foo0     at isa? port 0xa20

And let your probe routine dig the rest of the resources out of the
adpater and add them using bus_set_resource(), or you can be more tricky
and use a DEVICE_IDENTIFY method to look for any cards, add devices for
them and assign resources to them.  This would net you a config entry
looking something like this:

device foo0

Anyhow, I can help you out with any of the newbus/resource questions you
may have.  I've got the MCA versions of those boards and will add the
bus front ends to your driver when you've got it ready.  I suggest you
split your driver into the driver proper, and the bus front ends:

if_foo_isa.c
if_foo.c
if_fooreg.h
if_foovar.h

etc...

> One other issue that I am wondering about is overriding settings
> provided in the config file.  If I specify an IRQ of 11, when the card
> is programmed to use 9, the bus_alloc_resource will give back an IRQ
> value of 11, which causes problems later as the card is using 9.  I
> can read the IRQ value that the card is set to, but I'm not sure on
> the correct procedure to request that specific IRQ for my driver?

In your probe routine you may use bus_set_resource(dev, SYS_RES_IRQ, 0,
irq#, 1);

This will override the IRQ that was specified in the config file; you
might want to do a test to see if the configured IRQ is different than the
board IRQ though.

-- 
| Matthew N. Dodd  | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD  |
| [EMAIL PROTECTED] |       2 x '84 Volvo 245DL        | ix86,sparc,pmax |
| http://www.jurai.net/~winter | This Space For Rent  | ISO8802.5 4ever |



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to