linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "bhanu jampala" <adams.ppc@gmail.com>
To: linuxppc-embedded@ozlabs.org
Subject: Re: dma_to_virt() on PPC?
Date: Tue, 16 Sep 2008 16:40:50 -0600	[thread overview]
Message-ID: <4a21eaea0809161540xa2135d5j2f22cfac2e012dc8@mail.gmail.com> (raw)
In-Reply-To: <4a21eaea0809161437y2d3ba52et3803831828a62e4d@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1120 bytes --]

Hi guys,

I have tried these calls to covert part of my DMA address to Virtual and it
seems to work fine.
I am curious to know more about these calls.

dma_map_single(NULL, dev->buf_addr, tx_cnt, DMA_TO_DEVICE));
dma_map_single(NULL, dev->buf_addr, tx_cnt, DMA_FROM_DEVICE));

The reason I am suspect these calls is:

I allocated a single DMA memory of 4K bytes size.
No I want to split and distribute the so allocated buffer between each
device.
in that case of my starting address is ADDR. the address I submit to the
device would be something like

ADDR + 32* device_num.

But, I realize that it is not actually returning the Virtual address.

Regards,
Adams



On Tue, Sep 16, 2008 at 3:37 PM, bhanu jampala <adams.ppc@gmail.com> wrote:

> Hi All,
>
> How do I convert a DMA buffer to virtual address on Linux PPC?
>
> I know there is some thing like dma_to_virt(), but I don't think if there
> is one for PPC.
> In this scenario where I have submitted some dma buffer form a chunk of
> memory to Device.
> Now at the end of successful receive, how do I convert it back to Virtual
> address?
> Any pointers?
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 1510 bytes --]

      reply	other threads:[~2008-09-16 22:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-16 21:37 dma_to_virt() on PPC? bhanu jampala
2008-09-16 22:40 ` bhanu jampala [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4a21eaea0809161540xa2135d5j2f22cfac2e012dc8@mail.gmail.com \
    --to=adams.ppc@gmail.com \
    --cc=linuxppc-embedded@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).