<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdeModulePkg/Include/Protocol/SdMmcOverride.h, branch master</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-02-23T21:01:28+00:00</updated>
<entry>
<title>MdeModulePkg: Replace include guards with #pragma once</title>
<updated>2026-02-23T21:01:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2026-02-03T18:48:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7a934d0befca7d10f361c76af6d2fcb6eb48c835'/>
<id>urn:sha1:7a934d0befca7d10f361c76af6d2fcb6eb48c835</id>
<content type='text'>
Replace traditional `#ifndef`/`#define`/`#endif` include guards with
`#pragma` once.

`#pragma once` is a widely supported preprocessor directive that
prevents header files from being included multiple times. It is
supported by all toolchains used to build edk2: GCC, Clang/LLVM, and
MSVC.

Compared to macro-based include guards, `#pragma once`:

- Eliminates the risk of macro name collisions or copy/paste errors
  where two headers inadvertently use the same guard macro.
- Eliminate inconsistency in the way include guard macros are named
  (e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.).
- Reduces boilerplate (three lines replaced by one).
- Avoids polluting the macro namespace with guard symbols.
- Can improve build times as the preprocessor can skip re-opening the
  file entirely, rather than re-reading it to find the matching
  `#endif` ("multiple-include optimization").
  - Note that some compilers may already optimize traditional include
    guards, by recognzining the idiomatic pattern.

This change is made acknowledging that overall portability of the
code will technically be reduced, as `#pragma once` is not part of the
C/C++ standards.

However, this is considered acceptable given:

1. edk2 already defines a subset of supported compilers in
   BaseTools/Conf/tools_def.template, all of which have supported
   `#pragma once` for over two decades.
2. There have been concerns raised to the project about inconsistent
   include guard naming and potential macro collisions.

Approximate compiler support dates:

- MSVC: Supported since Visual C++ 4.2 (1996)
- GCC: Supported since 3.4 (2004)
  (http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html)
- Clang (LLVM based): Since initial release in 2007

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Apply uncrustify changes</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2021-12-05T22:54:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1436aea4d5707e672672a11bda72be2c63c936c3'/>
<id>urn:sha1:1436aea4d5707e672672a11bda72be2c63c936c3</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the MdeModulePkg package

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/SdMmcOverride: Add GetOperatingParam notify phase</title>
<updated>2019-07-01T01:19:26+00:00</updated>
<author>
<name>Albecki, Mateusz</name>
<email>mateusz.albecki@intel.com</email>
</author>
<published>2019-06-26T13:10:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=f56cc67f62b25f524d95d77696d9dab5514a798a'/>
<id>urn:sha1:f56cc67f62b25f524d95d77696d9dab5514a798a</id>
<content type='text'>
https://bugzilla.tianocore.org/show_bug.cgi?id=1882

The new notify phase allows platform to configure additional
bus parameters in addition to parameters that can already be configured
with capability override. Specifically we allow to configure bus width,
clock frequency and driver strength. If platform doesn't wish to configure
some of the parameters it can left it on default values and driver will
assume it's standard behavior with respect to those parameters.
The definition of the SD_MMC_BUS_MODE has been extended to
incorporate SD card default speed and high speed.

Tests on Marvell boards were also performed by Marcin Wojtas
&lt;mw@semihalf.com&gt;:

https://edk2.groups.io/g/devel/message/42999

Board 1 (out of tree): SD - OK, MMC - OK
Board 2: (Armada80x0McBin): SD - OK, MMC - OK
Board 3: (Armada70x0Db): SD - problems, MMC - OK

Please note that the problem on Armada70x0Db SD devices are introduced by
adding new types of SD bus modes, a subsequent patch within edk2-platforms
repository will be proposed to address it.
(More details can be referred from the above link.)

Signed-off-by: Mateusz Albecki &lt;mateusz.albecki@intel.com&gt;
Reviewed-by: Hao A Wu &lt;hao.a.wu@intel.com&gt;
Regression-tested-by: Sumit Garg &lt;sumit.garg@linaro.org&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Replace BSD License with BSD+Patent License</title>
<updated>2019-04-09T17:58:08+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2019-04-03T23:05:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9d510e61fceee7b92955ef9a3c20343752d8ce3f'/>
<id>urn:sha1:9d510e61fceee7b92955ef9a3c20343752d8ce3f</id>
<content type='text'>
https://bugzilla.tianocore.org/show_bug.cgi?id=1373

Replace BSD 2-Clause License with BSD+Patent License.  This change is
based on the following emails:

  https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
  https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html

RFCs with detailed process for the license change:

  V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
  V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
  V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Hao Wu &lt;hao.a.wu@intel.com&gt;
Reviewed-by: Jian J Wang &lt;jian.j.wang@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/SdMmcPciHcDxe: Allow overriding base clock frequency</title>
<updated>2018-11-20T05:46:57+00:00</updated>
<author>
<name>Marcin Wojtas</name>
<email>mw@semihalf.com</email>
</author>
<published>2018-11-09T23:01:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7f3b0bad4bbb3cb24014d2e6216615896ea09dbf'/>
<id>urn:sha1:7f3b0bad4bbb3cb24014d2e6216615896ea09dbf</id>
<content type='text'>
Some SdMmc host controllers are run by clocks with different
frequency than it is reflected in Capabilities Register 1.
It is allowed by SDHCI specification ver. 4.2 - if BaseClkFreq
field value of the Capability Register 1 is zero, the clock
frequency must be obtained via another method.

Because the bitfield is only 8 bits wide, a maximum value
that could be obtained from hardware is 255MHz.
In case the actual frequency exceeds 255MHz, the 8-bit BaseClkFreq
member of SD_MMC_HC_SLOT_CAP structure occurs to be not sufficient
to be used for setting the clock speed in SdMmcHcClockSupply
function.

This patch adds new UINT32 array ('BaseClkFreq[]') to
SD_MMC_HC_PRIVATE_DATA structure for specifying
the input clock speed for each slot of the host controller.
All routines that are used for clock configuration are
updated accordingly.

This patch also adds new IN OUT BaseClockFreq field
in the Capability callback of the SdMmcOverride,
protocol which allows to update BaseClkFreq value.

The patch reuses original commit from edk2-platforms:
20f6f144d3a8 ("Marvell/Drivers: XenonDxe: Allow overriding base clock
frequency")

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marcin Wojtas &lt;mw@semihalf.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Reviewed-by: Hao Wu &lt;hao.a.wu@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/SdMmcPciHcDxe: Add SwitchClockFreqPost to SdMmcOverride</title>
<updated>2018-11-20T05:46:57+00:00</updated>
<author>
<name>Tomasz Michalec</name>
<email>tm@semihalf.com</email>
</author>
<published>2018-11-09T23:01:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=b7b803a6d594568d292907a1c8052871488a1a4f'/>
<id>urn:sha1:b7b803a6d594568d292907a1c8052871488a1a4f</id>
<content type='text'>
Some SD Host Controlers need to do additional operations after clock
frequency switch.

This patch add new callback type to NotifyPhase of the SdMmcOverride
protocol. It is called after SdMmcHcClockSupply.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marcin Wojtas &lt;mw@semihalf.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Reviewed-by: Hao Wu &lt;hao.a.wu@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/SdMmcPciHcDxe: Add UhsSignaling to SdMmcOverride protocol</title>
<updated>2018-11-20T05:46:57+00:00</updated>
<author>
<name>Tomasz Michalec</name>
<email>tm@semihalf.com</email>
</author>
<published>2018-11-09T23:01:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=a4708009ccd7e1c8ea4df36e733ba057bac9735d'/>
<id>urn:sha1:a4708009ccd7e1c8ea4df36e733ba057bac9735d</id>
<content type='text'>
Some SD Host Controllers use different values in Host Control 2 Register
to select UHS Mode. This patch adds a new UhsSignaling type routine to
the NotifyPhase of the SdMmcOverride protocol.

UHS signaling configuration is moved to a common, default routine
(SdMmcHcUhsSignaling). After it is executed, the protocol producer
can override the values if needed.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marcin Wojtas &lt;mw@semihalf.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Reviewed-by: Hao Wu &lt;hao.a.wu@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/SdMmcPciHcDxe: Add an optional parameter in NotifyPhase</title>
<updated>2018-11-20T05:46:57+00:00</updated>
<author>
<name>Marcin Wojtas</name>
<email>mw@semihalf.com</email>
</author>
<published>2018-11-09T23:01:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=49c995342543882b85e1278cb0098aa21fa52302'/>
<id>urn:sha1:49c995342543882b85e1278cb0098aa21fa52302</id>
<content type='text'>
In order to ensure bigger flexibility in the NotifyPhase
routine of the SdMmcOverride protocol, enable using an
optional phase-specific data. This will allow to exchange
more information between the protocol producer driver
and SdMmcPciHcDxe in the newly added callbacks.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marcin Wojtas &lt;mw@semihalf.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Reviewed-by: Hao Wu &lt;hao.a.wu@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: introduce SD/MMC override protocol</title>
<updated>2018-01-30T09:25:13+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ard.biesheuvel@linaro.org</email>
</author>
<published>2017-12-07T22:43:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c7be0dd5b9367d6a17460ff0ace376d827f70143'/>
<id>urn:sha1:c7be0dd5b9367d6a17460ff0ace376d827f70143</id>
<content type='text'>
Many ARM based SoCs have integrated SDHCI controllers, and often,
these implementations deviate in subtle ways from the pertinent
specifications. On the one hand, these deviations are quite easy
to work around, but on the other hand, having a collection of SoC
specific workarounds in the generic driver stack is undesirable.

So let's introduce an optional SD/MMC override protocol that we
can invoke at the appropriate moments in the device initialization.
That way, the workaround itself remains platform specific, but we
can still use the generic driver stack on such platforms.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Reviewed-by: Hao Wu &lt;hao.a.wu@intel.com&gt;
​Reviewed-by: Star Zeng &lt;star.zeng@intel.com&gt;
</content>
</entry>
</feed>
