linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Misbah khan" <misbah_khan@engineer.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: Ioremap related concern ...
Date: Wed, 17 Sep 2008 23:12:54 -0700	[thread overview]
Message-ID: <fa686aa40809172312r6f527e1ahbae83b17f8062c62@mail.gmail.com> (raw)
In-Reply-To: <19545826.post@talk.nabble.com>

On Wed, Sep 17, 2008 at 9:43 PM, Misbah khan <misbah_khan@engineer.com> wrote:
>
> Hi all,
>
> i am facing a problem regarding the usage of ioremap function which is
> described as:-
>
> 1) I am remaping the SDRAM memory into three continews buffer as
>        ptr1 = (unsigned int *)ioremap(0x0001000,0x1000);
>        ptr2 = (unsigned int *)ioremap(0x0002000,0x1000);
>        ptr3 = (unsigned int *)ioremap(0x0003000,0x1000);

Ah, this doesn't work.  You can't just choose a region of ram and
ioremap it.  Besides, the base of RAM is already used by the interrupt
vectors.

If you need to allocate a region for DMA buffers, then take a look at
dma_alloc_coherent().  If you just need to allocate some buffers, then
just use kzalloc().

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

      reply	other threads:[~2008-09-18  6:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-18  4:43 Ioremap related concern Misbah khan
2008-09-18  6:12 ` Grant Likely [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=fa686aa40809172312r6f527e1ahbae83b17f8062c62@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=misbah_khan@engineer.com \
    /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).