Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Jul 2000 17:26:09 -0600
From:      Warner Losh <imp@village.org>
To:        alex@big.endian.de (Alexander Langer)
Cc:        new-bus@FreeBSD.ORG
Subject:   Re: newbus replacement for kvtop() 
Message-ID:  <200007222326.RAA14043@harmony.village.org>
In-Reply-To: Your message of "Sat, 22 Jul 2000 17:51:12 %2B0200." <20000722175112.A16931@cichlids.cichlids.com> 
References:  <20000722175112.A16931@cichlids.cichlids.com>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20000722175112.A16931@cichlids.cichlids.com> Alexander Langer writes:
:      if (isa16bit) {
:                 if (sc->is790) {
:                         sc->wd_laar_proto = ed_readb(sc, 
:                                                   sc->asic_addr + ED_WD_LAAR);
:                 } else {
:                         sc->wd_laar_proto = ED_WD_LAAR_L16EN |
:                             ((kvtop(sc->mem_start) >> 19) & ED_WD_LAAR_ADDRHI);
:                 }
:                 /*
:                  * Enable 16bit access
:                  */
:                 ed_writeb(sc, sc->asic_addr + ED_WD_LAAR, sc->wd_laar_proto |
:                     ED_WD_LAAR_M16EN);

I think that you can replace the kvtop with a rman_get_start().  The
address that needs to be passed in this case is the BUS OFFSET where
the memory on the card lives.

: On the other hand, I could imagine that rman_get_start w/o the usage
: of kvtop() could be enough here.
: 
: Could anyone point me to the right direction please?

I think that the rman_get_start is the right thing to do.  That will
return you an offset into the bus space of the device for this
resource, which is what you want.  The device will then do things into 
this address space (also on the bus) so how it is mapped to the host
processor is irrelevant.

Warner


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-new-bus" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007222326.RAA14043>