From patchwork Fri Oct 30 20:06:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 320034 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp1723897ilc; Fri, 30 Oct 2020 13:07:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxX8AhYPIkHUmx06HyLoFHbfA8XOTFf1A36Me6aTv8Q5l00mIPmSfL/FFj4VHNT/8KYj1b+ X-Received: by 2002:a05:6402:207c:: with SMTP id bd28mr4153766edb.316.1604088435504; Fri, 30 Oct 2020 13:07:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604088435; cv=none; d=google.com; s=arc-20160816; b=OA6i37/JFBsvTLW3iqtdnM/aQ9fKee8J5+XHGJOwQk7Jyvo2lAYT34x8SoEjB1JRVR jyTXKa3ltYDuYiVA1odadBxhD3p/0Rw9m7OAhd0w+/ym3c8Mi1VOejUNYb23Fw+uRW0n i2P9P8dxHBdGLr2A4D2p9frOen9xvGPjNv4KlX1a094jzDnS+Es8Sosi+RTjd0GosPkH vozBqVgHRvA+3VI73U/tFduI65cyP2Oat7R1no8Edv8CefjYWDUICPZcEojFoP+y6/qJ IkhAgZ+kGiIwb/tetxRC+Li2tbUhPslkOXqq1oo1H3W3RT8RRHgLw76HAnIYhSwVEeLI uarA== 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=vwAshrXZUm5aAiiEKPz3Y8AbZeuFow0vDlPm7YdaWkc=; b=D1FhTchCBVrSZ3274xhlLHlm2VsKMroq5eakPf72daiwECS0bG3MhAscymNbb+sCne /APamJdeG/d4GgrjolT+4hJNDcDRAy72X/XXEtrDGQvtlN4s/Od7XWp1xaH15bYZm/r0 09SLmKL95/8EKFV8gbdwX5fiigMaO4FhmBj1h5P1Eg/fV/mRObx6fRjjSC9WFOs/hCBB XoFk9oAdz6HAHNXizX/JToQg0RiIDcp+zP91rgHQwtgHieKlzKCZWnWfXAW/GBQ3rdOa swnP3I6FbJw1TIeRq5ug+IKsoLszuiPx2wg6DPXyXMHjBPHzkap/6DsLbsa5558xu2V+ OhOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="v3DJ/Z+U"; spf=pass (google.com: domain of linux-omap-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-omap-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 m6si4796644ejb.721.2020.10.30.13.07.15; Fri, 30 Oct 2020 13:07:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-omap-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="v3DJ/Z+U"; spf=pass (google.com: domain of linux-omap-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-omap-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 S1727249AbgJ3UHO (ORCPT + 3 others); Fri, 30 Oct 2020 16:07:14 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:33148 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727415AbgJ3UHO (ORCPT ); Fri, 30 Oct 2020 16:07:14 -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 09UK79rf108066; Fri, 30 Oct 2020 15:07:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1604088429; bh=vwAshrXZUm5aAiiEKPz3Y8AbZeuFow0vDlPm7YdaWkc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=v3DJ/Z+UrOv5GY8wZkbzV517LpszhqSF3opcI4ajUthURuJLQ3UjxTcsV/bbsfpEG JwZfAedfmp84AQa21pG9YxY/YmI6+riqycCOhRBrVhd/Lv34RfBWUTTcjfGNJoYtkA i9ykhdjoGAsDV3U2nqSPL7nhuS0Zd87vA5Wx2k0g= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 09UK78pL051826 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 30 Oct 2020 15:07:08 -0500 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE109.ent.ti.com (157.170.170.41) 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:08 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE104.ent.ti.com (157.170.170.34) 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:08 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 09UK77b1101190; Fri, 30 Oct 2020 15:07:08 -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 01/10] net: ethernet: ti: am65-cpsw: move ale selection in pdata Date: Fri, 30 Oct 2020 22:06:58 +0200 Message-ID: <20201030200707.24294-2-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 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org In preparation of adding more multi-port K3 CPSW versions move ALE 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 | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index 501d676fd88b..0ee1c7a5c90f 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -2005,10 +2005,12 @@ 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", }; static const struct am65_cpsw_pdata j721e_pdata = { .quirks = 0, + .ale_dev_id = "am65x-cpsw2g", }; static const struct of_device_id am65_cpsw_nuss_of_mtable[] = { @@ -2145,7 +2147,7 @@ static int am65_cpsw_nuss_probe(struct platform_device *pdev) ale_params.ale_ageout = AM65_CPSW_ALE_AGEOUT_DEFAULT; ale_params.ale_ports = common->port_num + 1; ale_params.ale_regs = common->cpsw_base + AM65_CPSW_NU_ALE_BASE; - ale_params.dev_id = "am65x-cpsw2g"; + ale_params.dev_id = common->pdata.ale_dev_id; ale_params.bus_freq = common->bus_freq; common->ale = cpsw_ale_create(&ale_params); diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.h b/drivers/net/ethernet/ti/am65-cpsw-nuss.h index 993e1d4d3222..9c2186b8eae9 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.h +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.h @@ -77,6 +77,7 @@ struct am65_cpsw_rx_chn { struct am65_cpsw_pdata { u32 quirks; + const char *ale_dev_id; }; struct am65_cpsw_common {