Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Aug 2006 12:43:38 -0700
From:      John-Mark Gurney <gurney_j@resnet.uoregon.edu>
To:        Niki Denev <nike_d@cytexbg.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: linux ioremap equivalent on freebsd
Message-ID:  <20060807194337.GD99774@funkthat.com>
In-Reply-To: <200608072203.56320.nike_d@cytexbg.com>
References:  <44D3C333.3030702@cytexbg.com> <200608071628.15316.nike_d@cytexbg.com> <20060807183406.GB99774@funkthat.com> <200608072203.56320.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 22:03 +0300:
> On Monday 07 August 2006 21:34, John-Mark Gurney wrote:
> > 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/devicedriver
> >s.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...
> 
> I'm looking at this right now :) Looks very useful, thanks!
> 
> Just one more question to clear a little confusion on my side,
> the device that i'm trying to write/port driver for is a cardbus device.
> Do i have to do something specific about this, or can i get away with 
> accessing/using it as a plain PCI device? (yes, it appears as pci device to
>  the system, and is shown in pciconf)

The only thing special that I believe you have to do is provide an
additional DRIVER_MODULE line to attach to cardbus in addition to (or
instead of) pci...  For example:
DRIVER_MODULE(re, pci, re_driver, re_devclass, 0, 0);
DRIVER_MODULE(re, cardbus, re_driver, re_devclass, 0, 0);

Warner is the expert on cardbus, so, if you have any questions, you
could drop him an email....

Good luck!

-- 
  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?20060807194337.GD99774>