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::242; helo=mail-lf0-x242.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-lf0-x242.google.com (mail-lf0-x242.google.com [IPv6:2a00:1450:4010:c07::242]) (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 E6A472112500C for ; Fri, 8 Jun 2018 08:35:14 -0700 (PDT) Received: by mail-lf0-x242.google.com with SMTP id i15-v6so10404860lfc.2 for ; Fri, 08 Jun 2018 08:35:14 -0700 (PDT) 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=B03h/2YqxQWoBY9mLV/J6V1z3Fgh5LWPbdDU9UR/MWA=; b=AQiQN7uq7cHk5WPzhV30GOZn0wt3GMOh6uwVKSTWGBOd+dh4xNrslbqzz2+hCDBhrj wHydNFMIkkzPkmsCr3JbofZmkreqHJ4qmdAShlDYGWnQFs7Jt11EVVDBfEy0HUCz5rDX bmLtjMSelJvbZFTmnINempXrUs4Rn/D/ZkSbBdq1BGHVkkOLV7HTo0F9IGheOBnzEckj xj0Xqy3BcGaQjc43dfBryACWWDUWNhu/wkLgqsDqhWq8GtU81NlyS3OUBKSUX0PohjRt UfkFJVZdeBlhAEvgmr34kyZ9CJSwUw3oEVDktb7ps+xEm/78KEVb4kMHyjKsVA/P2HZ8 ynbw== 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=B03h/2YqxQWoBY9mLV/J6V1z3Fgh5LWPbdDU9UR/MWA=; b=on/PLlkLQFEMWu5xXVVe5dhca9pIwrW4ZXfsLz+yZ2hoSHj3ujXJsEsJDDfqINu9lD Sp2IRlzzYfKUug32cFPQNp8VTdtVnmTUCF4+sAx0IOfbvb6D+sXE7JFWYh4VCDoj+lHH 6CE/Qqyoe1XNILQo8gbyT1hSDlXm68P9xY2pedyF/rIS3U4zddVgqmitQKiAM1suUTp+ qZxbDU9J2Z7jSAidnSHd9pZIv08PWO+5XG6EhaRMjxT8Ut6FynXTDkOSsOfoDfMLyyzd r0vv8XN/ANui1uwnxtLdVYf+F5CNhcbgbrHWi6JT9wxiCHzlDrC8txkw2FHQzziVvusd lfxw== X-Gm-Message-State: APt69E0QrJmJznursvbJpCGlxGEi08fa/crI7pY+TewPuY2vVcQ7Fjbb EpphN7zNeq94UY2afHyu8dkQ4c39krQ= X-Google-Smtp-Source: ADUXVKILNYH7RrrI2iktykfcoYdRkqMPDKWPMxTFe8OKyiRPLYTBDu1RQvPfT+baguhIWXXFnKpUUw== X-Received: by 2002:a2e:29cf:: with SMTP id p76-v6mr5181903ljp.12.1528472112952; Fri, 08 Jun 2018 08:35:12 -0700 (PDT) Received: from gilgamesh.semihalf.com (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id v79-v6sm7355396lfd.32.2018.06.08.08.35.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Jun 2018 08:35:12 -0700 (PDT) From: Marcin Wojtas To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org, nadavh@marvell.com, jinghua@marvell.com, mw@semihalf.com, jsd@semihalf.com, jaz@semihalf.com Date: Fri, 8 Jun 2018 17:34:23 +0200 Message-Id: <1528472063-1660-26-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528472063-1660-1-git-send-email-mw@semihalf.com> References: <1528472063-1660-1-git-send-email-mw@semihalf.com> Subject: [platforms PATCH 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: Fri, 08 Jun 2018 15:35:15 -0000 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: Hua Jing --- Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c | 3 +- Silicon/Marvell/Include/Library/MvHwDescLib.h | 70 -------------------- 2 files changed, 1 insertion(+), 72 deletions(-) diff --git a/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c b/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c index dd2edae..3deb286 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,7 @@ 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; } 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__ */ -- 2.7.4