From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by ozlabs.org (Postfix) with ESMTP id 28C88DDE2A for ; Tue, 17 Jul 2007 15:59:05 +1000 (EST) Received: by ug-out-1314.google.com with SMTP id k40so92900ugc for ; Mon, 16 Jul 2007 22:59:04 -0700 (PDT) Message-ID: Date: Tue, 17 Jul 2007 11:29:04 +0530 From: "suresh suresh" To: "Scott Wood" Subject: Re: Linuxppc-embedded Digest, Vol 35, Issue 33 In-Reply-To: <469B9825.6070507@freescale.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_47579_26217569.1184651944374" References: <469B9825.6070507@freescale.com> Cc: linuxppc-embedded@ozlabs.org, Siva Prasad List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , ------=_Part_47579_26217569.1184651944374 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks.... MPC8280 has internal memory space which contains Dualport(Dp) RAM. In the DpRAM we allocate some tables and these has to store pointer of the buffers which are allocated in external memory. Core will use this pointer to access the buffers, basically these buffers are used for DMA. Using IMMR register we can get physical address of the internal memory. Now can I store the address return by the kmalloc() function? or I should convert it into physical? Please help me how to resove this address translation. Regards, Suresh On 7/16/07, Scott Wood wrote: > > Siva Prasad wrote: > > It returns kernel virtual address. If you use this buffer space for DMA, > > please use appropriate flags. You may use __pa(address) or > > virt_to_phys() to convert virtual to physical. > > No, you may not -- physical and DMA addresses are not always identical. > Use the DMA mapping API. > > -Scott > > ------=_Part_47579_26217569.1184651944374 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks....

MPC8280 has internal memory space which contains Dualport(Dp) RAM. In the DpRAM we allocate some tables and these has to store pointer of the buffers which are allocated in external memory. Core will use this pointer to access the buffers, basically these buffers are used for DMA.

Using IMMR register we can get physical address of the internal memory. Now can I store the address return by the kmalloc() function? or I should convert it into physical?

Please help me how to resove this address translation.


Regards,
Suresh

On 7/16/07, Scott Wood <scottwood@freescale.com> wrote:
Siva Prasad wrote:
> It returns kernel virtual address. If you use this buffer space for DMA,
> please use appropriate flags. You may use __pa(address) or
> virt_to_phys() to convert virtual to physical.

No, you may not -- physical and DMA addresses are not always identical.
  Use the DMA mapping API.

-Scott


------=_Part_47579_26217569.1184651944374--