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 ([EMAIL PROTECTED]) 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. =================
msg50334/pgp00000.pgp
Description: PGP signature
