Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Aug 2006 11:34:06 -0700
From:      John-Mark Gurney <gurney_j@resnet.uoregon.edu>
To:        Niki Denev <nike_d@cytexbg.com>
Cc:        freebsd-hackers@freebsd.org, Suleiman Souhlal <ssouhlal@freebsd.org>
Subject:   Re: linux ioremap equivalent on freebsd
Message-ID:  <20060807183406.GB99774@funkthat.com>
In-Reply-To: <200608071628.15316.nike_d@cytexbg.com>
References:  <44D3C333.3030702@cytexbg.com> <44D735E5.4030809@FreeBSD.org> <200608071628.15316.nike_d@cytexbg.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Niki Denev wrote this message on Mon, Aug 07, 2006 at 16:28 +0300:
> On Monday 07 August 2006 15:45, Suleiman Souhlal wrote:
> > Niki Denev wrote:
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > Hi,
> > >
> > > I'm in the middle of a struggle to port the linux
> > > nozomi(Option GloberTrotter 3G+ HSDPA cardbus adapter) driver to freebsd.
> > > And given the fact that i have very little previous kernel coding
> > > experience i can't find what i can use in freebsd as equivalent of
> > > linux's ioremap().
> > >
> > > Any ideas are appreciated. Thanks!
> >
> > I think the equivalent of linux's ioremap() in FreeBSD is pmap_mapdev().
> >
> > -- Suleiman
> 
> Thanks! 
> 
> Is there a reason that there is no manual page about pmap_mapdev, and it's not 
> mentioned in the other pmap_* man pages?

Because for the most part it is only suppose to be used by MD code...

The correct way to get device's memory is to use bus_alloc_resource_any...
Make sure you review the handbook on device driver writing:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/devicedrivers.html

I did a presentation at BSDcan on writing devices drivers:
http://people.freebsd.org/~jmg/drivers/

The handout is a cheat sheet of useful functions for writing a device
driver...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



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