What kind of Linux address must I use to set the SAR reg. of the DMA ctrl ?
Matt Porter
mporter at kernel.crashing.org
Wed May 7 17:50:14 EST 2003
On Wed, May 07, 2003 at 02:52:06AM -0400, Callebaut Benoit wrote:
>
> Hello,
> I am writing the code to start a DMA transfer with the built-in DMA controller
> of the MPC8245. The purpose is to do Memory to PCI transfers. The PCI part
> seems to be OK ( memory of the device is written) the the source address seems
> to be wrong since I read 0XFFFFFFFF as data in the device. I tried with bus
> and physical address (using virt_to_bus & virt_to_phys functions) but this
> doesn't give good results.
> So I ask myself which kind of linux address must I use to configure the SAR
> register of the Dual channel DMA controller ?
Well, there's no special "linux address". The DMA controller takes
a physical address. I think you are specifically asking about
configuring the source address register when doing a Mem->PCI
transfer. In that case, if you are using lowmem system memory as
the source address, then virt_to_phys will generate the correct
physical system memory address.
Regards,
--
Matt Porter
mporter at kernel.crashing.org
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-embedded
mailing list