From patchwork Fri Oct 5 17:04:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Porter X-Patchwork-Id: 1555331 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by patchwork1.kernel.org (Postfix) with ESMTP id 3B41F3FE80 for ; Fri, 5 Oct 2012 17:06:16 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id q95H4RK2028556; Fri, 5 Oct 2012 12:04:27 -0500 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q95H4RRm018644; Fri, 5 Oct 2012 12:04:27 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Fri, 5 Oct 2012 12:04:26 -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 q95H4RCv026109; Fri, 5 Oct 2012 12:04:27 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id A49B880626; Fri, 5 Oct 2012 12:04:26 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 6058280628 for ; Fri, 5 Oct 2012 12:04:24 -0500 (CDT) Received: from neches.ext.ti.com (neches.ext.ti.com [192.91.81.29]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id q95H4OrI013965 for ; Fri, 5 Oct 2012 12:04:24 -0500 (CDT) Received: from psmtp.com (na3sys009amx190.postini.com [74.125.149.171]) by neches.ext.ti.com (8.13.7/8.13.7) with SMTP id q95H4Ne0024752 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 5 Oct 2012 12:04:23 -0500 Received: from mail-ie0-f173.google.com ([209.85.223.173]) (using TLSv1) by na3sys009amx190.postini.com ([74.125.148.10]) with SMTP; Fri, 05 Oct 2012 10:04:23 PDT Received: by mail-ie0-f173.google.com with SMTP id 17so4141864iea.4 for ; Fri, 05 Oct 2012 10:04:23 -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=GHexHQJbTchQgG69GTt/y3tBOV6cdAXHvJdAosAonL4=; b=MlDPj5al/OHDlvvarovF/Uk2v5UaXd6EOo7O4g6DYydr7d5NrkeKbkOT7gugXau9IL po+XkuMvF5jUUNN/c67YcXe7pxgHa7RTeUuhpN2I1dGwJJ9p6+kiBSm8wXDMyHASUqDh iCyRJNUumvAVnGfqGGoUjksmFYt1I02zqf0aJW+gCRiR3t9rpk8BYV3V012eonAve4xH R1tl4oUB24VgJ0uHeHjuqRN425K4qAQ7ZkhDyM89LguQQcbkMq6h41tcBIzNUbnX1KU/ 9GI3Fv+6jYRXL11J79vnHiHULoNFVcU11fQw6V5ZfO3FJ2mwB/vL2InIwfIjyDiTbeUL 9D9Q== Received: by 10.50.214.65 with SMTP id ny1mr1819092igc.10.1349456662021; Fri, 05 Oct 2012 10:04:22 -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 u4sm1210118igw.6.2012.10.05.10.04.19 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Oct 2012 10:04:20 -0700 (PDT) From: Matt Porter To: Greg Kroah-Hartman , "Hans J. Koch" , Sekhar Nori Subject: [PATCH v4 4/7] ARM: davinci: add platform hook to fetch the SRAM pool Date: Fri, 5 Oct 2012 13:04:43 -0400 Message-ID: <1349456686-22736-5-git-send-email-mporter@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1349456686-22736-1-git-send-email-mporter@ti.com> References: <1349456686-22736-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 machine's SRAM gen_pool. The gen_pool may be passed 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 fa56374..c5f7ee5 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;