From patchwork Thu Oct 3 09:04:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Kumar X-Patchwork-Id: 280236 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id A9EF52C00A3 for ; Thu, 3 Oct 2013 18:44:03 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 072774A081; Thu, 3 Oct 2013 10:43:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EfgldzvnXQXU; Thu, 3 Oct 2013 10:43:55 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7B0BD4A064; Thu, 3 Oct 2013 10:43:51 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 94BBB4A067 for ; Thu, 3 Oct 2013 10:43:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4qKtIqqbqXSD for ; Thu, 3 Oct 2013 10:43:38 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by theia.denx.de (Postfix) with ESMTP id 214794A063 for ; Thu, 3 Oct 2013 10:43:33 +0200 (CEST) Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MU3007H8487GAE0@mailout2.samsung.com> for u-boot@lists.denx.de; Thu, 03 Oct 2013 17:43:29 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.122]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 19.55.29948.13E2D425; Thu, 03 Oct 2013 17:43:29 +0900 (KST) X-AuditID: cbfee691-b7f4a6d0000074fc-5c-524d2e31bf45 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 99.2B.05832.13E2D425; Thu, 03 Oct 2013 17:43:29 +0900 (KST) Received: from chromeserver-PowerEdge-T410.sisodomain.com ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MU300C1Q485GB70@mmp1.samsung.com>; Thu, 03 Oct 2013 17:43:29 +0900 (KST) From: Ajay Kumar To: u-boot@lists.denx.de, wd@denx.de, mk7.kang@samsung.com, dh09.lee@samsung.com Date: Thu, 03 Oct 2013 14:34:19 +0530 Message-id: <1380791060-2578-1-git-send-email-ajaykumar.rs@samsung.com> X-Mailer: git-send-email 1.7.10.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrPLMWRmVeSWpSXmKPExsWyRsSkStdQzzfIoHuRlMX183YWHUdaGC1+ TprDavF2bye7xeSHrxgdWD0mTlzH6DFv1gkWj7N3djB69G1ZxRjAEsVlk5Kak1mWWqRvl8CV MXHnL5aC0+wV+xrWMTcwzmfrYuTgkBAwkdhzm6WLkRPIFJO4cG89UJiLQ0hgKaPEqwln2SES JhK3LxxmhUgsYpQ4+PUME4Qzm0niybbTTCBVbALaEtum3wQbJSIQIHGy8S4riM0sICzR8XEB WI2wQJjE6d6HbCA2i4CqRPvei2A2r4C7xLtNd5ggtilKdD+bAHaGhMBzNok/H5+xQzQISHyb fIgF4mxZiU0HmCHqJS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pCk5Wt2bZx8ydBI yup83rHbEafeVmWeadmtHa/n+tC8J+/0Jt1Frlf7Hj+p/c15+Fcw92t1xYzGnc3hJ5eEKrEU ZyQaajEXFScCAObLXD7AAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Cc: sjg@chomium.org Subject: [U-Boot] [PATCH 1/2] RFC: arm: add call to cleanup things before jumping into kernel X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Add infrasturcture to cleanup any of those architecture related settings done for u-boot, if they can cause problem during kernel boot. Signed-off-by: Ajay Kumar --- arch/arm/cpu/armv7/cpu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c index 01cdb7e..edf4604 100644 --- a/arch/arm/cpu/armv7/cpu.c +++ b/arch/arm/cpu/armv7/cpu.c @@ -23,6 +23,7 @@ #include void __weak cpu_cache_initialization(void){} +void __weak arch_cleanup_before_linux(void){} int cleanup_before_linux(void) { @@ -35,6 +36,11 @@ int cleanup_before_linux(void) #ifndef CONFIG_SPL_BUILD disable_interrupts(); #endif + /* + * Cleanup any of those architecture related settings done for u-boot, + * if they can cause problem during kernel boot. + */ + arch_cleanup_before_linux(); /* * Turn off I-cache and invalidate it