From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 659A82034D8FE for ; Sun, 4 Mar 2018 18:08:46 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Mar 2018 18:14:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,425,1515484800"; d="scan'208";a="34603355" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 04 Mar 2018 18:14:59 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 4 Mar 2018 18:14:58 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.124]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.116]) with mapi id 14.03.0319.002; Mon, 5 Mar 2018 10:14:54 +0800 From: "Bi, Dandan" To: =?iso-8859-1?Q?Marvin_H=E4user?= , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" , "Gao, Liming" , "Bi, Dandan" Thread-Topic: [PATCH 1/5] MdePkg/SPI: Change function definitions to match their descriptions. Thread-Index: AQHTr+ri4yU6uX2cBEWXaviTJcNtDqPA5f4A Date: Mon, 5 Mar 2018 02:14:53 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB3BA4B2C5@shsmsx102.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 1/5] MdePkg/SPI: Change function definitions to match their descriptions. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 02:08:47 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Marvin, Thank you very much for your contribution. Could you hold this patch series= ? Since current SPI header files follow PI1.6 spec. For this case, we should submit an ECR to update the PI spec firstly. After= the ECR has been approved by PIWG, then we can send patch to update them.= =20 Since you have found a lot of missing/incorrect parts in the SPI part of PI= Spec. Could you help to submit an ECR to update them? Thanks, Dandan -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Marv= in H=E4user Sent: Wednesday, February 28, 2018 12:49 AM To: edk2-devel@lists.01.org Cc: Kinney, Michael D ; Gao, Liming Subject: [edk2] [PATCH 1/5] MdePkg/SPI: Change function definitions to matc= h their descriptions. The PI specification is not continuous with function headers and descriptio= ns for the SPI protocols. Correct and comment these mistakes. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marvin Haeuser --- MdePkg/Include/Protocol/SpiConfiguration.h | 12 ++++++++---- MdePkg/Include/Protocol/SpiHc.h | 14 +++++++++----- MdePkg/Include/Protocol/SpiIo.h | 15 ++++++++++----- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/MdePkg/Include/Protocol/SpiConfiguration.h b/MdePkg/Include/Pr= otocol/SpiConfiguration.h index c0df183ec7f0..c36a809f4232 100644 --- a/MdePkg/Include/Protocol/SpiConfiguration.h +++ b/MdePkg/Include/Protocol/SpiConfiguration.h @@ -1,7 +1,7 @@ /** @file This file defines the SPI Configuration Protocol. =20 - Copyright (c) 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2017 - 2018, Intel Corporation. All rights=20 + reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the licens= e may @@ -65,6 +65,10 @@ EFI_STATUS IN BOOLEAN PinValue ); =20 +// +// Note: In the PI specification, ClockHz is decorated as only 'IN', which= is +// not conforming to the parameter description. +// /** Set up the clock generator to produce the correct clock frequency, phase= and polarity for a SPI chip. @@ -78,7 +82,7 @@ EFI_STATUS ClockPhase and ClockPolarity fields. The routi= ne also has access to the names for the SPI bus a= nd chip which can be used during debugging. - @param[in] ClockHz Pointer to the requested clock frequency. The = clock + @param[in,out] ClockHz Pointer to the requested clock frequency. The = clock generator will choose a supported clock freque= ncy which is less then or equal to this value. Specify zero to turn the clock generator off. @@ -92,8 +96,8 @@ EFI_STATUS **/ typedef EFI_STATUS (EFIAPI *EFI_SPI_CLOCK) ( - IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral, - IN UINT32 *ClockHz + IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral, + IN OUT UINT32 *ClockHz ); =20 /// diff --git a/MdePkg/Include/Protocol/SpiHc.h b/MdePkg/Include/Protocol/SpiH= c.h index 12fe5d2dce0a..71c75431e4e8 100644 --- a/MdePkg/Include/Protocol/SpiHc.h +++ b/MdePkg/Include/Protocol/SpiHc.h @@ -1,7 +1,7 @@ /** @file This file defines the SPI Host Controller Protocol. =20 - Copyright (c) 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2017 - 2018, Intel Corporation. All rights=20 + reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the licens= e may @@ -66,6 +66,10 @@ typedef EFI_STATUS IN BOOLEAN PinValue ); =20 +// +// Note: In the PI specification, ClockHz is decorated as only 'IN', which= is +// not conforming to the parameter description. +// /** Set up the clock generator to produce the correct clock frequency, phase= and polarity for a SPI chip. @@ -80,7 +84,7 @@ typedef EFI_STATUS ClockPhase and ClockPolarity fields. The routi= ne also has access to the names for the SPI bus a= nd chip which can be used during debugging. - @param[in] ClockHz Pointer to the requested clock frequency. The = SPI + @param[in,out] ClockHz Pointer to the requested clock frequency. The = SPI host controller will choose a supported clock frequency which is less then or equal to this value. Specify zero to turn the clock generato= r @@ -94,9 +98,9 @@ typedef EFI_STATUS **/ typedef EFI_STATUS (EFIAPI *E= FI_SPI_HC_PROTOCOL_CLOCK) ( - IN CONST EFI_SPI_HC_PROTOCOL *This, - IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral, - IN UINT32 *ClockHz + IN CONST EFI_SPI_HC_PROTOCOL *This, + IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral, + IN OUT UINT32 *ClockHz ); =20 /** diff --git a/MdePkg/Include/Protocol/SpiIo.h b/MdePkg/Include/Protocol/SpiI= o.h index 43e804518f8b..8c5d96bb04b2 100644 --- a/MdePkg/Include/Protocol/SpiIo.h +++ b/MdePkg/Include/Protocol/SpiIo.h @@ -1,7 +1,7 @@ /** @file This file defines the SPI I/O Protocol. =20 - Copyright (c) 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2017 - 2018, Intel Corporation. All rights=20 + reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the licens= e may @@ -144,6 +144,11 @@ EFI_STATUS OUT UINT8 *ReadBuffer ); =20 +// +// Note: In the PI specification, 'This' is decorated with 'IN' and 'CONST= '. +// However, 'This' needs to be updated in order to reflect the +// Peripheral update. +// /** Update the SPI peripheral associated with this SPI 10 instance. =20 @@ -152,8 +157,8 @@ EFI_STATUS SPI NOR flash parts, where the size and parameters change depending upon device is in the socket. =20 - @param[in] This Pointer to an EFI_SPI_IO_PROTOCOL structure. - @param[in] SpiPeripheral Pointer to an EFI_SPI_PERIPHERAL structure. + @param[in,out] This Pointer to an EFI_SPI_IO_PROTOCOL structur= e. + @param[in] SpiPeripheral Pointer to an EFI_SPI_PERIPHERAL structure= . =20 @retval EFI_SUCCESS The SPI peripheral was updated successful= ly @retval EFI_INVALID_PARAMETER The SpiPeripheral value is NULL, @@ -165,= 8 +170,8 @@ EFI_STATUS **/ typedef EFI_STATUS (EFIAPI *EFI_SPI_IO_PROTOC= OL_UPDATE_SPI_PERIPHERAL) ( - IN CONST EFI_SPI_IO_PROTOCOL *This, - IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral + IN OUT EFI_SPI_IO_PROTOCOL *This, + IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral ); =20 /// -- 2.16.0.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel