Date: Wed, 15 Jan 2003 23:15:39 +0000 From: Josef Karthauser <joe@FreeBSD.org> To: Thomas Moestl <tmoestl@gmx.net> Cc: Maxime Henrion <mux@FreeBSD.org>, current@FreeBSD.org Subject: Re: Bus DMA for USB - compilation problems. Message-ID: <20030115231539.GB14326@genius.tao.org.uk> In-Reply-To: <20030115215804.GA286@crow.dom2ip.de> References: <20030115195607.GA13076@genius.tao.org.uk> <20030115200519.GH16775@elvis.mu.org> <20030115202033.GA13368@genius.tao.org.uk> <20030115215804.GA286@crow.dom2ip.de>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Wed, Jan 15, 2003 at 10:58:04PM +0100, Thomas Moestl wrote:
>
> DMAADDR is:
>
> #define DMAADDR(dma, o) ((dma)->block->map->dm_segs[0].ds_addr + (dma)->offs + (o))
>
> struct usb_dma_block starts like:
>
> typedef struct usb_dma_block {
> bus_dma_tag_t tag;
> bus_dmamap_t map;
>
> However, bus_dmamap_t (like bus_dma_tag_t) is supposed to be opaque to
> users of the busdma interface on FreeBSD. Our implementations enforce
> this by defining it as:
>
> typedef struct bus_dmamap *bus_dmamap_t;
>
> , and by not exporting struct bus_dmamap in public headers.
>
> The DMA addresses are obtained by writing an appropriate callback
> routine to process them and passing it to bus_dmamap_load().
> The usb_mem.c will need some other changes to work on FreeBSD, since
> our busdma code has diverged from NetBSD's quite a bit.
>
Is ours documented anywhere, or is converting usb_mem.c to our style
something that you could help me with?
Joe
--
Josef Karthauser (joe@tao.org.uk) http://www.josef-k.net/
FreeBSD (cvs meister, admin and hacker) http://www.uk.FreeBSD.org/
Physics Particle Theory (student) http://www.pact.cpes.sussex.ac.uk/
================ An eclectic mix of fact and theory. =================
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)
iEYEARECAAYFAj4l65sACgkQXVIcjOaxUBZJHwCeJxb0Niy7hbqyXv7ndf6DAWuQ
k4sAoIXyI+h55DzGoNMpv6KF7SnsfkAs
=p3e7
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030115231539.GB14326>
