[edk2-devel] [PATCH V5 1/1] EmbeddedPkg: DwMmcHcDxe: Add support for Designware SDMMC driver

Loh, Tien Hock tien.hock.loh at intel.com
Thu Apr 29 00:33:22 UTC 2021


Andrew, Ard,

In that case then I will update the patch to address Mike’s concerns and send a new version up.

Thanks!

From: Andrew Fish <afish at apple.com>
Sent: Wednesday, April 28, 2021 10:58 PM
To: Ard Biesheuvel <ardb at kernel.org>
Cc: Kinney, Michael D <michael.d.kinney at intel.com>; edk2-devel-groups-io <devel at edk2.groups.io>; Loh, Tien Hock <tien.hock.loh at intel.com>; thloh85 at gmail.com; Leif Lindholm <leif at nuviainc.com>; Ard Biesheuvel <ardb+tianocore at kernel.org>
Subject: Re: [edk2-devel] [PATCH V5 1/1] EmbeddedPkg: DwMmcHcDxe: Add support for Designware SDMMC driver




On Apr 28, 2021, at 6:03 AM, Ard Biesheuvel <ardb at kernel.org<mailto:ardb at kernel.org>> wrote:

On Tue, 27 Apr 2021 at 21:31, Kinney, Michael D
<michael.d.kinney at intel.com<mailto:michael.d.kinney at intel.com>> wrote:


This is an example of another approach.  This module uses PCI I/O or IoLib based on the type of device.



https://github.com/tianocore/edk2/tree/master/MdeModulePkg/Bus/Pci/PciSioSerialDxe



No additional protocols or lib classes/instances.  Instead, the register access APIs are included in the module and based on the type of device detected, it uses PCI I/O or IoLib:



https://github.com/tianocore/edk2/blob/5b90b8abb4049e2d98040f548ad23b6ab22d5d19/MdeModulePkg/Bus/Pci/PciSioSerialDxe/SerialIo.c#L1327

https://github.com/tianocore/edk2/blob/5b90b8abb4049e2d98040f548ad23b6ab22d5d19/MdeModulePkg/Bus/Pci/PciSioSerialDxe/SerialIo.c#L1358



This technique could for PCI I/O vs MMIO register access.  You would need to add more APIs for the use of PCI I/O or DmaLib for DMA access.

Is it really worth the effort to rewrite this code?

This patch has been circulating for a while now, and I fail to see the
point of refactoring and splitting up this code, given how unlikely it
is that DesignWare will ever put a real PCI frontend on this IP. The
SD/MMC override protocol was intended for implementations that are
almost SDHCI compliant, but have some quirks that need to be worked
around.

Ard,

If we don’t see any potential value for making it more portable I’m OK with going with the current patch style.

Thanks,

Andrew Fish


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#74585): https://edk2.groups.io/g/devel/message/74585
Mute This Topic: https://groups.io/mt/81516685/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20210429/33ab7077/attachment.htm>


More information about the edk2-devel-archive mailing list