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/12/2004 19:33:13
Hello Kunz
=20
 For your previous mail suggesting for the bus_dma independent framework
for DMA to be used. I'm writing the DMA machine dependent code for
On-chip
DMA for SIO(serial interface) on tx4937 board. Need to have some tips as
to
how the implementation is done.

 NetBSD Kernel is been ported to the new board i.e Tx4937 (RBHMA4400).
 Give
some tips for the on-chip DMA implementation as to how to go about on
NetBSD
for MIPS(TX4937 i.e. RBHMA4400).

Looking forward for the reply

Regards
Viswa
          Thanks for replying, for the query..
=20
>> You have a chip with a build in DMA engine that does bus master DMA?
> > On what MIPS port?
>=20
> 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.
>=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
> 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.
>=20
> 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.
>=20
> How to go about writing the backend for on-chip DMA implementation for
> SIO on evbmips.
>=20
> thanking u
> Viswa
>=20
> > > 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
> --=20
> http://www.fastmail.fm - I mean, what is it about a decent email service?

--=20
http://www.fastmail.fm - Faster than the air-speed velocity of an
                          unladen european swallow