linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Nguyen Dinh-R00091 <R00091@freescale.com>
Cc: Kevin Hilman <khilman@ti.com>,
	"davinci-linux-open-source@linux.davincidsp.com"
	<davinci-linux-open-source@linux.davincidsp.com>,
	Tony Lindgren <tony@atomide.com>, Sekhar Nori <nsekhar@ti.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH] Consolidate SRAM support
Date: Fri, 15 Apr 2011 20:40:21 +0100	[thread overview]
Message-ID: <20110415194021.GJ4423@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <56132A77AB93C141BF06E6B96CA6CFEA1F8D18@039-SN1MPN1-004.039d.mgd.msft.net>

On Fri, Apr 15, 2011 at 07:20:12PM +0000, Nguyen Dinh-R00091 wrote:
> 
> >-----Original Message-----
> >From: Russell King - ARM Linux [mailto:linux@arm.linux.org.uk]
> >Sent: Friday, April 15, 2011 11:59 AM
> >To: Nguyen Dinh-R00091
> >Cc: Kevin Hilman; davinci-linux-open-source@linux.davincidsp.com; Tony Lindgren; Sekhar Nori; linux-
> >omap@vger.kernel.org; linux-arm-kernel@lists.infradead.org
> >Subject: Re: [RFC PATCH] Consolidate SRAM support
> >
> >On Fri, Apr 15, 2011 at 05:20:45PM +0100, Russell King - ARM Linux wrote:
> >> On Fri, Apr 15, 2011 at 04:18:23PM +0000, Nguyen Dinh-R00091 wrote:
> >> > >Hmm, that's nice - except for one issue.  According to my grep of
> >> > >arch/arm/ and drivers/, nothing uses iram_alloc().  So, does anything in
> >> > >the MX stuff use iram_alloc.c, or is it dead code left over from a
> >> > >previous experiment?
> >> >
> >> > This function will be used for suspend code in the mx5x series. I just
> >> > got done submitting a series of patches to Sascha for a simple suspend
> >> > that does not need running code out of IRAM yet. The next set of suspend
> >> > patches will be using these iram functions.
> >>
> >> Okay, so does iram_alloc() need to return a dma_addr_t or a phys_addr_t ?
> >> Are you dealing with physical addresses for it or DMA addresses?
> >
> >And another question: why does iram_alloc() return a void __iomem * for
> >the virtual address, and the physical address via a pointer argument.
> >However, iram_free() take an unsigned long for the address.
> 
> Yes, should just be a void *iram_alloc().

Thanks.  As you didn't comment against the change below, I'm going to
assume that you're happy with it.  It means that the usage changes from:

	unsigned long dma;
	void __iomem *addr = iram_alloc(SZ_4K, &dma);
	...
	iram_free(dma, SZ_4K);

to:

	phys_addr_t phys;
	void *addr = iram_alloc(SZ_4K, &phys);
	...
	iram_free(addr, SZ_4K);

> >It seems rather inconsistent that the parameter for free is returned via
> >a pointer argument.
> >
> >If I convert this to sram-pool, can we change this to:
> >
> >static inline void *iram_alloc(size_t size, phys_addr_t *phys_addr)
> >{
> >	return sram_pool_alloc(iram_pool, size, phys_addr);
> >}
> >
> >static void iram_free(void *addr, size_t size)
> >{
> >	sram_pool_free(iram_pool, addr, size);
> >}
> >
> >and:
> >
> >int __init iram_init(unsigned long base, unsigned long size)
> >
> >becomes:
> >
> >int __init iram_init(phys_addr_t base, size_t size)
> >
> >?
> 
> 

  reply	other threads:[~2011-04-15 19:40 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-15 13:06 [RFC PATCH] Consolidate SRAM support Russell King - ARM Linux
2011-04-15 13:39 ` Rob Herring
2011-04-15 14:02   ` Ithamar R. Adema
2011-04-15 14:40   ` Arnd Bergmann
2011-04-15 15:26     ` Russell King - ARM Linux
2011-04-15 15:32       ` Grant Likely
2011-04-15 15:41         ` Russell King - ARM Linux
2011-04-16  4:11           ` Magnus Damm
2011-04-17 17:47           ` Arnd Bergmann
2011-04-15 16:03   ` Russell King - ARM Linux
2011-04-15 16:18     ` Nguyen Dinh-R00091
2011-04-15 16:20       ` Russell King - ARM Linux
2011-04-15 16:58         ` Russell King - ARM Linux
2011-04-15 19:20           ` Nguyen Dinh-R00091
2011-04-15 19:40             ` Russell King - ARM Linux [this message]
2011-04-15 20:06               ` Nguyen Dinh-R00091
2011-04-15 13:52 ` Eduardo Valentin
2011-04-15 15:24   ` Russell King - ARM Linux
2011-04-15 14:50 ` Detlef Vollmann
2011-04-15 15:37   ` Russell King - ARM Linux
2011-04-15 18:12     ` Detlef Vollmann
2011-04-15 18:21       ` Russell King - ARM Linux
2011-04-15 16:04   ` Nicolas Ferre
2011-04-15 18:14     ` Detlef Vollmann
2011-04-16 11:27       ` Detlef Vollmann
2011-04-15 18:31 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-15 20:11 ` Uwe Kleine-König
2011-04-15 20:19   ` Russell King - ARM Linux
2011-04-15 20:22     ` Uwe Kleine-König
2011-04-16 13:01 ` Haojian Zhuang
2011-04-16 13:09   ` Russell King - ARM Linux
2011-04-18  6:48     ` Tony Lindgren
2011-04-18  7:00       ` Tomi Valkeinen
2011-04-18  8:17         ` Tony Lindgren
2011-04-19 14:16           ` Tomi Valkeinen
2011-04-20  5:27             ` Tony Lindgren
2011-04-18  8:52 ` [RFC PATCH v2] " Russell King - ARM Linux
2011-04-18  9:31   ` Haojian Zhuang
2011-04-18 11:33   ` Tony Lindgren
2011-04-18 13:50   ` Detlef Vollmann
2011-04-18 16:12   ` Nori, Sekhar
2011-04-18 16:18     ` Russell King - ARM Linux
2011-04-19 16:01   ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-19 16:18     ` Russell King - ARM Linux
2011-04-19 19:05       ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-19 23:20         ` Russell King - ARM Linux
2011-04-20  4:06           ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-19  1:23 ` [RFC PATCH] " Linus Walleij
2011-05-12 17:45 ` [RFC PATCH v3] " Russell King - ARM Linux
2011-05-12 18:35   ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-13  7:30   ` Jean Pihet
2011-05-13  9:11     ` Russell King - ARM Linux
2011-05-13  9:25       ` Jean Pihet
2011-05-13  9:19   ` Santosh Shilimkar
2011-05-17 13:06   ` Nori, Sekhar
2011-05-26  1:02   ` [RFC PATCH v4] " Jean-Christophe PLAGNIOL-VILLARD
     [not found]     ` <1306371777-20431-1-git-send-email-plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>
2011-05-31 17:09       ` Nori, Sekhar
2011-05-31 21:21         ` Russell King - ARM Linux
2011-06-29 13:12     ` Nori, Sekhar
2011-07-08 16:51     ` Nori, Sekhar
2011-07-08 16:58       ` Nori, Sekhar

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=20110415194021.GJ4423@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=R00091@freescale.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=khilman@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=tony@atomide.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).