Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1568745pxx; Fri, 30 Oct 2020 13:11:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMhgJhQM2c0+o2bStK8Pa6SQBEsOF1NfsRWn21x72t77P+/DSlRcaWjtKK1AtfWJW7XAjn X-Received: by 2002:a50:d587:: with SMTP id v7mr4148323edi.38.1604088673257; Fri, 30 Oct 2020 13:11:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604088673; cv=none; d=google.com; s=arc-20160816; b=otE/ba32dPgey3A0WplqhAIF4gBptt2ky5OtcNARArMckshuvCwAU3T3MVOAmoyfdC qShYtTo+4lmyFqwvrY4OcxkXjoYUiMs509kRUe59TWkfuTOpor8P6FGGJQ/wGm1/4421 0xtZnMC2uiO/D/nZTWGlCw2E2kJUVXuXKOPeRVaG9kSl14Ca4l71+q5z2C0PIzT4EyOc U3MnnhpudUW8fSdWfa5MOwoJ1XPveMsd+NbGpp6FmHhkglW5jbW9Wh13f1W/5mSH+33s EPFJMg9h+QilC+959ueRv6iXaz8mCDW8R0LLc48ngMj2tpQIa25BZqcFu8xSp+l1lICt g8nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=98XIiqJr/thSnXuQrti75eeXIo/p35Kqtowk02c0y5o=; b=q82sGKcTw+9LRkQiIMfo7bLQxT5flW5GXDk8KNd+Bej/0DxZxK50Jf/bdyti/GCDE1 HOaezFZdGELWKt5AmZtWefFMQZdq33DI/XlbTlUM0Vi8cKyC5ijtfJ55PiGgpjIKH7EF zlqqD2l5xf/dFRcFUy8X1tcwqC3jCdBIs61yWzZFxa8qTy1fbK7q81yciFFg0wMamSN4 O+UKBIm6jlsgccs8FUqVWEnBpBcXFEUjnTCHW5OU5aj+PNtxKpCmOIjhNpXzy103q6Ew 01iYMqyQuVNxVEmdUrINcne3iRyjZg72AR/9OYeWriQOInxdgqB+3DMlqw9zJdP71Bk2 aPaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=yY1SfZT6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id by20si6655723ejc.528.2020.10.30.13.10.50; Fri, 30 Oct 2020 13:11:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=yY1SfZT6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727715AbgJ3UHV (ORCPT + 99 others); Fri, 30 Oct 2020 16:07:21 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:33168 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727074AbgJ3UHU (ORCPT ); Fri, 30 Oct 2020 16:07:20 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 09UK7G7i108090; Fri, 30 Oct 2020 15:07:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1604088436; bh=98XIiqJr/thSnXuQrti75eeXIo/p35Kqtowk02c0y5o=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=yY1SfZT6MC4xtrFyC5nQRSkuTD/nUXshROd0/GjVNFAL9QhkPnaE0llGsoCP7yHa1 gFYpm0ORszut78S4q5KHmZaZehBZVPVlYZsBpfYuuIHPJzqE8VzMm2/Fv5AaRTB7Pa +WsRWW9/rkYAyTs/Cl0ErqpZexKoOurjUukcQ7SE= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 09UK7G8I051942 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 30 Oct 2020 15:07:16 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Fri, 30 Oct 2020 15:07:15 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Fri, 30 Oct 2020 15:07:15 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 09UK7E62028706; Fri, 30 Oct 2020 15:07:15 -0500 From: Grygorii Strashko To: "David S. Miller" , , Jakub Kicinski , Vignesh Raghavendra CC: Sekhar Nori , , , "Reviewed-by : Jesse Brandeburg" , Grygorii Strashko Subject: [PATCH net-next v3 02/10] net: ethernet: ti: am65-cpsw: move free desc queue mode selection in pdata Date: Fri, 30 Oct 2020 22:06:59 +0200 Message-ID: <20201030200707.24294-3-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201030200707.24294-1-grygorii.strashko@ti.com> References: <20201030200707.24294-1-grygorii.strashko@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation of adding more multi-port K3 CPSW versions move free descriptor queue mode selection in am65_cpsw_pdata, so it can be selected basing on DT compatibility property. Signed-off-by: Grygorii Strashko Reviewed-by: Jesse Brandeburg --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 +++- drivers/net/ethernet/ti/am65-cpsw-nuss.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index 0ee1c7a5c90f..6cea338df7ad 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -1606,7 +1606,6 @@ static int am65_cpsw_nuss_init_rx_chns(struct am65_cpsw_common *common) }; struct k3_ring_cfg fdqring_cfg = { .elm_size = K3_RINGACC_RING_ELSIZE_8, - .mode = K3_RINGACC_RING_MODE_MESSAGE, .flags = K3_RINGACC_RING_SHARED, }; struct k3_udma_glue_rx_flow_cfg rx_flow_cfg = { @@ -1620,6 +1619,7 @@ static int am65_cpsw_nuss_init_rx_chns(struct am65_cpsw_common *common) rx_flow_cfg.ring_rxfdq0_id = fdqring_id; rx_flow_cfg.rx_cfg.size = max_desc_num; rx_flow_cfg.rxfdq_cfg.size = max_desc_num; + rx_flow_cfg.rxfdq_cfg.mode = common->pdata.fdqring_mode; ret = k3_udma_glue_rx_flow_init(rx_chn->rx_chn, i, &rx_flow_cfg); @@ -2006,11 +2006,13 @@ static const struct soc_device_attribute am65_cpsw_socinfo[] = { static const struct am65_cpsw_pdata am65x_sr1_0 = { .quirks = AM65_CPSW_QUIRK_I2027_NO_TX_CSUM, .ale_dev_id = "am65x-cpsw2g", + .fdqring_mode = K3_RINGACC_RING_MODE_MESSAGE, }; static const struct am65_cpsw_pdata j721e_pdata = { .quirks = 0, .ale_dev_id = "am65x-cpsw2g", + .fdqring_mode = K3_RINGACC_RING_MODE_MESSAGE, }; static const struct of_device_id am65_cpsw_nuss_of_mtable[] = { diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.h b/drivers/net/ethernet/ti/am65-cpsw-nuss.h index 9c2186b8eae9..b6f228ddc3a0 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.h +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.h @@ -11,6 +11,7 @@ #include #include #include +#include #include "am65-cpsw-qos.h" struct am65_cpts; @@ -77,6 +78,7 @@ struct am65_cpsw_rx_chn { struct am65_cpsw_pdata { u32 quirks; + enum k3_ring_mode fdqring_mode; const char *ale_dev_id; }; -- 2.17.1