lkml.org 
[lkml]   [2011]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ARM: mmp: map sram as MT_MEMORY rather than MT_DEVICE
* Andres Salomon <dilinger@queued.net> [110822 18:40]:
> On Tue, 23 Aug 2011 01:07:55 +0100
> Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> [...]
> > > @@ -87,7 +88,8 @@ static int __devinit sram_probe(struct
> > > platform_device *pdev)
> > > info->sram_phys = (phys_addr_t)res->start;
> > > info->sram_size = resource_size(res);
> > > - info->sram_virt = ioremap(info->sram_phys,
> > > info->sram_size);
> > > + info->sram_virt = __arm_ioremap(info->sram_phys,
> > > info->sram_size,
> > > + MT_MEMORY);
> >
> > Not a good idea fiddling about under the covers like that. The reason
> > that MT_MEMORY is not in asm/io.h is to stop it being used like this -
> > MT_MEMORY etc are not meant for general purpose use.
> >
> > It needs to be looked at properly rather than working behind the APIs,
> > and making my life a misery by doing so, preventing me from making
> > changes where necessary by this kind of back-door use.
> >
> > I guess we need a new ioremap_xxx() variant to cope with this.
>
> Something like ioremap_exec()? I have no idea what the related MT_
> entry would be (as someone who's new to the ARM world, it's not
> entirely clear what the semantic distinctions are between the various
> MT_ entries).

Andres, care to ack this patch:

http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7126/1

Looks like that should do what you want. And after the related
SRAM/map_io fixes for omap, it really seems that we could have
a generic SRAM driver..

Regards,

Tony


\
 
 \ /
  Last update: 2011-10-07 21:07    [W:0.042 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site