[edk2-devel] [PATCH 0/2] MdeModulePkg/SdMmcPciHcDxe: Send the EdkiiSdMmcSwitchClockFreq notification before sending CMD13

Albecki, Mateusz posted 2 patches 4 years, 4 months ago
Failed in applying to current master (apply log)
MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c    |  20 +--
MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c      |  25 +---
MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h |  24 ++++
MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c   | 136 +++++++++++----------
MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h   |  45 ++-----
5 files changed, 112 insertions(+), 138 deletions(-)
[edk2-devel] [PATCH 0/2] MdeModulePkg/SdMmcPciHcDxe: Send the EdkiiSdMmcSwitchClockFreq notification before sending CMD13
Posted by Albecki, Mateusz 4 years, 4 months ago
The first patch refactors the SdMmcClockSupply function with a goal
of sending the EdkiiSdMmcSwitchClockFreq notification before we send the
CMD13 to check the switch status in eMMC init flow. This is required to
avoid sending the CMD13 on link that still has not been fixed by platform.

To avoid changing the driver behavior we avoid sending notifications
when the clock is setup for the first time or when we setup the clock
after the voltage switch procedure(adressed in second patch).

The second patch in the series optimizes the SD card detection routine
to stop it from going through the process of internal clock setup
after switching the voltage. According to SD HC specification there
is no need to setup internal clock all over again.

Tests performed:
- Booted eMMC in HS400 mode on platform which required post clock freq fixes

I wasn't able to test SD card yet due to the lack of setup with working SD.

The patch series is available on github here: https://github.com/malbecki/edk2/tree/sdmmc_post_freq_notify

Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Marcin Wojtas <mw@semihalf.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>

Mateusz Albecki (2):
  SdMmcPciHcDxe: Send EdkiiSdMmcSwitchClockFreq after SD clock start
  MdeModulePkg/SdMmcPciHcDxe: Add function to start SD clock

 MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c    |  20 +--
 MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c      |  25 +---
 MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h |  24 ++++
 MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c   | 136 +++++++++++----------
 MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h   |  45 ++-----
 5 files changed, 112 insertions(+), 138 deletions(-)

-- 
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 (#52462): https://edk2.groups.io/g/devel/message/52462
Mute This Topic: https://groups.io/mt/68852773/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 0/2] MdeModulePkg/SdMmcPciHcDxe: Send the EdkiiSdMmcSwitchClockFreq notification before sending CMD13
Posted by Wu, Hao A 4 years, 3 months ago
> -----Original Message-----
> From: Albecki, Mateusz
> Sent: Saturday, December 21, 2019 1:13 AM
> To: devel@edk2.groups.io
> Cc: Albecki, Mateusz; Wu, Hao A; Marcin Wojtas; Gao, Zhichao; Gao, Liming
> Subject: [PATCH 0/2] MdeModulePkg/SdMmcPciHcDxe: Send the
> EdkiiSdMmcSwitchClockFreq notification before sending CMD13
> 
> The first patch refactors the SdMmcClockSupply function with a goal
> of sending the EdkiiSdMmcSwitchClockFreq notification before we send the
> CMD13 to check the switch status in eMMC init flow. This is required to
> avoid sending the CMD13 on link that still has not been fixed by platform.
> 
> To avoid changing the driver behavior we avoid sending notifications
> when the clock is setup for the first time or when we setup the clock
> after the voltage switch procedure(adressed in second patch).
> 
> The second patch in the series optimizes the SD card detection routine
> to stop it from going through the process of internal clock setup
> after switching the voltage. According to SD HC specification there
> is no need to setup internal clock all over again.
> 
> Tests performed:
> - Booted eMMC in HS400 mode on platform which required post clock freq
> fixes
> 
> I wasn't able to test SD card yet due to the lack of setup with working SD.


I performed a quick verification on the eMMC device and SD card on my side.
They work properly after the series.

So for the series,
Tested-by: Hao A Wu <hao.a.wu@intel.com>


> 
> The patch series is available on github here:
> https://github.com/malbecki/edk2/tree/sdmmc_post_freq_notify


Add Ard to the loop to see if there is additional comment.

Best Regards,
Hao Wu


> 
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Marcin Wojtas <mw@semihalf.com>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> 
> Mateusz Albecki (2):
>   SdMmcPciHcDxe: Send EdkiiSdMmcSwitchClockFreq after SD clock start
>   MdeModulePkg/SdMmcPciHcDxe: Add function to start SD clock
> 
>  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c    |  20 +--
>  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c      |  25 +---
>  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h |  24 ++++
>  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c   | 136
> +++++++++++----------
>  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h   |  45 ++-----
>  5 files changed, 112 insertions(+), 138 deletions(-)
> 
> --
> 2.14.1.windows.1


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

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

Re: [edk2-devel] [PATCH 0/2] MdeModulePkg/SdMmcPciHcDxe: Send the EdkiiSdMmcSwitchClockFreq notification before sending CMD13
Posted by Marcin Wojtas 4 years, 3 months ago
Hi,

wt., 24 gru 2019 o 03:52 Wu, Hao A <hao.a.wu@intel.com> napisał(a):
>
> > -----Original Message-----
> > From: Albecki, Mateusz
> > Sent: Saturday, December 21, 2019 1:13 AM
> > To: devel@edk2.groups.io
> > Cc: Albecki, Mateusz; Wu, Hao A; Marcin Wojtas; Gao, Zhichao; Gao, Liming
> > Subject: [PATCH 0/2] MdeModulePkg/SdMmcPciHcDxe: Send the
> > EdkiiSdMmcSwitchClockFreq notification before sending CMD13
> >
> > The first patch refactors the SdMmcClockSupply function with a goal
> > of sending the EdkiiSdMmcSwitchClockFreq notification before we send the
> > CMD13 to check the switch status in eMMC init flow. This is required to
> > avoid sending the CMD13 on link that still has not been fixed by platform.
> >
> > To avoid changing the driver behavior we avoid sending notifications
> > when the clock is setup for the first time or when we setup the clock
> > after the voltage switch procedure(adressed in second patch).
> >
> > The second patch in the series optimizes the SD card detection routine
> > to stop it from going through the process of internal clock setup
> > after switching the voltage. According to SD HC specification there
> > is no need to setup internal clock all over again.
> >
> > Tests performed:
> > - Booted eMMC in HS400 mode on platform which required post clock freq
> > fixes
> >
> > I wasn't able to test SD card yet due to the lack of setup with working SD.
>
>
> I performed a quick verification on the eMMC device and SD card on my side.
> They work properly after the series.
>
> So for the series,
> Tested-by: Hao A Wu <hao.a.wu@intel.com>
>

I verified eMMC HS200 / HS@50MHz and SD cards on 2 Armada platforms, so:
Tested-by: Marcin Wojtas <mw@semihalf.com>

Best regards,
Marcin

>
> >
> > The patch series is available on github here:
> > https://github.com/malbecki/edk2/tree/sdmmc_post_freq_notify
>
>
> Add Ard to the loop to see if there is additional comment.
>
> Best Regards,
> Hao Wu
>
>
> >
> > Cc: Hao A Wu <hao.a.wu@intel.com>
> > Cc: Marcin Wojtas <mw@semihalf.com>
> > Cc: Zhichao Gao <zhichao.gao@intel.com>
> > Cc: Liming Gao <liming.gao@intel.com>
> >
> > Mateusz Albecki (2):
> >   SdMmcPciHcDxe: Send EdkiiSdMmcSwitchClockFreq after SD clock start
> >   MdeModulePkg/SdMmcPciHcDxe: Add function to start SD clock
> >
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c    |  20 +--
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c      |  25 +---
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h |  24 ++++
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c   | 136
> > +++++++++++----------
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h   |  45 ++-----
> >  5 files changed, 112 insertions(+), 138 deletions(-)
> >
> > --
> > 2.14.1.windows.1
>

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

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

Re: [edk2-devel] [PATCH 0/2] MdeModulePkg/SdMmcPciHcDxe: Send the EdkiiSdMmcSwitchClockFreq notification before sending CMD13
Posted by Wu, Hao A 4 years, 3 months ago
> -----Original Message-----
> From: Marcin Wojtas [mailto:mw@semihalf.com]
> Sent: Friday, January 03, 2020 7:05 PM
> To: Wu, Hao A
> Cc: Albecki, Mateusz; devel@edk2.groups.io; Gao, Zhichao; Gao, Liming; Ard
> Biesheuvel
> Subject: Re: [PATCH 0/2] MdeModulePkg/SdMmcPciHcDxe: Send the
> EdkiiSdMmcSwitchClockFreq notification before sending CMD13
> 
> Hi,
> 
> wt., 24 gru 2019 o 03:52 Wu, Hao A <hao.a.wu@intel.com> napisał(a):
> >
> > > -----Original Message-----
> > > From: Albecki, Mateusz
> > > Sent: Saturday, December 21, 2019 1:13 AM
> > > To: devel@edk2.groups.io
> > > Cc: Albecki, Mateusz; Wu, Hao A; Marcin Wojtas; Gao, Zhichao; Gao,
> Liming
> > > Subject: [PATCH 0/2] MdeModulePkg/SdMmcPciHcDxe: Send the
> > > EdkiiSdMmcSwitchClockFreq notification before sending CMD13
> > >
> > > The first patch refactors the SdMmcClockSupply function with a goal
> > > of sending the EdkiiSdMmcSwitchClockFreq notification before we send
> the
> > > CMD13 to check the switch status in eMMC init flow. This is required to
> > > avoid sending the CMD13 on link that still has not been fixed by platform.
> > >
> > > To avoid changing the driver behavior we avoid sending notifications
> > > when the clock is setup for the first time or when we setup the clock
> > > after the voltage switch procedure(adressed in second patch).
> > >
> > > The second patch in the series optimizes the SD card detection routine
> > > to stop it from going through the process of internal clock setup
> > > after switching the voltage. According to SD HC specification there
> > > is no need to setup internal clock all over again.
> > >
> > > Tests performed:
> > > - Booted eMMC in HS400 mode on platform which required post clock
> freq
> > > fixes
> > >
> > > I wasn't able to test SD card yet due to the lack of setup with working SD.
> >
> >
> > I performed a quick verification on the eMMC device and SD card on my
> side.
> > They work properly after the series.
> >
> > So for the series,
> > Tested-by: Hao A Wu <hao.a.wu@intel.com>
> >
> 
> I verified eMMC HS200 / HS@50MHz and SD cards on 2 Armada platforms, so:
> Tested-by: Marcin Wojtas <mw@semihalf.com>


Thanks for the testing effort.
I will push the series soon.

Best Regards,
Hao Wu


> 
> Best regards,
> Marcin
> 
> >
> > >
> > > The patch series is available on github here:
> > > https://github.com/malbecki/edk2/tree/sdmmc_post_freq_notify
> >
> >
> > Add Ard to the loop to see if there is additional comment.
> >
> > Best Regards,
> > Hao Wu
> >
> >
> > >
> > > Cc: Hao A Wu <hao.a.wu@intel.com>
> > > Cc: Marcin Wojtas <mw@semihalf.com>
> > > Cc: Zhichao Gao <zhichao.gao@intel.com>
> > > Cc: Liming Gao <liming.gao@intel.com>
> > >
> > > Mateusz Albecki (2):
> > >   SdMmcPciHcDxe: Send EdkiiSdMmcSwitchClockFreq after SD clock start
> > >   MdeModulePkg/SdMmcPciHcDxe: Add function to start SD clock
> > >
> > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c    |  20 +--
> > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c      |  25 +---
> > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h |  24 ++++
> > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c   | 136
> > > +++++++++++----------
> > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h   |  45 ++-----
> > >  5 files changed, 112 insertions(+), 138 deletions(-)
> > >
> > > --
> > > 2.14.1.windows.1
> >

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

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

Re: [edk2-devel] [PATCH 0/2] MdeModulePkg/SdMmcPciHcDxe: Send the EdkiiSdMmcSwitchClockFreq notification before sending CMD13
Posted by Wu, Hao A 4 years, 3 months ago
Series has been pushed via commits b948a49615..f68cb23c14.

Best Regards,
Hao Wu

> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Wu, Hao A
> Sent: Monday, January 06, 2020 1:19 PM
> To: Marcin Wojtas
> Cc: Albecki, Mateusz; devel@edk2.groups.io; Gao, Zhichao; Gao, Liming; Ard
> Biesheuvel
> Subject: Re: [edk2-devel] [PATCH 0/2] MdeModulePkg/SdMmcPciHcDxe:
> Send the EdkiiSdMmcSwitchClockFreq notification before sending CMD13
> 
> > -----Original Message-----
> > From: Marcin Wojtas [mailto:mw@semihalf.com]
> > Sent: Friday, January 03, 2020 7:05 PM
> > To: Wu, Hao A
> > Cc: Albecki, Mateusz; devel@edk2.groups.io; Gao, Zhichao; Gao, Liming;
> Ard
> > Biesheuvel
> > Subject: Re: [PATCH 0/2] MdeModulePkg/SdMmcPciHcDxe: Send the
> > EdkiiSdMmcSwitchClockFreq notification before sending CMD13
> >
> > Hi,
> >
> > wt., 24 gru 2019 o 03:52 Wu, Hao A <hao.a.wu@intel.com> napisał(a):
> > >
> > > > -----Original Message-----
> > > > From: Albecki, Mateusz
> > > > Sent: Saturday, December 21, 2019 1:13 AM
> > > > To: devel@edk2.groups.io
> > > > Cc: Albecki, Mateusz; Wu, Hao A; Marcin Wojtas; Gao, Zhichao; Gao,
> > Liming
> > > > Subject: [PATCH 0/2] MdeModulePkg/SdMmcPciHcDxe: Send the
> > > > EdkiiSdMmcSwitchClockFreq notification before sending CMD13
> > > >
> > > > The first patch refactors the SdMmcClockSupply function with a goal
> > > > of sending the EdkiiSdMmcSwitchClockFreq notification before we send
> > the
> > > > CMD13 to check the switch status in eMMC init flow. This is required to
> > > > avoid sending the CMD13 on link that still has not been fixed by
> platform.
> > > >
> > > > To avoid changing the driver behavior we avoid sending notifications
> > > > when the clock is setup for the first time or when we setup the clock
> > > > after the voltage switch procedure(adressed in second patch).
> > > >
> > > > The second patch in the series optimizes the SD card detection routine
> > > > to stop it from going through the process of internal clock setup
> > > > after switching the voltage. According to SD HC specification there
> > > > is no need to setup internal clock all over again.
> > > >
> > > > Tests performed:
> > > > - Booted eMMC in HS400 mode on platform which required post clock
> > freq
> > > > fixes
> > > >
> > > > I wasn't able to test SD card yet due to the lack of setup with working
> SD.
> > >
> > >
> > > I performed a quick verification on the eMMC device and SD card on my
> > side.
> > > They work properly after the series.
> > >
> > > So for the series,
> > > Tested-by: Hao A Wu <hao.a.wu@intel.com>
> > >
> >
> > I verified eMMC HS200 / HS@50MHz and SD cards on 2 Armada platforms,
> so:
> > Tested-by: Marcin Wojtas <mw@semihalf.com>
> 
> 
> Thanks for the testing effort.
> I will push the series soon.
> 
> Best Regards,
> Hao Wu
> 
> 
> >
> > Best regards,
> > Marcin
> >
> > >
> > > >
> > > > The patch series is available on github here:
> > > > https://github.com/malbecki/edk2/tree/sdmmc_post_freq_notify
> > >
> > >
> > > Add Ard to the loop to see if there is additional comment.
> > >
> > > Best Regards,
> > > Hao Wu
> > >
> > >
> > > >
> > > > Cc: Hao A Wu <hao.a.wu@intel.com>
> > > > Cc: Marcin Wojtas <mw@semihalf.com>
> > > > Cc: Zhichao Gao <zhichao.gao@intel.com>
> > > > Cc: Liming Gao <liming.gao@intel.com>
> > > >
> > > > Mateusz Albecki (2):
> > > >   SdMmcPciHcDxe: Send EdkiiSdMmcSwitchClockFreq after SD clock
> start
> > > >   MdeModulePkg/SdMmcPciHcDxe: Add function to start SD clock
> > > >
> > > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c    |  20 +--
> > > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c      |  25 +---
> > > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h |  24
> ++++
> > > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c   | 136
> > > > +++++++++++----------
> > > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h   |  45 ++----
> -
> > > >  5 files changed, 112 insertions(+), 138 deletions(-)
> > > >
> > > > --
> > > > 2.14.1.windows.1
> > >
> 
> 


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

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