From patchwork Tue Feb 18 13:38:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 3670561 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8C43BBF40C for ; Tue, 18 Feb 2014 13:43:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AC82C201DE for ; Tue, 18 Feb 2014 13:43:08 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BD06520176 for ; Tue, 18 Feb 2014 13:43:07 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WFkwa-00043i-B4; Tue, 18 Feb 2014 13:42:40 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WFkwM-0003nb-LT; Tue, 18 Feb 2014 13:42:26 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WFkwJ-0003mv-Qn for linux-arm-kernel@lists.infradead.org; Tue, 18 Feb 2014 13:42:24 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N17003OS221RE30@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 18 Feb 2014 22:42:02 +0900 (KST) X-AuditID: cbfee61a-b7fb26d00000724f-2d-530363290fda Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 60.D5.29263.92363035; Tue, 18 Feb 2014 22:42:01 +0900 (KST) Received: from amdc1339.mshome.net ([106.116.147.30]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N17001N61VOJ880@mmp1.samsung.com>; Tue, 18 Feb 2014 22:42:01 +0900 (KST) From: Marek Szyprowski To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linaro-mm-sig@lists.linaro.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH v3 5/6] ARM: init: add support for reserved memory defined by device tree Date: Tue, 18 Feb 2014 14:38:00 +0100 Message-id: <1392730681-14695-6-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1392730681-14695-1-git-send-email-m.szyprowski@samsung.com> References: <1392730681-14695-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWRW0iTYQCG+/7T/o0GP8vqb4HFwgtFTdPgoySlpL5uIpNu1Kilf7p0OjZP y4vGcB5GOtELJXRtOTHNaa3EOSrcGmmGnWZaHrNFoc4DKF20KblJd8/L+8B78dK4yESIaVlh MacslBZIKAHxbtvLxERm4+lxjpFEuNX4hgfXtTocPnC/J6HBZybhUMAOoK+uhoCDvasAjml9 PDhQ28KDm+MLGLR5J0horrIQ0ONopaDVPcuDTxadGOyY/IRB03AlCQPN4XB0coOCDc1WAupe unlwa8BGwCVnFQH7WpYJ2O0IgJRDqMfYA5D/byNAy00NAHnq6zA0eH+Wh+75Kklk666l0MzE Cwo9s9xF09teHI2PaEnUG1jCkGErDtU/7wZowxaOnrZdvcxkCJJyuAJZKac8fuaGIO/b5jSl GOaX60drMA1Y5ekBn2aZRHb2VRu+ywfYj3N9lB4IaBHzELA6Yx+5G3QYuzK/SgUtioln9Sv6 EIcxZsBuGImghDPNFNvevxYq9jGZrHXRGGKCiWDbF+wgyEIGsWv+3ztz9M7cUba1MSmIfOYi uzkZHTREO0b/vBdvAEIT2NMN9nOKbIXqZq48PlYllatKCnNjs4vkNhD67ZfYDro00AUYGkj2 CtePYekiUlqqUstdgKVxSZgwMgNPFwlzpOo7nLLourKkgFO5wGGakBwUDulOp4mYXGkxl89x Ck75v8VovlgDsrKijkSfmpqzXGjrEPEzIyRwWCCTnXydqPqZWu2q9c05Uz5Mfa3R+Mk0Q68X vL2kLa82DXZ99khWHv/hn8toik64dtsSuGXw26VlyannuZhAwmjXWPG6A335/kPdOT/lcc40 Aau6Io8L78y3C1xDyWUnKq64xY/OJsXFmCWEKk8aH4UrVdJ/jZifDLMCAAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140218_084224_074099_C100360C X-CRM114-Status: GOOD ( 11.10 ) X-Spam-Score: -4.6 (----) Cc: Mark Rutland , Laura Abbott , Pawel Moll , Arnd Bergmann , Stephen Warren , Josh Cartwright , Benjamin Herrenschmidt , Tomasz Figa , Tomasz Figa , Michal Nazarewicz , Olof Johansson , Kyungmin Park , Rob Herring , Kumar Gala , Grant Likely , Ian Campbell , Nishanth Peethambaran , Sascha Hauer , Marc , Marek Szyprowski X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Enable reserved memory initialization from device tree. Signed-off-by: Marek Szyprowski --- arch/arm/Kconfig | 1 + arch/arm/mm/init.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e25419817791..d0262bea8020 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1918,6 +1918,7 @@ config USE_OF select IRQ_DOMAIN select OF select OF_EARLY_FLATTREE + select OF_RESERVED_MEM help Include support for flattened device tree machine descriptions. diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 804d61566a53..ebafdb479410 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -323,6 +324,8 @@ void __init arm_memblock_init(struct meminfo *mi, if (mdesc->reserve) mdesc->reserve(); + early_init_dt_scan_reserved_mem(); + /* * reserve memory for DMA contigouos allocations, * must come from DMA area inside low memory