From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::243; helo=mail-wr0-x243.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (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 89748210DBE9F for ; Mon, 18 Jun 2018 09:50:31 -0700 (PDT) Received: by mail-wr0-x243.google.com with SMTP id d8-v6so17584464wro.4 for ; Mon, 18 Jun 2018 09:50:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/Y4hdw48iqMtImLwh+QU0JtR3ExGrwkd88yFAfpTqrU=; b=br26iK3xHyYFEteuO+fNQo+GYBprySBJNXCs8rHwG4wOsA9kbzSBMjpPTuBWOsndaG i0EDOkvOlPpuocPr1RCwhwviW5haMKR/R838l38WaS/GuA+brpoah98aruW52ocpkrty 6jRDzOThaLHQgrQ2T3EPcyYTSSdnyGzWcvhuA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/Y4hdw48iqMtImLwh+QU0JtR3ExGrwkd88yFAfpTqrU=; b=nuyGTZu9OeM6WtEHQ9h1w31aMvL3YC7WmedsQ5gDKZSqSQgIWvraOzaezy1VIfuAw3 6fP9HyEbhxQ5ti5iUwdgHw8QVEEJgqj6q+uDrpg5fQCIPJnsR1xJs3EkQtHoV2/B3ieG jzHAXHg8l3HQd0Qp2FYg/uY+UfEcSTDNF0+ImVb9DbFihx/NxMyjEC61+s2upQl8B/Tb HBW+NdvP/pKQLwGwoS+2ToikptrsVxR0FuVrxc76ydy7Zdw07Ecjt3La7VI5wKt+t4LO htaSr3Lw2sF2f1SWZZLS0kLX1YBAqGIvUp081yEr5k/DKDfj+s8RZzZxdT/SW/bezWEh Ct1w== X-Gm-Message-State: APt69E3FI19YjVCRt9mJA+nwuQa4ppi75py8+4RnadlX2WHkFkrZzx3i kZEV4jZ2J31lURReRIjTWW5JhA== X-Google-Smtp-Source: ADUXVKID4vKsSbUhguKf392i/pHrd2uGawACTl/laZOOvDPbLC16xMK0Dsc8OT+7TS+0WEF53C6ZJw== X-Received: by 2002:adf:a706:: with SMTP id c6-v6mr11513463wrd.61.1529340629899; Mon, 18 Jun 2018 09:50:29 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id 203-v6sm11151517wmp.23.2018.06.18.09.50.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 09:50:28 -0700 (PDT) Date: Mon, 18 Jun 2018 17:50:27 +0100 From: Leif Lindholm To: Marcin Wojtas Cc: edk2-devel@lists.01.org, ard.biesheuvel@linaro.org, nadavh@marvell.com, jinghua@marvell.com, jsd@semihalf.com, jaz@semihalf.com Message-ID: <20180618165027.abbgghfmupvnly2x@bivouac.eciton.net> References: <1529266325-18371-1-git-send-email-mw@semihalf.com> <1529266325-18371-26-git-send-email-mw@semihalf.com> MIME-Version: 1.0 In-Reply-To: <1529266325-18371-26-git-send-email-mw@semihalf.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [platforms: PATCH v2 25/25] Marvell/Drivers: MvPhyDxe: Remove MvHwDescLib.h dependency X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2018 16:50:31 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Jun 17, 2018 at 10:12:05PM +0200, Marcin Wojtas wrote: > Finally, after switching to new MV_BOARD_DESC solution > in all drivers, stop using MvHwDescLib.h by its last user > and safely remove this header. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Marcin Wojtas Reviewed-by: Leif Lindholm Right, that's me done with v2. / Leif > --- > Silicon/Marvell/Include/Library/MvHwDescLib.h | 70 -------------------- > Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c | 4 +- > 2 files changed, 2 insertions(+), 72 deletions(-) > delete mode 100644 Silicon/Marvell/Include/Library/MvHwDescLib.h > > diff --git a/Silicon/Marvell/Include/Library/MvHwDescLib.h b/Silicon/Marvell/Include/Library/MvHwDescLib.h > deleted file mode 100644 > index 0de435d..0000000 > --- a/Silicon/Marvell/Include/Library/MvHwDescLib.h > +++ /dev/null > @@ -1,70 +0,0 @@ > -/******************************************************************************** > -Copyright (C) 2017 Marvell International Ltd. > - > -Marvell BSD License Option > - > -If you received this File from Marvell, you may opt to use, redistribute and/or > -modify this File under the following licensing terms. > -Redistribution and use in source and binary forms, with or without modification, > -are permitted provided that the following conditions are met: > - > -* Redistributions of source code must retain the above copyright notice, > - this list of conditions and the following disclaimer. > - > -* Redistributions in binary form must reproduce the above copyright > - notice, this list of conditions and the following disclaimer in the > - documentation and/or other materials provided with the distribution. > - > -* Neither the name of Marvell nor the names of its contributors may be > - used to endorse or promote products derived from this software without > - specific prior written permission. > - > -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND > -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED > -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE > -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR > -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; > -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON > -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS > -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > - > -*******************************************************************************/ > - > -#ifndef __MVHWDESCLIB_H__ > -#define __MVHWDESCLIB_H__ > - > -// > -// Helper macros > -// > - > -// Check if device is enabled - it expects PCD to be read to 'DeviceTable' array > -#define MVHW_DEV_ENABLED(type, index) (type ## DeviceTable[index]) > - > -// > -// I2C devices description template definition > -// > -#define MVHW_MAX_I2C_DEVS 4 > - > -typedef struct { > - UINT8 I2cDevCount; > - UINTN I2cBaseAddresses[MVHW_MAX_I2C_DEVS]; > -} MVHW_I2C_DESC; > - > -// > -// Platform description of I2C devices > -// > -#define MVHW_CP0_I2C0_BASE 0xF2701000 > -#define MVHW_CP0_I2C1_BASE 0xF2701100 > -#define MVHW_CP1_I2C0_BASE 0xF4701000 > -#define MVHW_CP1_I2C1_BASE 0xF4701100 > - > -#define DECLARE_A7K8K_I2C_TEMPLATE \ > -STATIC \ > -MVHW_I2C_DESC mA7k8kI2cDescTemplate = {\ > - 4,\ > - { MVHW_CP0_I2C0_BASE, MVHW_CP0_I2C1_BASE, MVHW_CP1_I2C0_BASE, MVHW_CP1_I2C1_BASE }\ > -} > - > -#endif /* __MVHWDESCLIB_H__ */ > diff --git a/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c b/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c > index dd2edae..9be0489 100644 > --- a/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c > +++ b/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c > @@ -41,7 +41,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > #include > #include > #include > -#include > #include > #include > #include > @@ -380,7 +379,8 @@ MvPhyInit ( > MdioIndex = Phy2MdioController[PhyIndex]; > > /* Verify correctness of PHY <-> MDIO assignment */ > - if (!MVHW_DEV_ENABLED (Mdio, MdioIndex) || MdioIndex >= Mdio->ControllerCount) { > + if ((MdioDeviceTable[MdioIndex] == 0) || > + (MdioIndex >= Mdio->ControllerCount)) { > DEBUG ((DEBUG_ERROR, "MvPhyDxe: Incorrect Mdio controller assignment for PHY#%d", PhyIndex)); > return EFI_INVALID_PARAMETER; > } > -- > 2.7.4 >