From patchwork Thu Aug 16 12:12:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Huang X-Patchwork-Id: 144352 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1999095ljj; Thu, 16 Aug 2018 05:13:06 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwvcYhXjY1mXqT7Hkom1V1faZYidzq96lEnQKbsfLMAPUhh6XXYHtiQriOTOYewOm7oet4O X-Received: by 2002:a62:ed5:: with SMTP id 82-v6mr31848710pfo.198.1534421586248; Thu, 16 Aug 2018 05:13:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534421586; cv=none; d=google.com; s=arc-20160816; b=pDcbrxTlm8mIOGnnCfXpjCcw2nBIVrgmz9OWM+ofrr/lXY0si12k6BK/UpWxwESyDV o3QUT1POYnPilxCUwFNjEpXbJp6XsuuWNtMY92P/tOrKYryOBrQBDBYF/zoZUoORmiJ/ I439jykL50jbq2kNBjtLTzQ+GCHR4P2wsviXmUIlrcrLNeggZ7lwP2cvX/YawdmIMLga duMBdNVSeRa+RSeYlJdow0iWxoXlJjdpndxun6zJsDPdjKzlbBjf4PZz5/SuvHyJEBLS wlRamkzeA4km2OpnRhvxVwMZbFSJHLyCBZ2FkOpvEC9kifcml+c5yGP7kgg8vevoE78m lzDg== 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=VvcclohCWhp182JMtcM75ctWWVz5lifuN247vl2wz+7VVjV88W3HTgvqGMoXnReQ5m 8hvStxVYqabFodfoRN9VBtxPvb/OuVfTO6sBIdRJ590LAnpIHd1yQr44V84bWVLRoqTr 3pMNYsmYz6OyRQPy0hMBaCEpQqGQ/Z+55kAlcalMzmZj+wxGudBK/jN6Hwt0yfaC+khB N7juWPE1cbrsLkeKau8ar6Jp5mxYdeaY36CDtRavfx25kdVKfduSnxWg9qVXQXQOk1RO 13c8y3ZauNOlbhmPs+EfHyVAQANaIiPNq3Mzv0YGFnNv5BYxBYazJFXCXbOv+wSpxGTm 55Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=iVqNkl1r; 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 q23-v6si24497094pgl.275.2018.08.16.05.13.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Aug 2018 05:13:06 -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=iVqNkl1r; 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 D594E210F30D8; Thu, 16 Aug 2018 05:13:05 -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::435; helo=mail-pf1-x435.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (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 CB31521962301 for ; Thu, 16 Aug 2018 05:13:04 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id e13-v6so1948540pff.7 for ; Thu, 16 Aug 2018 05:13:04 -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=iVqNkl1r/JNBP3i+YQ9J6hLgyqcO6v9BCvCNYeVMdPTStD8UYS7tnW/pw7YcpYAndw Iku9872LzFlf9cN2JzksDiuNv/gE23uYUIMH8jYlAOUGoETIj9NUS1QOTGPl8X0TP7d1 S4zTXWXaomb5zHoUHwQPYEUszHx935xM4+wLI= 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=MrIBXZeiC87yaOxxXBsrIR4FYlmPuPhVORsTiwNBgzxB49YZ8dR/oyX+HTCpM2csj0 EOc4sjY1bOKkICxsJCJMidhqubcT+WeSl0lyfWA0ydsB4060K8Y7fH2V4AhH8JXucSpH oLsK93FddmECzCYOGRvoa9wErWjwN117mQelUqfz2s7blgkqAGkJcOL76PErMQhMgKFz Imufv8vjPjS6KjBb+HcV/BVZx/vD6EdVXLIFdoNdMRRLzlv3SJqjY11ZuhNeLWvQ0F5D zVCJsCZOtp7C9qiNvIfhmaOp7+9m6erChtfHfyHHlAbND7KIE3auyGqs1lxtKhg86NR9 Y2Og== X-Gm-Message-State: AOUpUlEQR4YpMIgPwJPZ1BOubK5pJZhIPRe/8bikoFKraVkEMUoOTmYa wiN8pgZ7hTPEaInwIwIGKpBZ0DSzr1I= X-Received: by 2002:a63:1e08:: with SMTP id e8-v6mr28384456pge.281.1534421584365; Thu, 16 Aug 2018 05:13:04 -0700 (PDT) Received: from localhost.localdomain ([120.31.149.194]) by smtp.gmail.com with ESMTPSA id j27-v6sm46736311pfj.91.2018.08.16.05.13.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Aug 2018 05:13:03 -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: Thu, 16 Aug 2018 20:12:05 +0800 Message-Id: <20180816121239.44129-3-ming.huang@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180816121239.44129-1-ming.huang@linaro.org> References: <20180816121239.44129-1-ming.huang@linaro.org> Subject: [edk2] [PATCH edk2-platforms v3 02/36] 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 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);