From patchwork Wed May 11 14:45:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 621120 X-Patchwork-Delegate: bmeng.cn@gmail.com 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 3r4f4n3FSLz9sp7 for ; Thu, 12 May 2016 00:43:37 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=AkNAxoC0; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8D89EA7615; Wed, 11 May 2016 16:43:09 +0200 (CEST) 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 hxWuIiopoVCF; Wed, 11 May 2016 16:43:09 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9D513A7606; Wed, 11 May 2016 16:42:41 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 98D27A74C6 for ; Wed, 11 May 2016 16:41:55 +0200 (CEST) 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 NIZxErslEZzB for ; Wed, 11 May 2016 16:41:55 +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 mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by theia.denx.de (Postfix) with ESMTPS id 07703A74DB for ; Wed, 11 May 2016 16:41:49 +0200 (CEST) Received: by mail-pf0-f195.google.com with SMTP id g132so3909712pfb.3 for ; Wed, 11 May 2016 07:41:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=zs+h+EqO1ZAKXwe89e4OMxuqPw5E5uJAdzfUd2SK/14=; b=AkNAxoC05aJZ29zByJdJol3WeZ3lP2VjVQ9D1sdxBJGEjA1KvqgYc0Ljny9dWFVZ8Z A8X1CB23uUCsP+Dm3k1P133aiZ7H0iVNVeNVkN86m6gce86/U8LRkR455RO/9v6cnr9j 2bnGP+qGLy6i0saCyY49o2gFD/23FgQW2dOcraOouU99kfYt1WbPWvx+MVYAbz7Phozn bSZ+7AeWGeujsNB4fZZYGg26uHJSx3Nd8v/ppKceb32cZvPcDV1PWqnOtsybKKUDlf7F qCvJvOS2f9LaSkd6tIay+1KC3b8SD6VCshwgU6rufv7w+aV6ET1LRHsaaqpFDL31NK8e YEMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=zs+h+EqO1ZAKXwe89e4OMxuqPw5E5uJAdzfUd2SK/14=; b=cA6ZzDl1S1wuOq3Np6oY5iRHIZC+OBJVEGF5zN0pXOPlh4TqEsHX9LyRGy+PU7RP7G lHEPKWs0tfNYIPfA9n2/aZCXscgEnz0sVFSk0qrr6Js37GsZJmnMIamvFt1ODKtwE4vA V9UKPr47fuz8O1x0rlzmneWkIf2DRVDiH2jstuyEwnEP3+4aHM32zHdxOJWXWsPqpouf 2F5HeHKLfh2XudqgDpAQzaTiRa4zJVCeWAlD49GZH5I0ytiBhkqDeD6KCkOcsthTdyzh L1y9hj17R4zxObeWSxaK2IUB30ctqg/lCs4j/KKhWaBuAHJ84+AJ0AqpMWNf0JCwOT6v PmxQ== X-Gm-Message-State: AOPr4FVScLpwpjFpRdqiHikmRI4HUWuCodF4SMOnBVpxmd++ppTcEZySqFH2ewtVhrRYkg== X-Received: by 10.98.68.208 with SMTP id m77mr5476531pfi.25.1462977707864; Wed, 11 May 2016 07:41:47 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-157-139.windriver.com. [147.11.157.139]) by smtp.gmail.com with ESMTPSA id q20sm12744144pfa.90.2016.05.11.07.41.47 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 May 2016 07:41:47 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Wed, 11 May 2016 07:45:00 -0700 Message-Id: <1462977912-13666-7-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1462977912-13666-1-git-send-email-bmeng.cn@gmail.com> References: <1462977912-13666-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH v2 06/18] x86: Unify reserve_arch() for all x86 boards X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Instead of asking each platform to provide reserve_arch(), supply it in arch/x86/cpu/cpu.c in a unified way. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- Changes in v2: None arch/x86/cpu/baytrail/valleyview.c | 8 -------- arch/x86/cpu/broadwell/sdram.c | 5 ----- arch/x86/cpu/cpu.c | 12 ++++++++++++ arch/x86/cpu/ivybridge/sdram.c | 5 ----- arch/x86/cpu/quark/quark.c | 9 --------- 5 files changed, 12 insertions(+), 27 deletions(-) diff --git a/arch/x86/cpu/baytrail/valleyview.c b/arch/x86/cpu/baytrail/valleyview.c index 25382f9..b31f24e 100644 --- a/arch/x86/cpu/baytrail/valleyview.c +++ b/arch/x86/cpu/baytrail/valleyview.c @@ -53,14 +53,6 @@ int arch_misc_init(void) return 0; } -int reserve_arch(void) -{ -#ifdef CONFIG_ENABLE_MRC_CACHE - return mrccache_reserve(); -#else - return 0; -#endif -} #endif void reset_cpu(ulong addr) diff --git a/arch/x86/cpu/broadwell/sdram.c b/arch/x86/cpu/broadwell/sdram.c index 4bf5d15..e7befde 100644 --- a/arch/x86/cpu/broadwell/sdram.c +++ b/arch/x86/cpu/broadwell/sdram.c @@ -190,11 +190,6 @@ static int prepare_mrc_cache(struct pei_data *pei_data) return 0; } -int reserve_arch(void) -{ - return mrccache_reserve(); -} - int dram_init(void) { struct pei_data _pei_data __aligned(8); diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 1482153..2e27d78 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -751,3 +752,14 @@ int cpu_init_r(void) return 0; } + +#ifndef CONFIG_EFI_STUB +int reserve_arch(void) +{ +#ifdef CONFIG_ENABLE_MRC_CACHE + return mrccache_reserve(); +#else + return 0; +#endif +} +#endif diff --git a/arch/x86/cpu/ivybridge/sdram.c b/arch/x86/cpu/ivybridge/sdram.c index e35e543..9d9f63d 100644 --- a/arch/x86/cpu/ivybridge/sdram.c +++ b/arch/x86/cpu/ivybridge/sdram.c @@ -201,11 +201,6 @@ static int recovery_mode_enabled(void) return false; } -int reserve_arch(void) -{ - return mrccache_reserve(); -} - static int copy_spd(struct udevice *dev, struct pei_data *peid) { const void *data; diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c index afb3463..cf3fe7f 100644 --- a/arch/x86/cpu/quark/quark.c +++ b/arch/x86/cpu/quark/quark.c @@ -360,12 +360,3 @@ void board_final_cleanup(void) return; } - -int reserve_arch(void) -{ -#ifdef CONFIG_ENABLE_MRC_CACHE - return mrccache_reserve(); -#else - return 0; -#endif -}