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 <hao.a...@intel.com> 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. _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel