Subject: Re: Need to know about implementation of DMA on MIPS
To: Jochen Kunz <jkunz@unixag-kl.fh-kl.de>
From: Viswanath <viswamys@fastmail.fm>
List: tech-kern
Date: 01/07/2004 19:30:39
Hello Kunz

         Thanks for replying, for the query..

> You have a chip with a build in DMA engine that does bus master DMA?
> On what MIPS port?

I'm writing DMA support for on-chip DMA for SIO(serial Interface) on
evbmips.
It is an official NetBSD port it has bus_dma, gone through
bus_dmamap_create,=20
gone through all the bus_dmamap_load, bus_dmamap_unload etc..
functionalities.

> Or do you mean you created your own, custom NetBSD port and you need to
> programm the machine dependent bus_dma(9) backend?

Yes i'm creating my own custom NetBSD port and i need to create=20
my own machine dependent bus_dma(9) backend.. using bus_dma_load and
bus_dma_unload
functionalities.

As far as my knowledge the bus_dma_create, bus_dma_load, bus_dma_unload,
bus_dma_sync
are all machine independent codes is it correct.

How to go about writing the backend for on-chip DMA implementation for
SIO on evbmips.

thanking u
Viswa

> > I wanted to write DMA device driver on NetBSD 1.6 for MIPS.
> > Need to know the implementation for on-chip DMA controller.
> > How to go about and some information about to start. Is there
> > any DMA driver for any other port containing on-chip DMA controller
> > for reference.
> You have a chip with a build in DMA engine that does bus master DMA?
> On what MIPS port? If it is an official NetBSD port it has bus_dma(9).
> Then you need to allocate a DMA map via bus_dmamap_create(9) e.g. at
> device attachment. Once you have data to transfer you need to load that
> map via bus_dmamap_load(9). Then you have to programm the DMA addresses
> (dma_map->dm_segs[0].ds_addr etc.) in that map into your chip, call
> bus_dmamap_sync(9) to flush the caches and do whatever the hardware
> needs to initiate the DMA transfer. Once the DMA is done you have to
> call bus_dmamap_sync(9) again to invalidate the caches and
> bus_dmamap_unload(9) to clean up.
>=20
> Or do you mean you created your own, custom NetBSD port and you need to
> programm the machine dependent bus_dma(9) backend?
> --=20
>=20
>=20
> tsch=FC=DF,
>        Jochen
>=20
> Homepage: http://www.unixag-kl.fh-kl.de/~jkunz/
>=20

--=20
http://www.fastmail.fm - I mean, what is it about a decent email service?