From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=mateusz.albecki@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 272A5211E95BE for ; Thu, 28 Mar 2019 06:48:55 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2019 06:48:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,280,1549958400"; d="scan'208";a="144629487" Received: from gklab-27-32.ger.corp.intel.com ([10.102.10.44]) by FMSMGA003.fm.intel.com with ESMTP; 28 Mar 2019 06:48:52 -0700 From: "Albecki, Mateusz" To: edk2-devel@lists.01.org Cc: "Albecki, Mateusz" , Wu, Hao A Date: Thu, 28 Mar 2019 14:48:30 +0100 Message-Id: X-Mailer: git-send-email 2.14.1.windows.1 Subject: [PATCH 0/3] Implement UFS info protocol to pass additional UIC programming data from platform/silicon specific driver X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 13:48:56 -0000 UFS specification allows for additional, implementation specific, programming to be done during host controller initialization. Since some hosts might require it to allow for device detection we add a way for platform/silicon specific code to pass required attributes and their values to generic UFS driver. Please see UFS 2.0 specification for details of the host controller initialization sequence(JESD223B section 7.1.1 step 4). Patchset consists of 3 patches to achieve this. The first one is a bugfix for data transfers that are not aligned to DWORD boundary such as SCSI SENSE command. The second one is code refactoring for device presence detection that cleans up the function that sends UIC commands. Final patch defines UFS info protocol and implements driver logic for servicing it. Tests performed: -Test UFS LU enumeration with UFS 2.0 card with 3 enabled LUs -Test that no unaligned data transfers are performed during enumeration -Test that UIC is programmed according to platform table -Test that driver operation is not impacted when no UFS info protocol is installed CC: Wu, Hao A Albecki, Mateusz (3): MdeModulePkg/UfsPassThruDxe: Fix unaligned data transfer handling MdeModulePkg/UfsPassThruDxe: Refactor UFS device presence detection MdeModulePkg/UfsPassThruDxe: Add UFS info protocol MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c | 62 +++++ MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h | 3 + .../Bus/Ufs/UfsPassThruDxe/UfsPassThruDxe.inf | 1 + .../Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c | 299 +++++++++++++++------ .../Include/Protocol/UfsHostControllerInfo.h | 75 ++++++ MdeModulePkg/MdeModulePkg.dec | 3 + 6 files changed, 356 insertions(+), 87 deletions(-) create mode 100644 MdeModulePkg/Include/Protocol/UfsHostControllerInfo.h -- 2.14.1.windows.1 -------------------------------------------------------------------- Intel Technology Poland sp. z o.o. ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN. Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.