From: Marcin Wojtas <mw@semihalf.com>
To: edk2-devel@lists.01.org
Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org,
nadavh@marvell.com, neta@marvell.com, kostap@marvell.com,
jinghua@marvell.com, mw@semihalf.com, jsd@semihalf.com,
ka@semihalf.com
Subject: [platforms: PATCH v3 4/7] Marvell/Drivers: Reorganize Spi drivers
Date: Fri, 8 Dec 2017 15:57:34 +0100 [thread overview]
Message-ID: <1512745057-19038-5-git-send-email-mw@semihalf.com> (raw)
In-Reply-To: <1512745057-19038-1-git-send-email-mw@semihalf.com>
Hitherto MvSpiDxe driver name was very generic. In order to
be ready for adding new SPI master drivers, use the controller's
traditional name (it's called SPI Orion in Linux and
U-Boot) for files and the entry point.
Additionally, move the files to new 'MvSpiOrionDxe' directory
and rename the 'Devices' and 'Variables' to reflect actual drivers'
names. Change MvSpiFlash to MvSpiFlashDxe in order to be
more consistent. On the occasion add sorting in the .inf files.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf | 6 +++---
Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc | 6 +++---
Silicon/Marvell/Drivers/Spi/{Variables => MvFvbDxe}/MvFvbDxe.c | 0
Silicon/Marvell/Drivers/Spi/{Variables => MvFvbDxe}/MvFvbDxe.h | 0
Silicon/Marvell/Drivers/Spi/{Variables => MvFvbDxe}/MvFvbDxe.inf | 0
Silicon/Marvell/Drivers/Spi/{Devices/MvSpiFlash.c => MvSpiFlashDxe/MvSpiFlashDxe.c} | 2 +-
Silicon/Marvell/Drivers/Spi/{Devices/MvSpiFlash.h => MvSpiFlashDxe/MvSpiFlashDxe.h} | 0
Silicon/Marvell/Drivers/Spi/{Devices/MvSpiFlash.inf => MvSpiFlashDxe/MvSpiFlashDxe.inf} | 14 +++++++-------
Silicon/Marvell/Drivers/Spi/{MvSpiDxe.c => MvSpiOrionDxe/MvSpiOrionDxe.c} | 4 ++--
Silicon/Marvell/Drivers/Spi/{MvSpiDxe.h => MvSpiOrionDxe/MvSpiOrionDxe.h} | 0
Silicon/Marvell/Drivers/Spi/{MvSpiDxe.inf => MvSpiOrionDxe/MvSpiOrionDxe.inf} | 20 ++++++++++----------
11 files changed, 26 insertions(+), 26 deletions(-)
rename Silicon/Marvell/Drivers/Spi/{Variables => MvFvbDxe}/MvFvbDxe.c (100%)
rename Silicon/Marvell/Drivers/Spi/{Variables => MvFvbDxe}/MvFvbDxe.h (100%)
rename Silicon/Marvell/Drivers/Spi/{Variables => MvFvbDxe}/MvFvbDxe.inf (100%)
rename Silicon/Marvell/Drivers/Spi/{Devices/MvSpiFlash.c => MvSpiFlashDxe/MvSpiFlashDxe.c} (95%)
rename Silicon/Marvell/Drivers/Spi/{Devices/MvSpiFlash.h => MvSpiFlashDxe/MvSpiFlashDxe.h} (100%)
rename Silicon/Marvell/Drivers/Spi/{Devices/MvSpiFlash.inf => MvSpiFlashDxe/MvSpiFlashDxe.inf} (93%)
rename Silicon/Marvell/Drivers/Spi/{MvSpiDxe.c => MvSpiOrionDxe/MvSpiOrionDxe.c} (95%)
rename Silicon/Marvell/Drivers/Spi/{MvSpiDxe.h => MvSpiOrionDxe/MvSpiOrionDxe.h} (100%)
rename Silicon/Marvell/Drivers/Spi/{MvSpiDxe.inf => MvSpiOrionDxe/MvSpiOrionDxe.inf} (91%)
diff --git a/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf b/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf
index 3b0646e..cdd2088 100644
--- a/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf
+++ b/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf
@@ -110,12 +110,12 @@ FvNameGuid = 5eda4200-2c5f-43cb-9da3-0baf74b1b30c
INF Silicon/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.inf
INF MdeModulePkg/Bus/I2c/I2cDxe/I2cDxe.inf
INF Silicon/Marvell/Drivers/I2c/Devices/MvEeprom/MvEeprom.inf
- INF Silicon/Marvell/Drivers/Spi/MvSpiDxe.inf
- INF Silicon/Marvell/Drivers/Spi/Devices/MvSpiFlash.inf
+ INF Silicon/Marvell/Drivers/Spi/MvSpiOrionDxe/MvSpiOrionDxe.inf
+ INF Silicon/Marvell/Drivers/Spi/MvSpiFlashDxe/MvSpiFlashDxe.inf
INF Silicon/Marvell/Armada7k8k/Drivers/Armada7k8kRngDxe/Armada7k8kRngDxe.inf
# Variable services
- INF Silicon/Marvell/Drivers/Spi/Variables/MvFvbDxe.inf
+ INF Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.inf
INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
index 7d87766..0de8621 100644
--- a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
+++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
@@ -411,8 +411,8 @@
Silicon/Marvell/Drivers/I2c/MvI2cDxe/MvI2cDxe.inf
MdeModulePkg/Bus/I2c/I2cDxe/I2cDxe.inf
Silicon/Marvell/Drivers/I2c/Devices/MvEeprom/MvEeprom.inf
- Silicon/Marvell/Drivers/Spi/MvSpiDxe.inf
- Silicon/Marvell/Drivers/Spi/Devices/MvSpiFlash.inf
+ Silicon/Marvell/Drivers/Spi/MvSpiOrionDxe/MvSpiOrionDxe.inf
+ Silicon/Marvell/Drivers/Spi/MvSpiFlashDxe/MvSpiFlashDxe.inf
Silicon/Marvell/Armada7k8k/Drivers/Armada7k8kRngDxe/Armada7k8kRngDxe.inf
# Network support
@@ -493,7 +493,7 @@
#
# Variable services
#
- Silicon/Marvell/Drivers/Spi/Variables/MvFvbDxe.inf
+ Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.inf
MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf {
<LibraryClasses>
diff --git a/Silicon/Marvell/Drivers/Spi/Variables/MvFvbDxe.c b/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c
similarity index 100%
rename from Silicon/Marvell/Drivers/Spi/Variables/MvFvbDxe.c
rename to Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c
diff --git a/Silicon/Marvell/Drivers/Spi/Variables/MvFvbDxe.h b/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.h
similarity index 100%
rename from Silicon/Marvell/Drivers/Spi/Variables/MvFvbDxe.h
rename to Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.h
diff --git a/Silicon/Marvell/Drivers/Spi/Variables/MvFvbDxe.inf b/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.inf
similarity index 100%
rename from Silicon/Marvell/Drivers/Spi/Variables/MvFvbDxe.inf
rename to Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.inf
diff --git a/Silicon/Marvell/Drivers/Spi/Devices/MvSpiFlash.c b/Silicon/Marvell/Drivers/Spi/MvSpiFlashDxe/MvSpiFlashDxe.c
similarity index 95%
rename from Silicon/Marvell/Drivers/Spi/Devices/MvSpiFlash.c
rename to Silicon/Marvell/Drivers/Spi/MvSpiFlashDxe/MvSpiFlashDxe.c
index 6886d01..a2ce975 100755
--- a/Silicon/Marvell/Drivers/Spi/Devices/MvSpiFlash.c
+++ b/Silicon/Marvell/Drivers/Spi/MvSpiFlashDxe/MvSpiFlashDxe.c
@@ -31,7 +31,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/
-#include "MvSpiFlash.h"
+#include "MvSpiFlashDxe.h"
STATIC EFI_EVENT mMvSpiFlashVirtualAddrChangeEvent;
MARVELL_SPI_MASTER_PROTOCOL *SpiMasterProtocol;
diff --git a/Silicon/Marvell/Drivers/Spi/Devices/MvSpiFlash.h b/Silicon/Marvell/Drivers/Spi/MvSpiFlashDxe/MvSpiFlashDxe.h
similarity index 100%
rename from Silicon/Marvell/Drivers/Spi/Devices/MvSpiFlash.h
rename to Silicon/Marvell/Drivers/Spi/MvSpiFlashDxe/MvSpiFlashDxe.h
diff --git a/Silicon/Marvell/Drivers/Spi/Devices/MvSpiFlash.inf b/Silicon/Marvell/Drivers/Spi/MvSpiFlashDxe/MvSpiFlashDxe.inf
similarity index 93%
rename from Silicon/Marvell/Drivers/Spi/Devices/MvSpiFlash.inf
rename to Silicon/Marvell/Drivers/Spi/MvSpiFlashDxe/MvSpiFlashDxe.inf
index bc88a7e..20939bf 100644
--- a/Silicon/Marvell/Drivers/Spi/Devices/MvSpiFlash.inf
+++ b/Silicon/Marvell/Drivers/Spi/MvSpiFlashDxe/MvSpiFlashDxe.inf
@@ -31,15 +31,15 @@
[Defines]
INF_VERSION = 0x00010005
- BASE_NAME = SpiFlashDxe
+ BASE_NAME = MvSpiFlashDxe
FILE_GUID = 49d7fb74-306d-42bd-94c8-c0c54b181dd7
MODULE_TYPE = DXE_RUNTIME_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = MvSpiFlashEntryPoint
[Sources]
- MvSpiFlash.c
- MvSpiFlash.h
+ MvSpiFlashDxe.c
+ MvSpiFlashDxe.h
[Packages]
EmbeddedPkg/EmbeddedPkg.dec
@@ -47,21 +47,21 @@
Silicon/Marvell/Marvell.dec
[LibraryClasses]
+ DebugLib
+ MemoryAllocationLib
NorFlashInfoLib
+ TimerLib
UefiBootServicesTableLib
UefiDriverEntryPoint
- TimerLib
UefiLib
- DebugLib
- MemoryAllocationLib
UefiRuntimeLib
[Guids]
gEfiEventVirtualAddressChangeGuid
[Protocols]
- gMarvellSpiMasterProtocolGuid
gMarvellSpiFlashProtocolGuid
+ gMarvellSpiMasterProtocolGuid
[Depex]
#
diff --git a/Silicon/Marvell/Drivers/Spi/MvSpiDxe.c b/Silicon/Marvell/Drivers/Spi/MvSpiOrionDxe/MvSpiOrionDxe.c
similarity index 95%
rename from Silicon/Marvell/Drivers/Spi/MvSpiDxe.c
rename to Silicon/Marvell/Drivers/Spi/MvSpiOrionDxe/MvSpiOrionDxe.c
index bab6cf4..cbf403f 100755
--- a/Silicon/Marvell/Drivers/Spi/MvSpiDxe.c
+++ b/Silicon/Marvell/Drivers/Spi/MvSpiOrionDxe/MvSpiOrionDxe.c
@@ -31,7 +31,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/
-#include "MvSpiDxe.h"
+#include "MvSpiOrionDxe.h"
SPI_MASTER *mSpiMasterInstance;
@@ -399,7 +399,7 @@ SpiMasterInitProtocol (
EFI_STATUS
EFIAPI
-SpiMasterEntryPoint (
+MvSpiOrionEntryPoint (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
diff --git a/Silicon/Marvell/Drivers/Spi/MvSpiDxe.h b/Silicon/Marvell/Drivers/Spi/MvSpiOrionDxe/MvSpiOrionDxe.h
similarity index 100%
rename from Silicon/Marvell/Drivers/Spi/MvSpiDxe.h
rename to Silicon/Marvell/Drivers/Spi/MvSpiOrionDxe/MvSpiOrionDxe.h
diff --git a/Silicon/Marvell/Drivers/Spi/MvSpiDxe.inf b/Silicon/Marvell/Drivers/Spi/MvSpiOrionDxe/MvSpiOrionDxe.inf
similarity index 91%
rename from Silicon/Marvell/Drivers/Spi/MvSpiDxe.inf
rename to Silicon/Marvell/Drivers/Spi/MvSpiOrionDxe/MvSpiOrionDxe.inf
index e7bc170..4779371 100644
--- a/Silicon/Marvell/Drivers/Spi/MvSpiDxe.inf
+++ b/Silicon/Marvell/Drivers/Spi/MvSpiOrionDxe/MvSpiOrionDxe.inf
@@ -31,15 +31,15 @@
[Defines]
INF_VERSION = 0x00010005
- BASE_NAME = SpiMasterDxe
+ BASE_NAME = MvSpiOrionDxe
FILE_GUID = c19dbc8a-f4f9-43b0-aee5-802e3ed03d15
MODULE_TYPE = DXE_RUNTIME_DRIVER
VERSION_STRING = 1.0
- ENTRY_POINT = SpiMasterEntryPoint
+ ENTRY_POINT = MvSpiOrionEntryPoint
[Sources]
- MvSpiDxe.c
- MvSpiDxe.h
+ MvSpiOrionDxe.c
+ MvSpiOrionDxe.h
[Packages]
EmbeddedPkg/EmbeddedPkg.dec
@@ -47,21 +47,21 @@
Silicon/Marvell/Marvell.dec
[LibraryClasses]
+ DebugLib
+ DxeServicesTableLib
+ IoLib
+ MemoryAllocationLib
NorFlashInfoLib
+ TimerLib
UefiBootServicesTableLib
UefiDriverEntryPoint
- TimerLib
UefiLib
- DebugLib
- DxeServicesTableLib
- MemoryAllocationLib
- IoLib
UefiRuntimeLib
[FixedPcd]
- gMarvellTokenSpaceGuid.PcdSpiRegBase
gMarvellTokenSpaceGuid.PcdSpiClockFrequency
gMarvellTokenSpaceGuid.PcdSpiMaxFrequency
+ gMarvellTokenSpaceGuid.PcdSpiRegBase
[Protocols]
gMarvellSpiMasterProtocolGuid
--
2.7.4
next prev parent reply other threads:[~2017-12-08 14:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-08 14:57 [platforms: PATCH v3 0/7] Armada 7k/8k files reorganization Marcin Wojtas
2017-12-08 14:57 ` [platforms: PATCH v3 1/7] Marvell: Reorganize file structure Marcin Wojtas
2017-12-08 14:57 ` [platforms: PATCH v3 2/7] Marvell/Armada7k8k: Use '7k8k' prefix in the SoC drivers/libraries Marcin Wojtas
2017-12-08 14:57 ` [platforms: PATCH v3 3/7] Marvell/Armada70x0Db: Rename fd file Marcin Wojtas
2017-12-08 14:57 ` Marcin Wojtas [this message]
2017-12-08 14:57 ` [platforms: PATCH v3 5/7] Marvell/Drivers: Modify MvPhyDxe location Marcin Wojtas
2017-12-08 14:57 ` [platforms: PATCH v3 6/7] Marvell/Drivers: Modify location and rename the MvEeprom driver Marcin Wojtas
2017-12-08 14:57 ` [platforms: PATCH v3 7/7] Marvell/Drivers: Drop 'PciEmulation' naming Marcin Wojtas
2017-12-08 15:33 ` [platforms: PATCH v3 0/7] Armada 7k/8k files reorganization Ard Biesheuvel
2017-12-08 15:54 ` Marcin Wojtas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1512745057-19038-5-git-send-email-mw@semihalf.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox