From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8CB2AC433F5 for ; Tue, 12 Apr 2022 18:42:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EB74483DD2; Tue, 12 Apr 2022 20:42:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1649788934; bh=vhB0v5jHCrp6tAQSdImSvSVCSAPt33OF2DW6t7iS8Zw=; h=From:To:Subject:In-reply-to:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From; b=Uw7JJPIqy/6edEiegDzAf63TpCli1+ha/2olrqDTdwCCfrOwqk5cWlzA5IDd/JmlM xfVo85J0xIuyjD8oMxEs+2PaJgm3lExWylSBRgwCyMxh6AW9FfT58PG2mQHSPnV8JC md9T2bl3im0w641vrem1aYP8hMtO9M9eVGFTg+ApBk+BFK9MhdXN9HGgbWOKm1ZM4h zCPxn0tv2Kw8lAmm3byOcBNY1+nNtKOWveJMZsmXP/zc1QZef2FsrRqm9sQKi/HU3+ V+FAXFTLEIftpjL/Alr+/7a6YfDAOe0hvrRZ6hfCTBT6b+I5TIdmXnpG1AxCoNNEDn HUyVLlnUE487A== Received: by phobos.denx.de (Postfix, from userid 109) id EDE0183C76; Tue, 12 Apr 2022 20:42:07 +0200 (CEST) Received: from mail-out.m-online.net (mail-out.m-online.net [IPv6:2001:a60:0:28:0:1:25:1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BB18783C05 for ; Tue, 12 Apr 2022 20:41:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sbabic@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4KdF1z2p4Fz1s7tS; Tue, 12 Apr 2022 20:41:59 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4KdF1z2W6Cz1qqkB; Tue, 12 Apr 2022 20:41:59 +0200 (CEST) X-Amavis-Alert: BAD HEADER SECTION, Missing required header field: "Date" Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 9alZj3832SiY; Tue, 12 Apr 2022 20:41:58 +0200 (CEST) Received: from papero (host-88-217-136-221.customer.m-online.net [88.217.136.221]) by mail.mnet-online.de (Postfix) with ESMTP; Tue, 12 Apr 2022 20:41:58 +0200 (CEST) From: sbabic@denx.de X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 1596686 X-Patchwork-Delegate: sbabic@denx.de To: Adam Ford ,u-boot@lists.denx.de Subject: [PATCH] imx: imx8mm/imx8mn_beacon: Remove redundant code In-reply-to: <20220223135051.27707-1-aford173@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Message-Id: <20220412184207.EDE0183C76@phobos.denx.de> Date: Tue, 12 Apr 2022 20:42:00 +0200 (CEST) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean > The Ethernet controller and PHY use the device tree info to > configure themselves, so it's not necessary to manually do it > in the board file. This permits the removal of a bunch of headers > as well. > Signed-off-by: Adam Ford > Reviewed-by: Fabio Estevam > Acked-by: Peng Fan > diff --git a/board/beacon/imx8mm/imx8mm_beacon.c b/board/beacon/imx8mm/imx8= mm_beacon.c > index c228bbf777..204235a3f8 100644 > --- a/board/beacon/imx8mm/imx8mm_beacon.c > +++ b/board/beacon/imx8mm/imx8mm_beacon.c > @@ -1,52 +1,13 @@ > // SPDX-License-Identifier: GPL-2.0+ > /* > - * Copyright 2020 Compass Electronics Group, LLC > + * Copyright 2022 Logic PD, Inc. dba Beacon EmbeddedWorks > */ > =20 > -#include > -#include > -#include > #include > =20 > -#include > -#include > -#include > - > DECLARE_GLOBAL_DATA_PTR; > =20 > -#if IS_ENABLED(CONFIG_FEC_MXC) > -static int setup_fec(void) > -{ > - struct iomuxc_gpr_base_regs *gpr =3D > - (struct iomuxc_gpr_base_regs *)IOMUXC_GPR_BASE_ADDR; > - > - /* Use 125M anatop REF_CLK1 for ENET1, not from external */ > - clrsetbits_le32(&gpr->gpr[1], 0x2000, 0); > - > - return 0; > -} > - > -int board_phy_config(struct phy_device *phydev) > -{ > - /* enable rgmii rxc skew and phy mode select to RGMII copper */ > - phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x1f); > - phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x8); > - > - phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x00); > - phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x82ee); > - phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x05); > - phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x100); > - > - if (phydev->drv->config) > - phydev->drv->config(phydev); > - return 0; > -} > -#endif > - > int board_init(void) > { > - if (IS_ENABLED(CONFIG_FEC_MXC)) > - setup_fec(); > - > return 0; > } > diff --git a/board/beacon/imx8mn/imx8mn_beacon.c b/board/beacon/imx8mn/imx8= mn_beacon.c > index 6397dac872..204235a3f8 100644 > --- a/board/beacon/imx8mn/imx8mn_beacon.c > +++ b/board/beacon/imx8mn/imx8mn_beacon.c > @@ -1,52 +1,13 @@ > // SPDX-License-Identifier: GPL-2.0+ > /* > - * Copyright 2020 Compass Electronics Group, LLC > + * Copyright 2022 Logic PD, Inc. dba Beacon EmbeddedWorks > */ > =20 > -#include > -#include > -#include > - > -#include > -#include > #include > -#include > =20 > DECLARE_GLOBAL_DATA_PTR; > =20 > -#if IS_ENABLED(CONFIG_FEC_MXC) > -static int setup_fec(void) > -{ > - struct iomuxc_gpr_base_regs *gpr =3D > - (struct iomuxc_gpr_base_regs *)IOMUXC_GPR_BASE_ADDR; > - > - /* Use 125M anatop REF_CLK1 for ENET1, not from external */ > - clrsetbits_le32(&gpr->gpr[1], 0x2000, 0); > - > - return 0; > -} > - > -int board_phy_config(struct phy_device *phydev) > -{ > - /* enable rgmii rxc skew and phy mode select to RGMII copper */ > - phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x1f); > - phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x8); > - > - phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x00); > - phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x82ee); > - phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x05); > - phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x100); > - > - if (phydev->drv->config) > - phydev->drv->config(phydev); > - return 0; > -} > -#endif > - > int board_init(void) > { > - if (IS_ENABLED(CONFIG_FEC_MXC)) > - setup_fec(); > - > return 0; > } Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D