On Thu, Nov 15, 2012 at 8:25 AM, Philipp Zabel <span dir="ltr"><<a href="mailto:p.zabel@pengutronix.de" target="_blank">p.zabel@pengutronix.de</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Paul,<br>
<br>
Am Freitag, den 26.10.2012, 15:46 -0400 schrieb Paul Gortmaker:<br>
<div class="im">> On Thu, Oct 18, 2012 at 10:27 AM, Philipp Zabel <<a href="mailto:p.zabel@pengutronix.de">p.zabel@pengutronix.de</a>> wrote:<br>
> > This patch keeps all created pools in a global list and adds two<br>
> > functions that allow to retrieve the gen_pool pointer from a known<br>
> > physical address and from a device tree node.<br>
><br>
> So, I'm not seeing any added users of the of_get_named_gen_pool,<br>
> or the other exported "reverse-lookup" function.  Without that, the<br>
> anticipated use case is not clear to me.<br>
<br>
</div>My use case is the coda video codec driver, for a video codec IP core<br>
that is integrated in various SoCs. It can use on-SoC SRAM as temporary </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">memory.<br></blockquote><div><br>

Thanks Philipp,<br></div><div><br>So perhaps it makes sense to somehow tie this patch to the user<br>patch, since from what I recall reading in the past, the infrastructure<br>additions that are immediately used are far more favourably rec'd<br>

than those that are weakly bound to a hand-wavey possibly vapour<br>ware like use case that may or may not materialize going forward.<br><br>Paul.<br>--<br><br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<br>
Other possible use cases are the TI Davinci sound driver.<br>
Or the PXA frame buffer driver could allocate a frame buffer in SRAM for<br>
low-resolution devices.<br>
<div class="im"><br>
> Is there an example of some pending driver or similar, that has<br>
> a phys addr from an unknown source and needs to know what<br>
> pool it may or may not be in?  With the use case, someone might<br>
> be able to suggest alternative ways to get what you want done.<br>
<br>
</div>drivers/media/platform/coda.c right now uses imx specific<br>
iram_alloc/free wrappers around gen_pool_alloc/free.<br>
I'd like to use of_get_named_gen_pool to obtain the struct gen_pool<br>
pointer and use gen_pool_alloc/free directly, instead.<br>
<br>
sound/soc/davinci/davinci-pcm.c right now uses davinci specific<br>
sram_alloc/free wrappers around gen_pool_alloc/free.<br>
<br>
drivers/dma/mmp_tdma.c and sound/soc/pxa/mmp-pcm.c already use<br>
gen_pool_alloc/free directly, but they use a arch-mmp specific<br>
sram_get_gpool function to obtain the struct gen_pool pointer.<br>
<div class="im"><br>
> It might also be worth cross compiling this for powerpc, since the<br>
> header files you implicitly get included varies from one arch to<br>
> the next, and there might be some compile fails lurking there.<br>
<br>
</div>Thanks, I'll do that.<br>
<br>
regards<br>
<span class="HOEnZb"><font color="#888888">Philipp<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
--<br>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in<br>
the body of a message to <a href="mailto:majordomo@vger.kernel.org">majordomo@vger.kernel.org</a><br>
More majordomo info at  <a href="http://vger.kernel.org/majordomo-info.html" target="_blank">http://vger.kernel.org/majordomo-info.html</a><br>
Please read the FAQ at  <a href="http://www.tux.org/lkml/" target="_blank">http://www.tux.org/lkml/</a><br>
</div></div></blockquote></div><br>