{"id":817349,"url":"http://patchwork.ozlabs.org/api/patches/817349/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/20170922072635.32105-8-wens@csie.org/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170922072635.32105-8-wens@csie.org>","list_archive_url":null,"date":"2017-09-22T07:26:33","name":"[U-Boot,7/9] net: sun8i_emac: Fix build for non-H3/H5 SoCs","commit_ref":"13ae2a40e7d458ad0c2961359c346578a305263d","pull_url":null,"state":"accepted","archived":false,"hash":"578d6ea804843123244ebed037ac2468be524906","submitter":{"id":47154,"url":"http://patchwork.ozlabs.org/api/people/47154/?format=json","name":"Chen-Yu Tsai","email":"wens@csie.org"},"delegate":{"id":17739,"url":"http://patchwork.ozlabs.org/api/users/17739/?format=json","username":"jagan","first_name":"Jagannadha Sutradharudu","last_name":"Teki","email":"jagannadh.teki@gmail.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/20170922072635.32105-8-wens@csie.org/mbox/","series":[{"id":4550,"url":"http://patchwork.ozlabs.org/api/series/4550/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=4550","date":"2017-09-22T07:26:29","name":"sunxi: A83T improvements","version":1,"mbox":"http://patchwork.ozlabs.org/series/4550/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/817349/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/817349/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xz4sK5bs3z9sNc\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 22 Sep 2017 17:31:01 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 75E51C21E0E; Fri, 22 Sep 2017 07:28:50 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id A50AFC21FBB;\n\tFri, 22 Sep 2017 07:27:04 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid C4F59C21F4B; Fri, 22 Sep 2017 07:26:51 +0000 (UTC)","from wens.csie.org (mirror2.csie.ntu.edu.tw [140.112.30.76])\n\tby lists.denx.de (Postfix) with ESMTPS id E227FC21E3C\n\tfor <u-boot@lists.denx.de>; Fri, 22 Sep 2017 07:26:46 +0000 (UTC)","by wens.csie.org (Postfix, from userid 1000)\n\tid CBFDA600A3; Fri, 22 Sep 2017 15:26:36 +0800 (CST)"],"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=none autolearn=unavailable\n\tautolearn_force=no version=3.4.0","From":"Chen-Yu Tsai <wens@csie.org>","To":"u-boot@lists.denx.de","Date":"Fri, 22 Sep 2017 15:26:33 +0800","Message-Id":"<20170922072635.32105-8-wens@csie.org>","X-Mailer":"git-send-email 2.14.1","In-Reply-To":"<20170922072635.32105-1-wens@csie.org>","References":"<20170922072635.32105-1-wens@csie.org>","Cc":"Joe Hershberger <joe.hershberger@ni.com>, Jagan Teki <jagan@openedev.com>,\n\tMaxime Ripard <maxime.ripard@free-electrons.com>","Subject":"[U-Boot] [PATCH 7/9] net: sun8i_emac: Fix build for non-H3/H5 SoCs","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"},"content":"Only the H3/H5 SoCs have an internal PHY and its related clock and\nreset controls.\n\nUse an #ifdef to guard the internal PHY control code block so it\ncan be built for other SoCs, such as the A83T or A64.\n\nSigned-off-by: Chen-Yu Tsai <wens@csie.org>\n---\n drivers/net/sun8i_emac.c | 3 +++\n 1 file changed, 3 insertions(+)","diff":"diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c\nindex 5fa1b4c170d7..0a98a04967da 100644\n--- a/drivers/net/sun8i_emac.c\n+++ b/drivers/net/sun8i_emac.c\n@@ -616,6 +616,8 @@ static void sun8i_emac_board_setup(struct emac_eth_dev *priv)\n {\n \tstruct sunxi_ccm_reg *ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE;\n \n+#ifdef CONFIG_MACH_SUNXI_H3_H5\n+\t/* Only H3/H5 have clock controls for internal EPHY */\n \tif (priv->use_internal_phy) {\n \t\t/* Set clock gating for ephy */\n \t\tsetbits_le32(&ccm->bus_gate4, BIT(AHB_GATE_OFFSET_EPHY));\n@@ -623,6 +625,7 @@ static void sun8i_emac_board_setup(struct emac_eth_dev *priv)\n \t\t/* Deassert EPHY */\n \t\tsetbits_le32(&ccm->ahb_reset2_cfg, BIT(AHB_RESET_OFFSET_EPHY));\n \t}\n+#endif\n \n \t/* Set clock gating for emac */\n \tsetbits_le32(&ccm->ahb_gate0, BIT(AHB_GATE_OFFSET_GMAC));\n","prefixes":["U-Boot","7/9"]}