[edk2-devel] [PATCHv3 0/4] Add EDKII_UFS_HC_PLATFORM_PROTOCOL to support platform specific programming of UFS host controllers

Albecki, Mateusz posted 4 patches 4 years, 8 months ago
Failed in applying to current master (apply log)
MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c  |  26 +++-
MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h  |  44 +++++-
.../Bus/Ufs/UfsPassThruDxe/UfsPassThruDxe.inf      |   3 +-
.../Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c        | 173 +++++++++++++++------
.../Include/Protocol/UfsHostControllerPlatform.h   | 124 +++++++++++++++
MdeModulePkg/MdeModulePkg.dec                      |   3 +
6 files changed, 324 insertions(+), 49 deletions(-)
create mode 100644 MdeModulePkg/Include/Protocol/UfsHostControllerPlatform.h
[edk2-devel] [PATCHv3 0/4] Add EDKII_UFS_HC_PLATFORM_PROTOCOL to support platform specific programming of UFS host controllers
Posted by Albecki, Mateusz 4 years, 8 months ago
To cover additional host controller programming mentioned in the UFS specification we have added an additional protocol that allows the UEFI driver to give control to platform driver. This allows the platform to perform any additional steps needed for the stable operation.

Changes in v3:
- UFS driver will abort initializaton when it fails to get host controler information
- Fixed bug with calling post link startup callback on failed device detection

Test coverage:
Tested on platform with UFS 2.1 host controller with Samsung UFS2.0 part with 3 LUs enabled All LUs have been enumerated in boot manager.
Tested that enumeration works without platform protocol installed(on host controller that can support it) Tested that enumeration works with platform protocol installed and with additional programming steps after link startup(power mode change to GEAR2).

Cc: Hao A Wu <hao.a.wu@intel.com


Mateusz Albecki (4):
  MdeModulePkg: Add definition of the EDKII_UFS_HC_PLATFORM_PROTOCOL
  MdeModulePkg/UfsPassThruDxe: Refactor UfsExecUicCommand function
  MdeModulePkg/UfsPassThruDxe: Refactor private data to use
    EDKII_UFS_HC_INFO
  MdeModulePkg/UfsPassThruDxe: Implement EDKII_UFS_HC_PLATFORM_PROTOCOL

 MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c  |  26 +++-
 MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h  |  44 +++++-
 .../Bus/Ufs/UfsPassThruDxe/UfsPassThruDxe.inf      |   3 +-
 .../Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c        | 173 +++++++++++++++------
 .../Include/Protocol/UfsHostControllerPlatform.h   | 124 +++++++++++++++
 MdeModulePkg/MdeModulePkg.dec                      |   3 +
 6 files changed, 324 insertions(+), 49 deletions(-)
 create mode 100644 MdeModulePkg/Include/Protocol/UfsHostControllerPlatform.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.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#45275): https://edk2.groups.io/g/devel/message/45275
Mute This Topic: https://groups.io/mt/32811056/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCHv3 0/4] Add EDKII_UFS_HC_PLATFORM_PROTOCOL to support platform specific programming of UFS host controllers
Posted by Wu, Hao A 4 years, 8 months ago
> -----Original Message-----
> From: Albecki, Mateusz
> Sent: Friday, August 09, 2019 10:36 PM
> To: devel@edk2.groups.io
> Cc: Albecki, Mateusz; Wu, Hao A
> Subject: [PATCHv3 0/4] Add EDKII_UFS_HC_PLATFORM_PROTOCOL to
> support platform specific programming of UFS host controllers
> 
> To cover additional host controller programming mentioned in the UFS
> specification we have added an additional protocol that allows the UEFI
> driver to give control to platform driver. This allows the platform to perform
> any additional steps needed for the stable operation.
> 
> Changes in v3:
> - UFS driver will abort initializaton when it fails to get host controler
> information
> - Fixed bug with calling post link startup callback on failed device detection
> 
> Test coverage:
> Tested on platform with UFS 2.1 host controller with Samsung UFS2.0 part
> with 3 LUs enabled All LUs have been enumerated in boot manager.
> Tested that enumeration works without platform protocol installed(on host
> controller that can support it) Tested that enumeration works with platform
> protocol installed and with additional programming steps after link
> startup(power mode change to GEAR2).
> 
> Cc: Hao A Wu <hao.a.wu@intel.com
> 
> 
> Mateusz Albecki (4):
>   MdeModulePkg: Add definition of the
> EDKII_UFS_HC_PLATFORM_PROTOCOL
>   MdeModulePkg/UfsPassThruDxe: Refactor UfsExecUicCommand function
>   MdeModulePkg/UfsPassThruDxe: Refactor private data to use
>     EDKII_UFS_HC_INFO
>   MdeModulePkg/UfsPassThruDxe: Implement
> EDKII_UFS_HC_PLATFORM_PROTOCOL


For the 3rd patch, in order to please the PatchCheck.py, I will change the
title a little bit to:
* MdeModulePkg/UfsPassThruDxe: Refactor private data to use UfsHcInfo

Other than that, for the series,
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>

Since there is already a confirmation from Laszlo for adding this feature in
the upcoming stable tag:
https://edk2.groups.io/g/devel/message/45217?p=,,,20,0,0,0::Created,,ufs,20,2,0,32784353

I plan to push the series tomorrow (after around 24 hours, in case if there
are additional feedbacks).

Best Regards,
Hao Wu


> 
>  MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c  |  26 +++-
>  MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h  |  44 +++++-
>  .../Bus/Ufs/UfsPassThruDxe/UfsPassThruDxe.inf      |   3 +-
>  .../Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c        | 173 +++++++++++++++-
> -----
>  .../Include/Protocol/UfsHostControllerPlatform.h   | 124 +++++++++++++++
>  MdeModulePkg/MdeModulePkg.dec                      |   3 +
>  6 files changed, 324 insertions(+), 49 deletions(-)
>  create mode 100644
> MdeModulePkg/Include/Protocol/UfsHostControllerPlatform.h
> 
> --
> 2.14.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#45348): https://edk2.groups.io/g/devel/message/45348
Mute This Topic: https://groups.io/mt/32811056/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCHv3 0/4] Add EDKII_UFS_HC_PLATFORM_PROTOCOL to support platform specific programming of UFS host controllers
Posted by Wu, Hao A 4 years, 8 months ago
> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Wu, Hao A
> Sent: Monday, August 12, 2019 10:39 AM
> To: Albecki, Mateusz; devel@edk2.groups.io
> Cc: Andrew Fish; Laszlo Ersek; Leif Lindholm; Kinney, Michael D; Gao, Liming
> Subject: Re: [edk2-devel] [PATCHv3 0/4] Add
> EDKII_UFS_HC_PLATFORM_PROTOCOL to support platform specific
> programming of UFS host controllers
> 
> > -----Original Message-----
> > From: Albecki, Mateusz
> > Sent: Friday, August 09, 2019 10:36 PM
> > To: devel@edk2.groups.io
> > Cc: Albecki, Mateusz; Wu, Hao A
> > Subject: [PATCHv3 0/4] Add EDKII_UFS_HC_PLATFORM_PROTOCOL to
> > support platform specific programming of UFS host controllers
> >
> > To cover additional host controller programming mentioned in the UFS
> > specification we have added an additional protocol that allows the UEFI
> > driver to give control to platform driver. This allows the platform to perform
> > any additional steps needed for the stable operation.
> >
> > Changes in v3:
> > - UFS driver will abort initializaton when it fails to get host controler
> > information
> > - Fixed bug with calling post link startup callback on failed device detection
> >
> > Test coverage:
> > Tested on platform with UFS 2.1 host controller with Samsung UFS2.0 part
> > with 3 LUs enabled All LUs have been enumerated in boot manager.
> > Tested that enumeration works without platform protocol installed(on host
> > controller that can support it) Tested that enumeration works with
> platform
> > protocol installed and with additional programming steps after link
> > startup(power mode change to GEAR2).
> >
> > Cc: Hao A Wu <hao.a.wu@intel.com
> >
> >
> > Mateusz Albecki (4):
> >   MdeModulePkg: Add definition of the
> > EDKII_UFS_HC_PLATFORM_PROTOCOL
> >   MdeModulePkg/UfsPassThruDxe: Refactor UfsExecUicCommand function
> >   MdeModulePkg/UfsPassThruDxe: Refactor private data to use
> >     EDKII_UFS_HC_INFO
> >   MdeModulePkg/UfsPassThruDxe: Implement
> > EDKII_UFS_HC_PLATFORM_PROTOCOL
> 
> 
> For the 3rd patch, in order to please the PatchCheck.py, I will change the
> title a little bit to:
> * MdeModulePkg/UfsPassThruDxe: Refactor private data to use UfsHcInfo
> 
> Other than that, for the series,
> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
> 
> Since there is already a confirmation from Laszlo for adding this feature in
> the upcoming stable tag:
> https://edk2.groups.io/g/devel/message/45217?p=,,,20,0,0,0::Created,,ufs,2
> 0,2,0,32784353
> 
> I plan to push the series tomorrow (after around 24 hours, in case if there
> are additional feedbacks).


Thanks all, the series has been pushed via commits 12dcad5b1e..ecc32c90ee.

Best Regards,
Hao Wu


> 
> Best Regards,
> Hao Wu
> 
> 
> >
> >  MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c  |  26 +++-
> >  MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h  |  44 +++++-
> >  .../Bus/Ufs/UfsPassThruDxe/UfsPassThruDxe.inf      |   3 +-
> >  .../Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c        | 173
> +++++++++++++++-
> > -----
> >  .../Include/Protocol/UfsHostControllerPlatform.h   | 124
> +++++++++++++++
> >  MdeModulePkg/MdeModulePkg.dec                      |   3 +
> >  6 files changed, 324 insertions(+), 49 deletions(-)
> >  create mode 100644
> > MdeModulePkg/Include/Protocol/UfsHostControllerPlatform.h
> >
> > --
> > 2.14.1.windows.1
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#45490): https://edk2.groups.io/g/devel/message/45490
Mute This Topic: https://groups.io/mt/32811056/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-