From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c0b::244; helo=mail-it0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::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 CF1D1221EA0C8 for ; Thu, 7 Dec 2017 11:43:38 -0800 (PST) Received: by mail-it0-x244.google.com with SMTP id 68so17076455ite.4 for ; Thu, 07 Dec 2017 11:48:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=PKDh9qdQ/hMSA/bAbG+JoCnD8jzZhkUNHGsDhNEv0Dc=; b=BBUiZ5jA2dOnssUez9AqCkE7fOLn4A7Y2gmm2TVFd5QH8q09DWceXnPXUXLQB1zZhL 6drM2e4IKHuWBVyi55x30FuWf2gZRF9RCsfsmP2tgv1UxEi1K4EBGesFvXqOQwfwUI6i RdVD0k3LVrq8xXy92eo7GKq6v46XAJLrIYhgE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PKDh9qdQ/hMSA/bAbG+JoCnD8jzZhkUNHGsDhNEv0Dc=; b=etOuixusw+aCMK/0VhAtfm+DXeA8BGTRvmSHXOv24kKR8ftQzmc77+Fvb4d5qAjZUc SUIV3EeK2oZNVSBa3EOvbSxpeOT0IxhBbVV816Aw4cF50UafhENoCKVIxvPWN8B6GzJg /ATAsHzafkopQ0IJSVtR4EEINcU0yguGF8QSXyEVuH/XMl7fhqsZSESlCtpo+UhaMxn7 M8bGO1oNH0e25TGbNRt7G3R1fnBZDIel3TmqMV6kWtFw6/GbYlsk2c7nxYrg3bT5Bfad Tqk+RoM7PpFLeTGsIc9LlfCF5MhkDaArp/jZU8HVMQ+AFCi946M6qHYEcgls2P0iRXhl z9iw== X-Gm-Message-State: AKGB3mJae85EqHeztSsTh9BXOVLBaUDfl1YoJzJCi7Iw7tumg3VWmfMV MHCoPmGgBmeoXog6KvaZ4y0vcMksoosLs8bIbFDVvA== X-Google-Smtp-Source: AGs4zMbShTal7Lq43ZWJ2rpsH1JoJCMG32drDZP2v9ioju8/DYWjGK7e39L8EDpt2H3hJsaPVi0SyW2XTentnKxz7Gk= X-Received: by 10.36.145.203 with SMTP id i194mr2761911ite.73.1512676091379; Thu, 07 Dec 2017 11:48:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.104.16 with HTTP; Thu, 7 Dec 2017 11:48:10 -0800 (PST) In-Reply-To: <1512674434-32326-5-git-send-email-mw@semihalf.com> References: <1512674434-32326-1-git-send-email-mw@semihalf.com> <1512674434-32326-5-git-send-email-mw@semihalf.com> From: Ard Biesheuvel Date: Thu, 7 Dec 2017 19:48:10 +0000 Message-ID: To: Marcin Wojtas Cc: "edk2-devel@lists.01.org" , Leif Lindholm , Nadav Haklai , Neta Zur Hershkovits , Kostya Porotchkin , Hua Jing , =?UTF-8?B?SmFuIETEhWJyb8Wb?= , ka@semihalf.com Subject: Re: [platforms: PATCH v2 4/5] Marvell/Drivers: Rename SPI master driver 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: Thu, 07 Dec 2017 19:43:39 -0000 Content-Type: text/plain; charset="UTF-8" Hi Marcin, On 7 December 2017 at 19:20, Marcin Wojtas wrote: > Hitherto 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 'Controllers' directory, > which is paralel to existing 'Devices' and 'Variables', so > that to make the separation more clear. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Marcin Wojtas > --- > Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf | 2 +- > Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc | 2 +- > Silicon/Marvell/Drivers/Spi/{MvSpiDxe.c => Controllers/MvSpiOrionDxe.c} | 4 ++-- > Silicon/Marvell/Drivers/Spi/{MvSpiDxe.h => Controllers/MvSpiOrionDxe.h} | 0 > Silicon/Marvell/Drivers/Spi/{MvSpiDxe.inf => Controllers/MvSpiOrionDxe.inf} | 8 ++++---- > 5 files changed, 8 insertions(+), 8 deletions(-) > rename Silicon/Marvell/Drivers/Spi/{MvSpiDxe.c => Controllers/MvSpiOrionDxe.c} (95%) > rename Silicon/Marvell/Drivers/Spi/{MvSpiDxe.h => Controllers/MvSpiOrionDxe.h} (100%) > rename Silicon/Marvell/Drivers/Spi/{MvSpiDxe.inf => Controllers/MvSpiOrionDxe.inf} (92%) I think this is not entirely correct. With these patches applied, we have Silicon/Marvell/Drivers/Spi/Variables Silicon/Marvell/Drivers/Spi/Variables/MvFvbDxe.h Silicon/Marvell/Drivers/Spi/Variables/MvFvbDxe.inf Silicon/Marvell/Drivers/Spi/Variables/MvFvbDxe.c Silicon/Marvell/Drivers/Spi/Devices Silicon/Marvell/Drivers/Spi/Devices/MvSpiFlash.h Silicon/Marvell/Drivers/Spi/Devices/MvSpiFlash.c Silicon/Marvell/Drivers/Spi/Devices/MvSpiFlash.inf Silicon/Marvell/Drivers/Spi/Controllers Silicon/Marvell/Drivers/Spi/Controllers/MvSpiOrionDxe.h Silicon/Marvell/Drivers/Spi/Controllers/MvSpiOrionDxe.inf Silicon/Marvell/Drivers/Spi/Controllers/MvSpiOrionDxe.c where each directory is named as if it could contain multiple drivers, but given that each driver belongs in its own directory, we are missing one directory level. To be honest (but I will let Leif comment as well), I think you can remove the Variables/Devices/Controllers distinction, and just have Silicon/Marvell/Drivers/Spi/MvFvbDxe Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.h Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.inf Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c Silicon/Marvell/Drivers/Spi/MvSpiFlash Silicon/Marvell/Drivers/Spi/MvSpiFlash/MvSpiFlash.h Silicon/Marvell/Drivers/Spi/MvSpiFlash/MvSpiFlash.c Silicon/Marvell/Drivers/Spi/MvSpiFlash/MvSpiFlash.inf Silicon/Marvell/Drivers/Spi/MvSpiOrionDxe Silicon/Marvell/Drivers/Spi/MvSpiOrionDxe/MvSpiOrionDxe.h Silicon/Marvell/Drivers/Spi/MvSpiOrionDxe/MvSpiOrionDxe.inf Silicon/Marvell/Drivers/Spi/MvSpiOrionDxe/MvSpiOrionDxe.c > > diff --git a/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf b/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf > index 3b0646e..6d57b9a 100644 > --- a/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf > +++ b/Platform/Marvell/Armada70x0Db/Armada70x0Db.fdf > @@ -110,7 +110,7 @@ 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/Controllers/MvSpiOrionDxe.inf > INF Silicon/Marvell/Drivers/Spi/Devices/MvSpiFlash.inf > INF Silicon/Marvell/Armada7k8k/Drivers/Armada7k8kRngDxe/Armada7k8kRngDxe.inf > > diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc > index 7d87766..0eb3ef3 100644 > --- a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc > +++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc > @@ -411,7 +411,7 @@ > 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/Controllers/MvSpiOrionDxe.inf > Silicon/Marvell/Drivers/Spi/Devices/MvSpiFlash.inf > Silicon/Marvell/Armada7k8k/Drivers/Armada7k8kRngDxe/Armada7k8kRngDxe.inf > > diff --git a/Silicon/Marvell/Drivers/Spi/MvSpiDxe.c b/Silicon/Marvell/Drivers/Spi/Controllers/MvSpiOrionDxe.c > similarity index 95% > rename from Silicon/Marvell/Drivers/Spi/MvSpiDxe.c > rename to Silicon/Marvell/Drivers/Spi/Controllers/MvSpiOrionDxe.c > index bab6cf4..c657daf 100755 > --- a/Silicon/Marvell/Drivers/Spi/MvSpiDxe.c > +++ b/Silicon/Marvell/Drivers/Spi/Controllers/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 ( > +SpiOrionEntryPoint ( > IN EFI_HANDLE ImageHandle, > IN EFI_SYSTEM_TABLE *SystemTable > ) > diff --git a/Silicon/Marvell/Drivers/Spi/MvSpiDxe.h b/Silicon/Marvell/Drivers/Spi/Controllers/MvSpiOrionDxe.h > similarity index 100% > rename from Silicon/Marvell/Drivers/Spi/MvSpiDxe.h > rename to Silicon/Marvell/Drivers/Spi/Controllers/MvSpiOrionDxe.h > diff --git a/Silicon/Marvell/Drivers/Spi/MvSpiDxe.inf b/Silicon/Marvell/Drivers/Spi/Controllers/MvSpiOrionDxe.inf > similarity index 92% > rename from Silicon/Marvell/Drivers/Spi/MvSpiDxe.inf > rename to Silicon/Marvell/Drivers/Spi/Controllers/MvSpiOrionDxe.inf > index e7bc170..3f85b40 100644 > --- a/Silicon/Marvell/Drivers/Spi/MvSpiDxe.inf > +++ b/Silicon/Marvell/Drivers/Spi/Controllers/MvSpiOrionDxe.inf > @@ -31,15 +31,15 @@ > > [Defines] > INF_VERSION = 0x00010005 > - BASE_NAME = SpiMasterDxe > + BASE_NAME = SpiOrionDxe > FILE_GUID = c19dbc8a-f4f9-43b0-aee5-802e3ed03d15 > MODULE_TYPE = DXE_RUNTIME_DRIVER > VERSION_STRING = 1.0 > - ENTRY_POINT = SpiMasterEntryPoint > + ENTRY_POINT = SpiOrionEntryPoint > > [Sources] > - MvSpiDxe.c > - MvSpiDxe.h > + MvSpiOrionDxe.c > + MvSpiOrionDxe.h > > [Packages] > EmbeddedPkg/EmbeddedPkg.dec > -- > 2.7.4 >