From patchwork Wed Oct 3 14:55:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Porter X-Patchwork-Id: 1541961 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by patchwork1.kernel.org (Postfix) with ESMTP id 3E68D3FD9C for ; Wed, 3 Oct 2012 14:58:01 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id q93EuP1h001906; Wed, 3 Oct 2012 09:56:25 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q93EuOpc031035; Wed, 3 Oct 2012 09:56:25 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by dfle73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.1.323.3; Wed, 3 Oct 2012 09:56:24 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id q93EuOao025079; Wed, 3 Oct 2012 09:56:24 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id B5AC48062E; Wed, 3 Oct 2012 09:56:24 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id B9B718062A for ; Wed, 3 Oct 2012 09:55:17 -0500 (CDT) Received: from white.ext.ti.com (white.ext.ti.com [192.94.93.38]) by dflp52.itg.ti.com (8.13.7/8.13.8) with ESMTP id q93EtHnT005443 for ; Wed, 3 Oct 2012 09:55:17 -0500 (CDT) Received: from psmtp.com (na3sys009amx199.postini.com [74.125.149.235]) by white.ext.ti.com (8.13.7/8.13.7) with SMTP id q93EtGJe014518 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 3 Oct 2012 09:55:16 -0500 Received: from mail-ia0-f173.google.com ([209.85.210.173]) (using TLSv1) by na3sys009amx199.postini.com ([74.125.148.10]) with SMTP; Wed, 03 Oct 2012 14:55:16 GMT Received: by mail-ia0-f173.google.com with SMTP id m10so1079824iam.4 for ; Wed, 03 Oct 2012 07:55:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=uXzPE1yjiD6prTjBYv8Q7t4eHzYD65lYVghRW5tguWQ=; b=ArEdJEeCvGVDDPye3j+Vz1dADrmBeSakID/biWbGxNND2EwkSis2noFfp9G6rZfV59 f2o8E9mGKdW1PLALqAjcWGsIs074HnsucVFUP4VXv87hIqdXVeJ+/SZsWcNrczYLc7zF yl0Gyivm+bkgQ5ldrDvuVJjobH+0+GAqi3rXzSTX6tRlEaqNF16KrEzWaexJHvQ/rFoR EOWFYMtiStPZr8PPtc/tBpOk6ZT/MvKAch3Wu0AHAN2H54f+iJWxk3sZMRWXiuHGaCxQ LetFGs6QWuHa/T8NBoWZfh6qeCsFzNlEJlvknorcL/JYFrOgNQJXtKoVJqF5AfdZC4/o qZ4Q== Received: by 10.50.158.194 with SMTP id ww2mr12418606igb.40.1349276116172; Wed, 03 Oct 2012 07:55:16 -0700 (PDT) Received: from beef.ohporter.com (cpe-24-166-64-7.neo.res.rr.com. [24.166.64.7]) by mx.google.com with ESMTPS id mi10sm3462058igc.16.2012.10.03.07.55.14 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 03 Oct 2012 07:55:15 -0700 (PDT) From: Matt Porter To: Greg Kroah-Hartman , "Hans J. Koch" , Sekhar Nori Subject: [PATCH v3 4/6] ARM: davinci: add platform hook to fetch the SRAM pool Date: Wed, 3 Oct 2012 10:55:31 -0400 Message-ID: <1349276133-26408-5-git-send-email-mporter@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1349276133-26408-1-git-send-email-mporter@ti.com> References: <1349276133-26408-1-git-send-email-mporter@ti.com> X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:73.00787/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-dkim: 1 skipped:not-enabled X-pstn-settings: 2 (0.5000:0.0050) s cv GT3 gt2 gt1 r p m c X-pstn-addresses: from [82/3] CC: Linux DaVinci Kernel List , Russell King , Linux Kernel Mailing List , Linux ARM Kernel List X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com Adds sram_get_gen_pool() which allows platform code to get the SRAM gen_pool for purposes of providing it in platform data for driver genalloc use. Signed-off-by: Matt Porter --- arch/arm/mach-davinci/include/mach/sram.h | 3 +++ arch/arm/mach-davinci/sram.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/arch/arm/mach-davinci/include/mach/sram.h b/arch/arm/mach-davinci/include/mach/sram.h index 111f7cc..4e5db56 100644 --- a/arch/arm/mach-davinci/include/mach/sram.h +++ b/arch/arm/mach-davinci/include/mach/sram.h @@ -24,4 +24,7 @@ extern void *sram_alloc(size_t len, dma_addr_t *dma); extern void sram_free(void *addr, size_t len); +/* Get the struct gen_pool * for use in platform data */ +extern struct gen_pool *sram_get_gen_pool(void); + #endif /* __MACH_SRAM_H */ diff --git a/arch/arm/mach-davinci/sram.c b/arch/arm/mach-davinci/sram.c index 0e8ca4f..b47b64d 100644 --- a/arch/arm/mach-davinci/sram.c +++ b/arch/arm/mach-davinci/sram.c @@ -18,6 +18,11 @@ static struct gen_pool *sram_pool; +struct gen_pool *sram_get_gen_pool(void) +{ + return sram_pool; +} + void *sram_alloc(size_t len, dma_addr_t *dma) { unsigned long vaddr;