From patchwork Wed Dec 2 08:59:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 551251 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 84B4E140157 for ; Wed, 2 Dec 2015 19:57:04 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=fqesHP6l; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E655D4B9F9; Wed, 2 Dec 2015 09:56:45 +0100 (CET) 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 zTHtfw4rIuXQ; Wed, 2 Dec 2015 09:56:45 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CE8884BA23; Wed, 2 Dec 2015 09:56:31 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1FF924B9EF for ; Wed, 2 Dec 2015 09:56:21 +0100 (CET) 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 wwZ4kopAqVa3 for ; Wed, 2 Dec 2015 09:56:21 +0100 (CET) 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-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by theia.denx.de (Postfix) with ESMTPS id 29D244B7D1 for ; Wed, 2 Dec 2015 09:56:16 +0100 (CET) Received: by pacej9 with SMTP id ej9so34834182pac.2 for ; Wed, 02 Dec 2015 00:56:15 -0800 (PST) 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=1EKe0XhClKkF7RO8bO3a03fsYoR4UsgogNw746QHcUc=; b=fqesHP6lDLv28J2vqQi07be1gBCPGaZETmNFpkZsWYZaUxZTi2xJqekM5hOD9DSW1s BSV9+P/S2JFQa2Nhoam/XNiUcQ6vHOaQHbk2poonLxgoyE16jcP0Z9m6fh+aUrCZKaNs L9LNAOJU4pVE0NsilcQ5nY6G0BZ7B0WOMxe3w/Jz5A4UOI9nA22DlpObsVowQ1lnpzb3 jUWr9ZrgHu6lEIsIY+L5VmF+3hOhA8R+zzwuTmdij3GZKXDOyLA2HgW2QwGzMLL3DMMn Cc2TEDxt0ldN89t/ukx06AlNlomHYMBgV+xdormMG2kBTNqJSI3D3lyZ1aEgoXS6RsXN ikzg== X-Received: by 10.98.44.193 with SMTP id s184mr2995985pfs.8.1449046575249; Wed, 02 Dec 2015 00:56:15 -0800 (PST) Received: from ala-d2121-lx1.wrs.com (unknown-157-139.windriver.com. [147.11.157.139]) by smtp.gmail.com with ESMTPSA id lg14sm2766770pab.45.2015.12.02.00.56.14 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Dec 2015 00:56:14 -0800 (PST) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Wed, 2 Dec 2015 00:59:00 -0800 Message-Id: <1449046744-12964-5-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1449046744-12964-1-git-send-email-bmeng.cn@gmail.com> References: <1449046744-12964-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH 4/8] x86: fsp: Rename shared_data to fsp_config_data 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" FSP has several config data like UPD, HDA verb table which can be overridden or provided by bootloader. Currently in U-Boot only UPD is handled via struct shared_data. To accommodate any platform, we rename shared_data to fsp_config_data and move the definition from common place fsp_support.h to platform-specific place fsp_configs.h. Signed-off-by: Bin Meng --- arch/x86/include/asm/arch-baytrail/fsp/fsp_configs.h | 17 +++++++++++++++++ arch/x86/include/asm/arch-queensbay/fsp/fsp_configs.h | 17 +++++++++++++++++ arch/x86/include/asm/fsp/fsp_support.h | 8 +------- arch/x86/lib/fsp/fsp_support.c | 10 +++++----- 4 files changed, 40 insertions(+), 12 deletions(-) create mode 100644 arch/x86/include/asm/arch-baytrail/fsp/fsp_configs.h create mode 100644 arch/x86/include/asm/arch-queensbay/fsp/fsp_configs.h diff --git a/arch/x86/include/asm/arch-baytrail/fsp/fsp_configs.h b/arch/x86/include/asm/arch-baytrail/fsp/fsp_configs.h new file mode 100644 index 0000000..2397553 --- /dev/null +++ b/arch/x86/include/asm/arch-baytrail/fsp/fsp_configs.h @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2015, Bin Meng + * + * SPDX-License-Identifier: Intel + */ + +#ifndef __FSP_CONFIGS_H__ +#define __FSP_CONFIGS_H__ + +struct fsp_config_data { + struct fsp_header *fsp_hdr; + u32 stack_top; + u32 boot_mode; + struct upd_region fsp_upd; +}; + +#endif /* __FSP_CONFIGS_H__ */ diff --git a/arch/x86/include/asm/arch-queensbay/fsp/fsp_configs.h b/arch/x86/include/asm/arch-queensbay/fsp/fsp_configs.h new file mode 100644 index 0000000..2397553 --- /dev/null +++ b/arch/x86/include/asm/arch-queensbay/fsp/fsp_configs.h @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2015, Bin Meng + * + * SPDX-License-Identifier: Intel + */ + +#ifndef __FSP_CONFIGS_H__ +#define __FSP_CONFIGS_H__ + +struct fsp_config_data { + struct fsp_header *fsp_hdr; + u32 stack_top; + u32 boot_mode; + struct upd_region fsp_upd; +}; + +#endif /* __FSP_CONFIGS_H__ */ diff --git a/arch/x86/include/asm/fsp/fsp_support.h b/arch/x86/include/asm/fsp/fsp_support.h index 18e2d21..39b2864 100644 --- a/arch/x86/include/asm/fsp/fsp_support.h +++ b/arch/x86/include/asm/fsp/fsp_support.h @@ -17,13 +17,7 @@ #include "fsp_infoheader.h" #include "fsp_bootmode.h" #include - -struct shared_data { - struct fsp_header *fsp_hdr; - u32 stack_top; - u32 boot_mode; - struct upd_region fsp_upd; -}; +#include #define FSP_LOWMEM_BASE 0x100000UL #define FSP_HIGHMEM_BASE 0x100000000ULL diff --git a/arch/x86/lib/fsp/fsp_support.c b/arch/x86/lib/fsp/fsp_support.c index 083d855..9da720b 100644 --- a/arch/x86/lib/fsp/fsp_support.c +++ b/arch/x86/lib/fsp/fsp_support.c @@ -99,7 +99,7 @@ void fsp_continue(u32 status, void *hob_list) void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf) { - struct shared_data shared_data; + struct fsp_config_data config_data; fsp_init_f init; struct fsp_init_params params; struct fspinit_rtbuf rt_buf; @@ -118,7 +118,7 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf) panic("Invalid FSP header"); } - fsp_upd = &shared_data.fsp_upd; + fsp_upd = &config_data.fsp_upd; memset(&rt_buf, 0, sizeof(struct fspinit_rtbuf)); /* Reserve a gap in stack top */ @@ -151,9 +151,9 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf) init = (fsp_init_f)(fsp_hdr->img_base + fsp_hdr->fsp_init); params_ptr = ¶ms; - shared_data.fsp_hdr = fsp_hdr; - shared_data.stack_top = stack_top; - shared_data.boot_mode = boot_mode; + config_data.fsp_hdr = fsp_hdr; + config_data.stack_top = stack_top; + config_data.boot_mode = boot_mode; post_code(POST_PRE_MRC);