From patchwork Mon Oct 21 13:58:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Machon X-Patchwork-Id: 13844294 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1D4A8D15DA8 for ; Mon, 21 Oct 2024 14:54:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References :Message-ID:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VLa0orpWQniTuz5v5eEzc+Fjdz6QnDroS9MhU7p3BMg=; b=ck9CQioTlDg4n1rpJ2ZQZ0CwZ4 hGT/x0sQEa2ULtEBOthe3vi0Bz4kSVGDhDYDjkWSTdC9pOLl+8Mka6iMr6L8Zg3SraJoJ0Kv/4njr j414sDxGGuSx6LN8zS8pub7G4QuGxX1u11QxbzUkQAmP9hNMGIsGClhjgkVlmWiustglyGxz3T0tR nI6S1GuyF/0a7iNpbf15U46t47MhPsLkAbL1tfP3wFhaVERtX5IhcPI6yyKoTKiAFiLoHUttSVYnc WPkh9LldvQfqBWlNiuGVPA5nRtCx9hvq/5tcgfZiYH6Gek60zG4XLU/bZiBbV8jcH5EN0BSGOK1SS 32iU2t1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2tni-00000007gSv-4AhI; Mon, 21 Oct 2024 14:54:31 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t2swW-00000007WUo-2jug for linux-arm-kernel@lists.infradead.org; Mon, 21 Oct 2024 13:59:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1729519172; x=1761055172; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=5BP7V8Lac3ajJdEEbTR+FHyuw9d1rUOtkz4eBPIA48A=; b=0p2VBwwoEzN/HKLM7VxW+RD0LjKqxgoyAYOMtwYhfBg9K7tCNQhjtdKn 4HoptXwFoA0vq/clJWVcTpr+6y1MtMLYEnF/6Xz6rIeIc6sceAx3w/uMZ Hx2Tab7wsnBH/2fXJ+buBCef1l27Xso9C8z6oFZmCt4dMZ296EdMZd2e7 TmitDHCWyXZ0RpCd1BCnvEjmrer84aSDFACe5FVphOsVgCaBXUegYiqwd Yg4IxCxn/L90x2IYdFwobl5xrUm1ZNnrMWwi9zVrg8flN6UKq/rYuwaAV xpYYrCOVjdtUfLM6hFxk/CucW1J7ZdlWuCwqYXbAFAOHhT6IdZzXz8lNO A==; X-CSE-ConnectionGUID: vy9idxw6SZC3eWQLplrmOQ== X-CSE-MsgGUID: s9v7KZqER1mceKI9uLtLCw== X-IronPort-AV: E=Sophos;i="6.11,221,1725346800"; d="scan'208";a="33285679" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 21 Oct 2024 06:59:30 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 21 Oct 2024 06:59:27 -0700 Received: from DEN-DL-M70577.microchip.com (10.10.85.11) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Mon, 21 Oct 2024 06:59:23 -0700 From: Daniel Machon Date: Mon, 21 Oct 2024 15:58:45 +0200 Subject: [PATCH net-next 08/15] net: lan969x: add constants to match data MIME-Version: 1.0 Message-ID: <20241021-sparx5-lan969x-switch-driver-2-v1-8-c8c49ef21e0f@microchip.com> References: <20241021-sparx5-lan969x-switch-driver-2-v1-0-c8c49ef21e0f@microchip.com> In-Reply-To: <20241021-sparx5-lan969x-switch-driver-2-v1-0-c8c49ef21e0f@microchip.com> To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , , Lars Povlsen , Steen Hegelund , , , , , , Richard Cochran , Rob Herring , Krzysztof Kozlowski , Conor Dooley , , , CC: , , , Steen Hegelund , X-Mailer: b4 0.14-dev X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241021_065932_745178_A4C71673 X-CRM114-Status: GOOD ( 10.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the lan969x constants to match data. These are already used throughout the Sparx5 code (introduced in earlier series [1]), so no need to update any code use. [1] https://lore.kernel.org/netdev/20241004-b4-sparx5-lan969x-switch-driver-v2-0-d3290f581663@microchip.com/ Reviewed-by: Steen Hegelund Signed-off-by: Daniel Machon --- drivers/net/ethernet/microchip/lan969x/lan969x.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/net/ethernet/microchip/lan969x/lan969x.c b/drivers/net/ethernet/microchip/lan969x/lan969x.c index d99c1396e16a..0671347e2258 100644 --- a/drivers/net/ethernet/microchip/lan969x/lan969x.c +++ b/drivers/net/ethernet/microchip/lan969x/lan969x.c @@ -103,11 +103,32 @@ static const struct sparx5_regs lan969x_regs = { .fsize = lan969x_fsize, }; +static const struct sparx5_consts lan969x_consts = { + .n_ports = 30, + .n_ports_all = 35, + .n_hsch_l1_elems = 32, + .n_hsch_queues = 4, + .n_lb_groups = 5, + .n_pgids = 1054, /* (1024 + n_ports) */ + .n_sio_clks = 1, + .n_own_upsids = 1, + .n_auto_cals = 4, + .n_filters = 256, + .n_gates = 256, + .n_sdlbs = 496, + .n_dsm_cal_taxis = 5, + .buf_size = 1572864, + .qres_max_prio_idx = 315, + .qres_max_colour_idx = 323, + .tod_pin = 4, +}; + const struct sparx5_match_data lan969x_desc = { .iomap = lan969x_main_iomap, .iomap_size = ARRAY_SIZE(lan969x_main_iomap), .ioranges = 2, .regs = &lan969x_regs, + .consts = &lan969x_consts, }; MODULE_DESCRIPTION("Microchip lan969x switch driver");