From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:4010:c07::244; helo=mail-lf0-x244.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-lf0-x244.google.com (mail-lf0-x244.google.com [IPv6:2a00:1450:4010:c07::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D1E262217CE47 for ; Fri, 8 Dec 2017 06:53:25 -0800 (PST) Received: by mail-lf0-x244.google.com with SMTP id f18so12158248lfg.8 for ; Fri, 08 Dec 2017 06:58:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2DhJOko2jZgCtTc0Wf6rrHdjPGpwLb/V1kHxBjn8mGo=; b=0LJ0mavyEkdvizbtSPMJSqy0BZgm1alBrkEn2e0Cu3SAkLIpLKLvfsQsLO/lC2+yNm xY9uJdk2iABly7IEhZyJ9EOc5dm/tCCDjtRVh43XTg+n4k2ZWj/xM0NhlDOeFPNgc1K2 EzQUHHjFUCWViSB3gvpCW2+HDyWJnrnwo9928aHDu5JubLHJxhIJX1a2wukQLtDI/ehu T3E1bIrAcs7WFkSDFn7872ycs10XstFk/KRSqw7O0x7tpsWjP5u9FBpromB8tGfVDw6B TP4VDsgk5+TP8pLr1MqY2UqCQ6bnlZX2EecuEN8cMV3i01k0MYYKJG+y4ut73H/bJ/cx hiLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2DhJOko2jZgCtTc0Wf6rrHdjPGpwLb/V1kHxBjn8mGo=; b=G9KOuBmh/DRJbbnxjNQRV6s89cgx6LOyWl463CFHkQZ+o0HKO9sWgy8fsrvkBBQ/Bw CbjKKPV6FHrfJJyZa5t8GKO/25QLRmN92fxUrqw9e+GBHlGKbzI47kjLEJdrTkFc1dJT ThVKkPw/JVvLrZAdmQML/69jSaFhlRC9jm4ia14GKRrHWDJb3AqA0Vs6u91K3ZPHnWqZ RRocGlIGPkWuWz8GWP1XU4Km2zOnyWAxD6TZx5QxIMX9wZ8p7+CnnUVqAMBGdO1cnODP 0zBEiasPU4Y0V3JFcBA3YKiVKl17LaWte4OA44ACQMyGNqahMLxNrUqF5iHCX9mg5jvZ XMnw== X-Gm-Message-State: AJaThX65K/5A5d54tHjyCP2mUYIVdtnEJzq4gkOjyn+QTMQbjtRI9sea v7sPdd2+VOlYwH0KlutoF+5DQi7GnWU= X-Google-Smtp-Source: AGs4zMZzwDfJKLbhgxUQlDRwUjsvFDFa1PEq5weQXRi2z5+yhahW4DOaCdxqDinoltPSKnVIdwhd5Q== X-Received: by 10.46.101.141 with SMTP id e13mr15797817ljf.127.1512745078092; Fri, 08 Dec 2017 06:57:58 -0800 (PST) Received: from gilgamesh.semihalf.com (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id e16sm1500011lja.29.2017.12.08.06.57.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Dec 2017 06:57:57 -0800 (PST) From: Marcin Wojtas 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 Date: Fri, 8 Dec 2017 15:57:34 +0100 Message-Id: <1512745057-19038-5-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512745057-19038-1-git-send-email-mw@semihalf.com> References: <1512745057-19038-1-git-send-email-mw@semihalf.com> Subject: [platforms: PATCH v3 4/7] Marvell/Drivers: Reorganize Spi drivers X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 14:53:26 -0000 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 --- 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 { 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