From patchwork Thu Feb 20 10:52:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 3686041 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D71539F1EE for ; Thu, 20 Feb 2014 11:00:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EEE872012E for ; Thu, 20 Feb 2014 11:00:27 +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 A5F1F2012B for ; Thu, 20 Feb 2014 11:00:26 +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 1WGRHv-0004uv-TO; Thu, 20 Feb 2014 10:55:32 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WGRHL-00015d-TX; Thu, 20 Feb 2014 10:54:55 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WGRG1-0000ru-Ek for linux-arm-kernel@lists.infradead.org; Thu, 20 Feb 2014 10:53:34 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N1A0057UJK8MH00@mailout2.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 20 Feb 2014 10:52:56 +0000 (GMT) X-AuditID: cbfec7f4-b7f796d000005a13-5a-5305de8ca8e0 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 21.5C.23059.C8ED5035; Thu, 20 Feb 2014 10:53:00 +0000 (GMT) Received: from amdc1339.mshome.net ([106.116.147.30]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0N1A005WSJK1HXB0@eusync2.samsung.com>; Thu, 20 Feb 2014 10:53:00 +0000 (GMT) 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 v4 5/7] arm: add support for reserved memory defined by device tree Date: Thu, 20 Feb 2014 11:52:45 +0100 Message-id: <1392893567-31623-6-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1392893567-31623-1-git-send-email-m.szyprowski@samsung.com> References: <1392893567-31623-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAyWRa0iTYRiGe7+zw9HnPPRhYjIQRfAEBm8mZRT49kMyxIgoatOh0qayL0VD 0kxNl6e0pYiZog4Z87Qk3SinY+nUMk1TzNREQqZLKwXD1HL673ru54L7x83goirCk0lOuSdT pkjkYkpAjO4PTQWWLJCxIV/6/eFe5SANf+YV4HBDUwLgS8sYCcvtjSTs3+0F0F5aREBD+zqA H/LsNOwprqHh1tQSBvXL0yRsLGwm4KSxjoJtlnkadtoGMNgyM4HBhqF8Eu5We8ORmU0K6ixN NKyobiNgwVsLDfd69ARcHSgkYEfNGgG1xl0Abb+sRKQX0tXrAPq7UwnQWlUFQJNlpRgy1M7T qMSeTyK9tphCX6ffUOhVcw6a21/G0ZQ1j0Ttu6sYKt8LQS+MZQCVdWsB2tR7x7jcEEQkyOTJ GTJl8Lk7giTbugmkWZ0y/xj+0blgg1YBJ4Zjw7g+21NwxB7c+EIHpQICRsS2AO5j8wR2dDzB uKXFIsphUWwop/qhOmQ3thFwm/WEQ8LZRYormijBHA9XNo5Td7/HHUywvpxN00s6WMgiLu/x 94M65qDOh6urjHDETuxl7tHC/KEiOlCMtZNkBRA2gGNa4C5Lj0/jpYmK0CBeouDTUxKD4lMV enA05FYvaBoMNwOWAWJn4fUZIlZESjL4LIUZcAwudhO+niVjRcIESdZ9mTL1tjJdLuPNAGOc PHOBny7aGhko+JyaM+q+bZqT/8aCca8LUueZq10GjW+2yr81MFv9cPtbofpuH/su7lm4accg w59HRQlau1Zdzp8aU0uv8+bhB4HHM0/3nbQNu6pX6sxXdGFnNW2mE2G3Oi75Sfdnx5PsnT7C T9P1XM/N0IvX+gNGolcsMWc8pkWDYoJPkoQG4Epe8h+2YKRwpgIAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140220_055333_632456_85E9AD73 X-CRM114-Status: GOOD ( 10.05 ) X-Spam-Score: -4.5 (----) Cc: Mark Rutland , Benjamin Herrenschmidt , Tomasz Figa , Will Deacon , Tomasz Figa , Paul Mackerras , Marek Szyprowski , Arnd Bergmann , Josh Cartwright , Catalin Marinas , Grant Likely , Laura Abbott , Ian Campbell , Pawel Moll , Stephen Warren , Sascha Hauer , Michal Nazarewicz , Marc , Nishanth Peethambaran , Rob Herring , Kumar Gala , Olof Johansson 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.8 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=no 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..eee55d75bbfa 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_fdt_scan_reserved_mem(); + /* * reserve memory for DMA contigouos allocations, * must come from DMA area inside low memory