[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Battery powered ram
> -----Original Message-----
> From: Mikael Starvik [mailto:email@example.com]
> Sent: donderdag 5 december 2002 12:00
> To: 'Pieter Grimmerink'; dev-etrax
> Subject: RE: Battery powered ram
> ioremap() is your friend here.
> Something like this in a driver should do it:
> unsigned long* mem;
> mem = ioremap(MEM_CSR0_START, MAP_SIZE);
> where MAP_SIZE is the size of the area you want to map
Shouldn't I use request_mem_region() first to allocate the
Or is ioremap() enough to prevent the rest of the kernel
to use my memory?
I'm afraid ioremap does not actually allocate the memory
> You can then access mem with e.g. mem = 3
So we don't have to use writeb / readb functions for
But I guess that would only be necessary for memory regions
that cannot be directly mapped in processor address space.
Thanks and best regards,