From patchwork Mon Mar 2 14:32:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 184071 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp2171251ile; Mon, 2 Mar 2020 01:02:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzC/YLl5rdXEU8wBTil8zo4xwL9vJ+PzlBreqrvZlum/4hyl9sX866wW5i1fMTNFia0sL/e X-Received: by 2002:a17:906:c40d:: with SMTP id u13mr14640586ejz.178.1583139730270; Mon, 02 Mar 2020 01:02:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583139730; cv=none; d=google.com; s=arc-20160816; b=G3vWT06ns4KWhWfRjIfceyAZDWiZRk4STlgmIJZ44qyjf9AtcCcPqroTMdx/l9m+MK PSsytcMNkBlSG+1W2m4yf1OK0jnsoR86q7Y6jDHTw+R3ptjugCGI9/tWs04Z3j7lj6DM BuXwnVe2NZOngYAE4wr9ojlheseB+EW1Brr4+Ldy3+owuDteRkpwh8p+5TpwnpqCDTKi LBqUV9oMrZUiMbzZcScmSRLKqX9Af9x1YMKG+JDpoCK/fWEX4a7Q/d+l3tTDq3gNAAZK 3HOwdaX4Uh85x502aL4THOY6hen0WYA+tn2tCbDtdV/LfQOSB/kzRG9Y5LgIJEfu81sQ ynyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=YVekuCGm3LV+j94Xs3mql8i+JrwOEmav+uAnIlcf+TE=; b=dJv8IcuoWFaP3ZA3ccllbl5XDcAfnvjlpjvpmpYIShOfG3lI+OmB2X+zIbwsT1tCSp k1SmWQkmW4u0U3i2n9LV9o1XAtxO02w0f2sEVjb/CPMm6fnINC57HZH+vOruQEy0bV80 Js84zdKsumM0zSFjfdeq0N/bfzPXgXAgl6Qi0XTG19pPcjTBRy2mxUPbSgdrNI3rUp2V 9vI7td8Qjd7r1HzhCUvmqxS5cUnaj4G1Xfu85+NcVpFebNuTNieeR6MN9yg/yq92XEqn gh92qmvanS4MMfWzRdhS31Kyh+dtX4qhcX6nk1YtPt9SeFnUXmEVuShJfCbeKVByX7mn RHeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id dd11si98588ejb.281.2020.03.02.01.02.10; Mon, 02 Mar 2020 01:02:10 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1CC692C38; Mon, 2 Mar 2020 10:00:30 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 8D83F1C06B for ; Mon, 2 Mar 2020 10:00:22 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 733701A1030; Mon, 2 Mar 2020 10:00:22 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id E8C301A0FBD; Mon, 2 Mar 2020 10:00:19 +0100 (CET) Received: from bf-netperf1.ap.com (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id C202D4029E; Mon, 2 Mar 2020 17:00:16 +0800 (SGT) From: Hemant Agrawal To: ferruh.yigit@intel.com Cc: dev@dpdk.org, g.singh@nxp.com, Alex Marginean Date: Mon, 2 Mar 2020 20:02:09 +0530 Message-Id: <20200302143209.11854-11-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200302143209.11854-1-hemant.agrawal@nxp.com> References: <20200302143209.11854-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 10/10] net/enetc: init SI transactions attribute reg X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Alex Marginean This was left to its default value. With the patch transactions are: - coherent, - do not allocate in downstream cache (there is none on LS1028a), - merge surrounding data for BD writes, - overwrite surrounding data for frame data writes. Signed-off-by: Alex Marginean --- drivers/net/enetc/base/enetc_hw.h | 2 ++ drivers/net/enetc/enetc_ethdev.c | 6 ++++++ 2 files changed, 8 insertions(+) -- 2.17.1 diff --git a/drivers/net/enetc/base/enetc_hw.h b/drivers/net/enetc/base/enetc_hw.h index 00813284e..66fad58e5 100644 --- a/drivers/net/enetc/base/enetc_hw.h +++ b/drivers/net/enetc/base/enetc_hw.h @@ -22,6 +22,8 @@ #define ENETC_SIMR 0x0 #define ENETC_SIMR_EN BIT(31) +#define ENETC_SICAR0 0x40 +#define ENETC_SICAR0_COHERENT 0x2B2B6727 #define ENETC_SIPMAR0 0x80 #define ENETC_SIPMAR1 0x84 diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c index eb637d030..1716e11dd 100644 --- a/drivers/net/enetc/enetc_ethdev.c +++ b/drivers/net/enetc/enetc_ethdev.c @@ -150,6 +150,12 @@ enetc_hardware_init(struct enetc_eth_hw *hw) /* WA for Rx lock-up HW erratum */ enetc_port_wr(enetc_hw, ENETC_PM0_RX_FIFO, 1); + /* set ENETC transaction flags to coherent, don't allocate. + * BD writes merge with surrounding cache line data, frame data writes + * overwrite cache line. + */ + enetc_wr(enetc_hw, ENETC_SICAR0, ENETC_SICAR0_COHERENT); + /* Enabling Station Interface */ enetc_wr(enetc_hw, ENETC_SIMR, ENETC_SIMR_EN);