From nobody Thu Nov 14 17:10:28 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9DA3EB64D8 for ; Wed, 21 Jun 2023 18:27:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231829AbjFUS1K (ORCPT ); Wed, 21 Jun 2023 14:27:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231586AbjFUS0q (ORCPT ); Wed, 21 Jun 2023 14:26:46 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E91AD1FC7 for ; Wed, 21 Jun 2023 11:26:29 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3f9c2913133so9146785e9.1 for ; Wed, 21 Jun 2023 11:26:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1687371988; x=1689963988; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/ds8NiiaWx7S6UP8O9D/ooCMxtDTCkVYtSDsiDSpfu8=; b=HL85Tufcp3fRrygkYMd0TVOflu/rc70QpIsmTi6ffrRAQyZbi4wqOz8kH8us4ieUHr Hu6SIvmaFDT+2zQ7cJWGJXPq/sFTXjEM7EXfuopbvY6WZ9nij1MwKB4UsI1O7bG4JA9V j0jM8Qbh0JEFgIbDY/dqUhjwBz3BjNJ0LkEKz1MsC4wTOcmQhsdex7nSA//2ZWUlVfyU /PiU1dQVxsJF+CMrQpsNulRf1DPoramDDii2FlRcI/fe5Tyvdm/vhvk65w2pWjjxpKNh dpPnVVZNM4cbWVYtWmOX0gcOssUw7nZdVG4uyKl3PQ1MbTieo64ihbQibdCqjc9l0Qzl VuLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687371988; x=1689963988; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/ds8NiiaWx7S6UP8O9D/ooCMxtDTCkVYtSDsiDSpfu8=; b=Rdw5mSpbJBWLlGxLdjMMfNACZ8G7Xxvz1nv1iB6YZOXNHMFlSI4UzHCzIqAOxt+MNV Zy9vyXONHl2We9eTebzctlhyCTSnVPFtIh+/poeNk9kZ+dFp1hbZVn5XojhI8+vUaGN7 7DmfagLwDYyPvxj2KzHO+PDk14XlPLzchBKhl5s92B1+QsVvXRDQ6nIII0f5PqdjUOfl vZEIBwlg+5t2AGi0tFtFCYf/jCYQtChejtHX/PbgLv/O0QuhH5vpLyj2H4OZSdAi5cBU NSU6c8CiISJHh+YdpcIzKEIo/ZEnyoDNjMAL1xDhfDvnloyUzVR24ustqNZ0zhyydFUb V6aA== X-Gm-Message-State: AC+VfDwyrXgE58BJUJj6B0yo8iOA9L3ZxdAqQCBJIZkFlLnofL/Ux+rN lXKakwMdTQu2L/1DzxH9/9aP1Q== X-Google-Smtp-Source: ACHHUZ4lLdaAdUOFO06bSwskKbze5TICqWInKMtVygi44QZUdBPafa+94OQU2ihmZOLwJTfHpXjiyA== X-Received: by 2002:a5d:6685:0:b0:30f:bc92:a537 with SMTP id l5-20020a5d6685000000b0030fbc92a537mr10988495wru.33.1687371988168; Wed, 21 Jun 2023 11:26:28 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:a69f:8ee3:6907:ccdf]) by smtp.gmail.com with ESMTPSA id z13-20020adff74d000000b0030af15d7e41sm5176994wrp.4.2023.06.21.11.26.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 11:26:27 -0700 (PDT) From: Bartosz Golaszewski To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Vinod Koul , Bhupesh Sharma , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thierry Reding , Jonathan Hunter , Richard Cochran , Matthias Brugger , AngeloGioacchino Del Regno Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, linux-mediatek@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH net-next 12/12] net: stmmac: replace the en_tx_lpi_clockgating field with a flag Date: Wed, 21 Jun 2023 20:25:58 +0200 Message-Id: <20230621182558.544417-13-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230621182558.544417-1-brgl@bgdev.pl> References: <20230621182558.544417-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bartosz Golaszewski Drop the boolean field of the plat_stmmacenet_data structure in favor of a simple bitfield flag. Signed-off-by: Bartosz Golaszewski --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 4 ++-- include/linux/stmmac.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/ne= t/ethernet/stmicro/stmmac/stmmac_main.c index 2d68a6e84b0e..efe85b086abe 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -421,7 +421,7 @@ static int stmmac_enable_eee_mode(struct stmmac_priv *p= riv) /* Check and enter in LPI mode */ if (!priv->tx_path_in_lpi_mode) stmmac_set_eee_mode(priv, priv->hw, - priv->plat->en_tx_lpi_clockgating); + priv->plat->flags & STMMAC_FLAG_EN_TX_LPI_CLOCKGATING); return 0; } =20 diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/driver= s/net/ethernet/stmicro/stmmac/stmmac_platform.c index 5a67af4526c7..0be3113197b1 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -465,8 +465,8 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8= *mac) plat->force_sf_dma_mode =3D of_property_read_bool(np, "snps,force_sf_dma_mode"); =20 - plat->en_tx_lpi_clockgating =3D - of_property_read_bool(np, "snps,en-tx-lpi-clockgating"); + if (of_property_read_bool(np, "snps,en-tx-lpi-clockgating")) + plat->flags |=3D STMMAC_FLAG_EN_TX_LPI_CLOCKGATING; =20 /* Set the maxmtu to a default of JUMBO_LEN in case the * parameter is not present in the device tree. diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index c3769dad8238..ef67dba775d0 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -215,6 +215,7 @@ struct dwmac4_addrs { #define STMMAC_FLAG_EXT_SNAPSHOT_EN BIT(8) #define STMMAC_FLAG_INT_SNAPSHOT_EN BIT(9) #define STMMAC_FLAG_RX_CLK_RUNS_IN_LPI BIT(10) +#define STMMAC_FLAG_EN_TX_LPI_CLOCKGATING BIT(11) =20 struct plat_stmmacenet_data { int bus_id; @@ -280,7 +281,6 @@ struct plat_stmmacenet_data { int has_gmac4; int rss_en; int mac_port_sel_speed; - bool en_tx_lpi_clockgating; int has_xgmac; u8 vlan_fail_q; unsigned int eee_usecs_rate; --=20 2.39.2