Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp339933pxk; Thu, 1 Oct 2020 03:54:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmyCCx0j6kCFFfXN1g2HIkng7Axcx1/j7CK8Vc+kwocCLgUlLe2RISvTAKaUQYa9WrYyaV X-Received: by 2002:a50:d787:: with SMTP id w7mr7493245edi.296.1601549698349; Thu, 01 Oct 2020 03:54:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601549698; cv=none; d=google.com; s=arc-20160816; b=oQTWcFpdXyFLmCkq2G9zhJRvqLKwoKTBX8JRU4gDXdwxW958lhYkees+5L/kwt9V+6 Foey4IeY1jD47LPW0RaTR3Mfh2guSgJpWzY6tVM5RYVprzAypq8tCZcoWvXYkpTdQfvl yW0tqK4p8e2TJUkCw0MSXmHN2uLkJh4mrOudS36yYoe9j+u4gh8UELrag93LCR5nQlRC ZgSCVnFDZR7KW0tLhML7b4Fw6gsCHHUIMDImRBEY6wCnQzVJMFjpYPh9/20xscpEqlp0 icg+iC/FpJbrAzzxG6swTAlsnQpbxudxZDF/01tsYELe8LRTvGAepBstGs+EpBVNm56P vTag== 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=zgrtzCIGRkZUluOTCMrRQjI65dX6+rZ7sdyXkY6/+MM=; b=VEZvrJQBIXD2gwHbgHs8CL5w9l6OThpuWlX+hg57BAoNPFSCDxd9tU/5XUvR1YRtq2 rMyf5Pe/8qTl2kaG7IQN3RM1ux4ChpOSRmdKHIlq5n4Fi99VWNgYNDepuZK9Jtg2D7Wx 3zDm6DP4tTgxp8um6ythG5LW8vVldcFOM0rzbS+b3iNyfiEk8+Sm+QnKy1oMf9ITvjZT PKWV6YEC+0DSYDQ3EBOFJPAUdR2gFn6v4VELcswhWXtnDWTDxEIB2TfjUqp3wup+bakI uGMoUYcSp7YPKbHql9RV9QGk2pHD78B8BqA+F2oJJ6DQvXFrEqJmdahIIP1PnNrDH+QA SQGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=zBtgAxmA; 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 n2si3386940edi.564.2020.10.01.03.54.35; Thu, 01 Oct 2020 03:54:58 -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=zBtgAxmA; 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 S1732195AbgJAKxX (ORCPT + 99 others); Thu, 1 Oct 2020 06:53:23 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:43052 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731131AbgJAKxM (ORCPT ); Thu, 1 Oct 2020 06:53:12 -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 091Ar9Lr064209; Thu, 1 Oct 2020 05:53:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1601549589; bh=zgrtzCIGRkZUluOTCMrRQjI65dX6+rZ7sdyXkY6/+MM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=zBtgAxmAJLf7Gl67FeznLPemuCtw1D2PpI6R6iblIX+UftzdR3AC0frm5d6zvrTL1 uotj11Y9/vn1IQHIJ9Pzb27Y39DC59KfN7t7mSuJHr9UUczgDeLEaM+fWjTebz04vk 4hbwbho7XtlyDpAmPoFPdnk3tJ13KC5UfvJ37I6I= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 091Ar9Y0074174 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 1 Oct 2020 05:53:09 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Thu, 1 Oct 2020 05:53:09 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE100.ent.ti.com (157.170.170.30) 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; Thu, 1 Oct 2020 05:53:08 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 091Ar7W6073934; Thu, 1 Oct 2020 05:53:08 -0500 From: Grygorii Strashko To: "David S. Miller" , , Jakub Kicinski , Vignesh Raghavendra CC: Sekhar Nori , , , Murali Karicheri , Grygorii Strashko Subject: [PATCH net-next 1/8] net: ethernet: ti: am65-cpsw: move ale selection in pdata Date: Thu, 1 Oct 2020 13:52:51 +0300 Message-ID: <20201001105258.2139-2-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201001105258.2139-1-grygorii.strashko@ti.com> References: <20201001105258.2139-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 ALE selection in am65_cpsw_pdata, so it can be selected basing on DT compatibility property. Signed-off-by: Grygorii Strashko --- 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(-) 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 { -- 2.17.1