From patchwork Tue Aug 14 08:08:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Huang X-Patchwork-Id: 144117 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp4048530ljj; Tue, 14 Aug 2018 01:10:08 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzNqqC53dGrker8MuGNgTmkbQmQVt3iOgQCKWrxO80EXOWQ05EJ9haODrFY8Zi7nckZYkad X-Received: by 2002:a63:e60c:: with SMTP id g12-v6mr20352437pgh.308.1534234208041; Tue, 14 Aug 2018 01:10:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534234208; cv=none; d=google.com; s=arc-20160816; b=uVAeNPT8ky+YjtTisRzYLxJGGJl2QJKoaSBh9ODhN4P1FqLVss8bNnjLV+k8MMHLzo mG+I9agAL54h8tZ8WzOCAH/p7n7Qao10BOhJuhTTrKE4mhjy4BaZXg+yCMeNy/HrB4/i hpKKP0ojCRq94lxoVC+5emTrFBkQM0e/KPkZmFxhG23rWTSbwLKhGjGqC2dw2bD7jjOv 6NtfqdXAG/3J3pPf++4uw1CCteMNYeYVYvn850ywSDlhjEpU60nmxpMQ2JI/G3h2MQM0 YorpbVJxmbACdplkL4o9ITEzizkIJDChh69e1qbL2Pps6V+SrLx7f8L2J/h34FpyNZJF rlmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=Vrcfs5QuJ5tH0+vPRWK44mhvbatT0NypdCBOHR1wAPQ=; b=dl7VfYRQEVs1u24wKkH49f40gqaBuHkJj+7FW2F28c4OawMq4BrBm0HRnwMpk2wZyJ KU4ttwir3ee7fSUhTRRjcNHGzQKXeMs3tpRxMH/ybVZ4MU+ZP7OCk3l9tv2gDDXpATtB rfcNM4d+GRtcgQvfrit97Bl++ZFxg0GgobBsav8ZJHwPLwhiUUOLdZOwSFzwpA7YeIx9 7KYFuFeqW4oiw7ddf15NuAc+ludhk+tEnHUGyKQsitrc8RqdzsCs7koZPYHt5WAOSK9g 8yu7PWHF6PNwrXSqS9Y7NONkMlfQyeXvgsKYjZYr4geUg8b21PMr9qCjeR9eI+tn2Zsv r6bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Cxak3xIi; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id a5-v6si17225703pla.167.2018.08.14.01.10.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Aug 2018 01:10:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Cxak3xIi; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id EEAE5210F1569; Tue, 14 Aug 2018 01:09:57 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::530; helo=mail-pg1-x530.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8AA45210F1552 for ; Tue, 14 Aug 2018 01:09:56 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id n7-v6so8786356pgq.4 for ; Tue, 14 Aug 2018 01:09:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2+kIACdyZVzVZfyGM+RDMW461atvS/HmptGj5L32Yus=; b=Cxak3xIizF49xmfOgK8g1vh6KZGHt+WLBRWycXGJYOAySHH+D6POY1Z1UZhvEBxT8i yoqDZJS8NeJBLZdNKsdBYRoSURiefgxCMMjm0xgrO5bbjeJSSAzusX0OWY2iSW3f/QXV mcdYHF6OKAmFoTFT5YVum4CWV7UJ6VP4sdlB0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2+kIACdyZVzVZfyGM+RDMW461atvS/HmptGj5L32Yus=; b=TdYHttyE+lvKAfiKX61cktNxjnVUabxdNpXFP8LPQF+mzrYtiXepESQx6uiut5iqFP wNiKA4VraiwiZBOc7ZVXHl3X9cII6cDt9Sre3TzCAgKqzIex+UsM1nQ/u+jFi6oybXoQ j5sXuJ5a+oRyXPVojavEwV0OGePlt99aqYcf3yb3+3+mgmTcJzdIr/oMff2IQmgd8VMr kaWVGMJowwgtzaiPM1DAnFzhzQrVq0o3Sh7jvjy2ibQnwB/enZ9uB8nv9cI/WtVIBYvQ 2hF2pAs0y0w5FszGju0fv2vu7EzvFVeJ+dyGTgMgKIB47+V5kq41RtIsqIZMB2vBlno0 H9tA== X-Gm-Message-State: AOUpUlFS4Y/UIFfD7F5t3WduaUF8hlVijkrwdz++7BO1w1GtcVm3TX9H jV27wUyOKjaGag3sC838RJFevQ== X-Received: by 2002:a63:6fcc:: with SMTP id k195-v6mr20109409pgc.135.1534234195375; Tue, 14 Aug 2018 01:09:55 -0700 (PDT) Received: from localhost.localdomain ([120.31.149.194]) by smtp.gmail.com with ESMTPSA id h130-v6sm72905670pgc.88.2018.08.14.01.09.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Aug 2018 01:09:54 -0700 (PDT) From: Ming Huang To: leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org Date: Tue, 14 Aug 2018 16:08:29 +0800 Message-Id: <20180814080903.50466-10-ming.huang@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180814080903.50466-1-ming.huang@linaro.org> References: <20180814080903.50466-1-ming.huang@linaro.org> Subject: [edk2] [PATCH edk2-platforms v2 09/43] Hisilicon/D0X: Rename the global variable gDS3231RtcDevice X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: huangming23@huawei.com, xinliang.liu@linaro.org, john.garry@huawei.com, zhangjinsong2@huawei.com, guoheyi@huawei.com, huangdaode@hisilicon.com, michael.d.kinney@intel.com, lersek@redhat.com, wanghuiqiang@huawei.com MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" The global variable gDS3231RtcDevice is used by several modules included common module in HwPkg. Renaming it with a general name is proper. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ming Huang --- Silicon/Hisilicon/Include/Library/OemMiscLib.h | 2 +- Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c | 8 ++++---- Platform/Hisilicon/D03/Library/OemMiscLib2P/BoardFeature2PHi1610.c | 2 +- Platform/Hisilicon/D05/Library/OemMiscLibD05/BoardFeatureD05.c | 2 +- Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) -- 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm diff --git a/Silicon/Hisilicon/Include/Library/OemMiscLib.h b/Silicon/Hisilicon/Include/Library/OemMiscLib.h index 6f18c0fa72..87cb498dd7 100644 --- a/Silicon/Hisilicon/Include/Library/OemMiscLib.h +++ b/Silicon/Hisilicon/Include/Library/OemMiscLib.h @@ -34,7 +34,7 @@ extern REPORT_PCIEDIDVID2BMC PcieDeviceToReport[PCIEDEVICE_REPORT_MAX]; BOOLEAN OemIsSocketPresent (UINTN Socket); VOID CoreSelectBoot(VOID); VOID OemPcieResetAndOffReset(void); -extern I2C_DEVICE gDS3231RtcDevice; +extern I2C_DEVICE gRtcDevice; UINTN OemGetSocketNumber(VOID); UINTN OemGetDdrChannel (VOID); diff --git a/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c index 07fa52aa78..f6dbcf6b75 100644 --- a/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c +++ b/Platform/Hisilicon/D03/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c @@ -41,7 +41,7 @@ #include #include -extern I2C_DEVICE gDS3231RtcDevice; +extern I2C_DEVICE gRtcDevice; STATIC BOOLEAN mDS3231Initialized = FALSE; @@ -117,7 +117,7 @@ InitializeDS3231 ( // Prepare the hardware (VOID)IdentifyDS3231(); - (VOID) CopyMem(&Dev, &gDS3231RtcDevice, sizeof(Dev)); + (VOID) CopyMem (&Dev, &gRtcDevice, sizeof(Dev)); Status = I2CInit(Dev.Socket,Dev.Port,Normal); if (EFI_ERROR (Status)) { @@ -199,7 +199,7 @@ LibGetTime ( } } - (VOID) CopyMem(&Dev, &gDS3231RtcDevice, sizeof(Dev)); + (VOID) CopyMem (&Dev, &gRtcDevice, sizeof(Dev)); Status |= I2CRead(&Dev,DS3231_REGADDR_MONTH,1,&Temp); @@ -299,7 +299,7 @@ LibSetTime ( } } - (VOID) CopyMem(&Dev, &gDS3231RtcDevice, sizeof(Dev)); + (VOID) CopyMem (&Dev, &gRtcDevice, sizeof(Dev)); Temp = ((Time->Second/10)<<4) | (Time->Second%10); MicroSecondDelay(1000); diff --git a/Platform/Hisilicon/D03/Library/OemMiscLib2P/BoardFeature2PHi1610.c b/Platform/Hisilicon/D03/Library/OemMiscLib2P/BoardFeature2PHi1610.c index 66d62895a6..4771cb900c 100644 --- a/Platform/Hisilicon/D03/Library/OemMiscLib2P/BoardFeature2PHi1610.c +++ b/Platform/Hisilicon/D03/Library/OemMiscLib2P/BoardFeature2PHi1610.c @@ -25,7 +25,7 @@ #include #include -I2C_DEVICE gDS3231RtcDevice = { +I2C_DEVICE gRtcDevice = { .Socket = 0, .Port = 6, .DeviceType = DEVICE_TYPE_SPD, diff --git a/Platform/Hisilicon/D05/Library/OemMiscLibD05/BoardFeatureD05.c b/Platform/Hisilicon/D05/Library/OemMiscLibD05/BoardFeatureD05.c index 15a509be5d..ae4c194070 100644 --- a/Platform/Hisilicon/D05/Library/OemMiscLibD05/BoardFeatureD05.c +++ b/Platform/Hisilicon/D05/Library/OemMiscLibD05/BoardFeatureD05.c @@ -26,7 +26,7 @@ #include -I2C_DEVICE gDS3231RtcDevice = { +I2C_DEVICE gRtcDevice = { .Socket = 0, .Port = 4, .DeviceType = DEVICE_TYPE_SPD, diff --git a/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c b/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c index 02d6d7f14d..105eb15635 100644 --- a/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c +++ b/Silicon/Hisilicon/Library/DS3231RealTimeClockLib/DS3231RealTimeClockLib.c @@ -39,7 +39,7 @@ #include #include "DS3231RealTimeClock.h" -extern I2C_DEVICE gDS3231RtcDevice; +extern I2C_DEVICE gRtcDevice; STATIC BOOLEAN mDS3231Initialized = FALSE; @@ -67,7 +67,7 @@ InitializeDS3231 ( // Prepare the hardware (VOID)IdentifyDS3231(); - (VOID) CopyMem(&Dev, &gDS3231RtcDevice, sizeof(Dev)); + (VOID) CopyMem (&Dev, &gRtcDevice, sizeof(Dev)); Status = I2CInit(Dev.Socket,Dev.Port,Normal); if (EFI_ERROR (Status)) { @@ -143,7 +143,7 @@ LibGetTime ( } } - (VOID) CopyMem(&Dev, &gDS3231RtcDevice, sizeof(Dev)); + (VOID) CopyMem (&Dev, &gRtcDevice, sizeof(Dev)); Status |= I2CRead(&Dev,DS3231_REGADDR_MONTH,1,&Temp); @@ -233,7 +233,7 @@ LibSetTime ( } } - (VOID) CopyMem(&Dev, &gDS3231RtcDevice, sizeof(Dev)); + (VOID) CopyMem (&Dev, &gRtcDevice, sizeof(Dev)); Temp = ((Time->Second/10)<<4) | (Time->Second%10); MicroSecondDelay(1000);