From patchwork Mon Nov 27 09:16:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 841525 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="F62pUsrY"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3ylh9K2xpVz9sPk for ; Mon, 27 Nov 2017 20:20:37 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 2F38CC21E13; Mon, 27 Nov 2017 09:18:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 9B1A5C21D76; Mon, 27 Nov 2017 09:16:50 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9BEEAC21DA0; Mon, 27 Nov 2017 09:16:31 +0000 (UTC) Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by lists.denx.de (Postfix) with ESMTPS id C0F6EC21DA0 for ; Mon, 27 Nov 2017 09:16:27 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id z34so2412399wrz.10 for ; Mon, 27 Nov 2017 01:16:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=u4TChqra6xl7vo+TxVgzJS/wd5w9pLp7AmultUiKZvY=; b=F62pUsrYlKLzWXx2SsRiTIgPkN8J2Te7Qzf+CPljE85WLYtcEnj84KJ98hszUmlUcO ob/vgGOrqV5bokb61z+PnI5sAj9IVwPUAQuFxVqkwpK0RJM87RfnDIUcJ8L8mvZotUuX Y9Jhf9b062SDUaXoz4CPipxZShiidlXioQFB9hoK1i1HR29U78dqTYnMBCaNfNdTMLP3 DVtjtrNc6/Gcr+8VuB6a1DZUc7Nlh9yIys24aqpIH+pQydonyj9j6alPdvJPHjtZrb4Q JDW3yqVfpP5Ns8aDj/wC+JsEFx7McIPEfdaZ1nUJxLHgS5wq8YGkDIyrW4yyyEyB5+19 lIkg== 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=u4TChqra6xl7vo+TxVgzJS/wd5w9pLp7AmultUiKZvY=; b=ELNSwlEhzmYbBnCvzAcqERqFN32V6ye9U9bJSFG3rpXDxbsD/gG/BqQZvPPLZeFlRs dGHY37MrRdZMvm3pvpSnzWfuz3aHrpHEIH96q7lLwf8HVYbBGXPU8yqPf198ahG5n53G DXfaHhWkXpAwc2wK/+xUlM+8n2VKZze3O546A9ivPBoFGwURFyKzCuuHO3JCn1KHsAHg 53XoWwLKh8UsJ/vPiTYePVx7ntOP8L54dOE25K/Fk+uE7yJ8F6eX4WBe+JnogRxECEWt qdu63dHpbGJ7m8FKPpMHKWQM94NvH0x3bErvJQZ3XOV9WdMBDc9T/uaKkFxZd0K4IQf+ mb8Q== X-Gm-Message-State: AJaThX7PT0Y6lt+tuXMgHoHadRQaXbGC2h0wo7IHdsLFlMXFYN45sKLn xMlqgWAKwSgbYUPsDZqA14YjhrCyFiw= X-Google-Smtp-Source: AGs4zMZRuylud+N8yX2+mGwkmuJDcFEvZqcwlBikUZu1uT6VnOT4j13oloqlR+a2Us888do7VjDCyQ== X-Received: by 10.223.132.194 with SMTP id 60mr33065532wrg.249.1511774187084; Mon, 27 Nov 2017 01:16:27 -0800 (PST) Received: from bender.local ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id t200sm14039716wmd.45.2017.11.27.01.16.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Nov 2017 01:16:26 -0800 (PST) From: Neil Armstrong To: u-boot@lists.denx.de Date: Mon, 27 Nov 2017 10:16:18 +0100 Message-Id: <1511774180-22672-4-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511774180-22672-1-git-send-email-narmstrong@baylibre.com> References: <1511774180-22672-1-git-send-email-narmstrong@baylibre.com> Cc: trini@konsulko.com, linux-amlogic@lists.infradead.org Subject: [U-Boot] [PATCH u-boot v3 3/5] board: p212: use common ethernet init function X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Switch P212 Ethernet init to the common Ethernet init function. Reviewed-by: Simon Glass Signed-off-by: Neil Armstrong --- board/amlogic/p212/p212.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/board/amlogic/p212/p212.c b/board/amlogic/p212/p212.c index ece8096..2b6d88a 100644 --- a/board/amlogic/p212/p212.c +++ b/board/amlogic/p212/p212.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #define EFUSE_SN_OFFSET 20 #define EFUSE_SN_SIZE 16 @@ -28,17 +28,7 @@ int misc_init_r(void) char serial[EFUSE_SN_SIZE]; ssize_t len; - /* Set RMII mode */ - out_le32(GXBB_ETH_REG_0, GXBB_ETH_REG_0_INVERT_RMII_CLK | - GXBB_ETH_REG_0_CLK_EN); - - /* Use Internal PHY */ - out_le32(GXBB_ETH_REG_2, 0x10110181); - out_le32(GXBB_ETH_REG_3, 0xe40908ff); - - /* Enable power and clock gate */ - setbits_le32(GXBB_GCLK_MPEG_1, GXBB_GCLK_MPEG_1_ETH); - clrbits_le32(GXBB_MEM_PD_REG_0, GXBB_MEM_PD_REG_0_ETH_MASK); + meson_gx_eth_init(PHY_INTERFACE_MODE_RMII, 0); if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { len = meson_sm_read_efuse(EFUSE_MAC_OFFSET,