From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: mmp: map sram as MT_MEMORY rather than MT_DEVICE
Date: Fri, 7 Oct 2011 12:05:12 -0700 [thread overview]
Message-ID: <20111007190512.GL6324@atomide.com> (raw)
In-Reply-To: <20110822191335.3dbe99b9@debxo>
* 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
WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: Andres Salomon <dilinger@queued.net>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
Leo Yan <leoy@marvell.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Nicolas Pitre <nicolas.pitre@linaro.org>,
Haojian Zhuang <hzhuang1@marvell.com>,
Jon Nettleton <jon.nettleton@gmail.com>,
Eric Miao <eric.y.miao@gmail.com>
Subject: Re: [PATCH] ARM: mmp: map sram as MT_MEMORY rather than MT_DEVICE
Date: Fri, 7 Oct 2011 12:05:12 -0700 [thread overview]
Message-ID: <20111007190512.GL6324@atomide.com> (raw)
In-Reply-To: <20110822191335.3dbe99b9@debxo>
* 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
next prev parent reply other threads:[~2011-10-07 19:05 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-15 3:09 [PATCH V4 0/3] ARM: mmp: add audio sram support Leo Yan
2011-08-15 3:09 ` Leo Yan
2011-08-15 3:09 ` [PATCH 1/3] ARM: mmp: add sram allocator Leo Yan
2011-08-15 3:09 ` Leo Yan
2011-08-15 8:59 ` Arnd Bergmann
2011-08-15 8:59 ` Arnd Bergmann
2011-08-15 9:09 ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-15 9:09 ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-15 9:30 ` Haojian Zhuang
2011-08-15 9:30 ` Haojian Zhuang
2011-10-07 19:06 ` Tony Lindgren
2011-10-07 19:06 ` Tony Lindgren
2011-08-15 9:26 ` Leo Yan
2011-08-15 9:26 ` Leo Yan
2011-08-15 13:23 ` Nicolas Pitre
2011-08-15 13:23 ` Nicolas Pitre
2011-08-15 13:32 ` Russell King - ARM Linux
2011-08-15 13:32 ` Russell King - ARM Linux
2011-08-15 9:11 ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-15 9:11 ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-22 23:47 ` [PATCH] ARM: mmp: map sram as MT_MEMORY rather than MT_DEVICE Andres Salomon
2011-08-22 23:47 ` Andres Salomon
2011-08-23 0:07 ` Eric Miao
2011-08-23 0:07 ` Eric Miao
2011-08-23 2:08 ` Andres Salomon
2011-08-23 2:08 ` Andres Salomon
2011-08-23 7:48 ` Leo Yan
2011-08-23 7:48 ` Leo Yan
2011-08-23 8:22 ` Haojian Zhuang
2011-08-23 8:22 ` Haojian Zhuang
2011-08-23 0:07 ` Russell King - ARM Linux
2011-08-23 0:07 ` Russell King - ARM Linux
2011-08-23 2:13 ` Andres Salomon
2011-08-23 2:13 ` Andres Salomon
2011-10-07 19:05 ` Tony Lindgren [this message]
2011-10-07 19:05 ` Tony Lindgren
2011-08-15 3:09 ` [PATCH 2/3] ARM: mmp: register audio sram bank Leo Yan
2011-08-15 3:09 ` Leo Yan
2011-08-15 3:09 ` [PATCH 3/3] ARM: mmp: register internal " Leo Yan
2011-08-15 3:09 ` Leo Yan
2011-08-15 3:11 ` [PATCH V4 0/3] ARM: mmp: add audio sram support Haojian Zhuang
2011-08-15 3:11 ` Haojian Zhuang
2011-08-15 8:43 ` Eric Miao
2011-08-15 8:43 ` Eric Miao
2011-08-15 9:12 ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-15 9:12 ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-15 9:35 ` Eric Miao
2011-08-15 9:35 ` Eric Miao
2011-08-15 10:25 ` Leo Yan
2011-08-15 10:25 ` Leo Yan
2011-08-17 12:32 ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-17 12:32 ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-19 8:25 ` Haojian Zhuang
2011-08-19 8:25 ` Haojian Zhuang
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=20111007190512.GL6324@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.