Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7373069ybi; Mon, 8 Jul 2019 20:34:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKtepzkNSO/GxONhhMw+8+vxHcrIcE4NG37mM4A0SWBLcC1wUwXPXWOoLXa654qw5VVApy X-Received: by 2002:a63:6986:: with SMTP id e128mr28882460pgc.220.1562643250845; Mon, 08 Jul 2019 20:34:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562643250; cv=none; d=google.com; s=arc-20160816; b=HfLUSpmqKwbWlyhxIClFi5xAp4z02K6nvSMY9JJ6sYpzUpBkjQ6JMdL0FoitJPccSo 7CjFxHr9GYmiRkEl+RudH+Zrc6J2NV4CUPhfd7XqtDqp/Iuxf9ZCq40aOy0dFVXfRJCE wIJo8TO376iyunLDjO+42qaggHq/4enkE7ECPou3Kwn0aQKStxOquj0qjxnod/hUqaKy RZBAVwFjvxdY4VQHGANOPUsxGhdoMfMEZ496lOeyg20qRPRl+xz/JppBP+rTXHCojEWr zSeAplGLmpU4rwhyWm9R1386DzQt+/W5Xy/3sRScPc1O/L2lnj7maXwqbTb0X4kugLsQ 0cpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=mpFx5YXUCW7H45sNckdWOfxEmYjRQIQdisQFgkuzzNo=; b=DF4vFLkMB7z+A0arUmb2ob238aGJCGQGGjk+Q+d3x7axcinqgq1Q0Xe49pbMot+GLy o7ijd6gWikwR1AaT+5Vy0Ra2axuDtbcALleulfXOiOsXDC1KUScJD7yLPi8bMqIdPHOx 0Bl4dJpQGavGRfheJ+shiopnIqsSt4AJRzS+CfrUeqsEdpFHSgvnIbY52do/B8OYm9rD +CLh94J7Q1td60JvthaNoN5ChLi11jz8ZgAYvImc07sPMUEEMW9bIgIx1+8iXzSF/Rlj pD4KFiGK8ioRrMJuq+HK+EWcDWA3GOeUctJJHMlugN3eSvm4k0g9gOh8t4VtAoSFjQJH 6brA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f20si23468842pfn.166.2019.07.08.20.33.55; Mon, 08 Jul 2019 20:34:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727571AbfGIDby (ORCPT + 99 others); Mon, 8 Jul 2019 23:31:54 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:51596 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727296AbfGIDbe (ORCPT ); Mon, 8 Jul 2019 23:31:34 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 9B84A78089B3A568715F; Tue, 9 Jul 2019 11:31:29 +0800 (CST) Received: from huawei.com (10.67.189.167) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.439.0; Tue, 9 Jul 2019 11:31:21 +0800 From: Jiangfeng Xiao To: , , , , , , CC: , , , , , , Subject: [PATCH v2 04/10] net: hisilicon: HI13X1_GMAX skip write LOCAL_PAGE_REG Date: Tue, 9 Jul 2019 11:31:05 +0800 Message-ID: <1562643071-46811-5-git-send-email-xiaojiangfeng@huawei.com> X-Mailer: git-send-email 1.8.5.6 In-Reply-To: <1562643071-46811-1-git-send-email-xiaojiangfeng@huawei.com> References: <1562643071-46811-1-git-send-email-xiaojiangfeng@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.189.167] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org HI13X1_GMAC changed the offsets and bitmaps for GE_TX_LOCAL_PAGE_REG registers in the same peripheral device on different models of the hip04_eth. With the default configuration, HI13X1_GMAC can also work without any writes to the GE_TX_LOCAL_PAGE_REG register. Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c index d8f0619..fe61b01 100644 --- a/drivers/net/ethernet/hisilicon/hip04_eth.c +++ b/drivers/net/ethernet/hisilicon/hip04_eth.c @@ -308,8 +308,10 @@ static void hip04_config_fifo(struct hip04_priv *priv) val |= GE_RX_STRIP_PAD | GE_RX_PAD_EN; writel_relaxed(val, priv->base + GE_RECV_CONTROL_REG); +#ifndef CONFIG_HI13X1_GMAC val = GE_AUTO_NEG_CTL; writel_relaxed(val, priv->base + GE_TX_LOCAL_PAGE_REG); +#endif } static void hip04_mac_enable(struct net_device *ndev) -- 1.8.5.6