From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlef Vollmann Subject: Re: [RFC PATCH] Consolidate SRAM support Date: Fri, 15 Apr 2011 16:50:49 +0200 Message-ID: <4DA85B49.60209@vollmann.ch> References: <20110415130607.GM1611@n2100.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110415130607.GM1611@n2100.arm.linux.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Russell King - ARM Linux 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 List-Id: linux-omap@vger.kernel.org On 04/15/11 15:06, Russell King - ARM Linux wrote: > This is work in progress. Thanks, very useful. > This uses the physical address, and unlike Davinci's dma address usage, > it always wants to have the physical address, and will always return > the corresponding physical address when passed that pointer. Good. > OMAP could probably do with some more work to make the omapfb and other > allocations use the sram allocator, rather than hooking in before the > sram allocator is initialized - and then further cleanups so that we > have an initialization function which just does > > sram_create(phys, size) > virt = map sram(phys, size) > create sram pool(virt, phys, size, min_alloc_order) I'd love to have the mapping inside the create pool, but that might not be possible in general. > Another question is whether we should allow multiple SRAM pools or not - > this code does allow multiple pools, but so far we only have one pool > per SoC. Overdesign? Maybe, but it prevents SoCs wanting to duplicate > it if they want to partition the SRAM, or have peripheral-local SRAMs. Having the option to partition the SRAM is probably useful. What I'm missing is sram_pool_add: on AT91SAM9G20 you have two banks of SRAM, and you might want to combine them into a single pool. > arch/arm/common/sram-pool.c | 69 +++++++++++++++++++++++++++ > arch/arm/include/asm/sram-pool.h | 20 ++++++++ Waht is ARM specific about this code? Why not put it into lib/ and include/linux, respectively? Detlef