Ioremap related concern ...
Grant Likely
grant.likely at secretlab.ca
Thu Sep 18 16:12:54 EST 2008
On Wed, Sep 17, 2008 at 9:43 PM, Misbah khan <misbah_khan at 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.
More information about the Linuxppc-embedded
mailing list