Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp184969pxt; Wed, 4 Aug 2021 08:40:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvIMnFKueeE6s7QxbynH0kp6Lzghr+uKBGBhViUanMhOeJ75rfQhqWRF3ZWYQYTlI9r/Py X-Received: by 2002:a17:906:c087:: with SMTP id f7mr25852079ejz.487.1628091608814; Wed, 04 Aug 2021 08:40:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628091608; cv=none; d=google.com; s=arc-20160816; b=nHleC5He4KcX3gR6hnlGEw1KaHxCL2m2ysJSX9pRRm+Fz3JonBXs4t6ePvzGEGOXmc 0/Pc6mzIDhw+SeRUJiPqkgG694WggSHa3YyO+NZvLTp9akYf9c15h38V3AoqoXt6T0w7 4haMZ/PQo99AhjJ5h1B2B4AT5tyEMerY4wVZM5YHiaJNOYO6rY9kWMPXbwSBStQyLu4u 2oDbwqILfhxKh+R4sTjoOLG5a20J8iivopqsBFqbyJkgAZelFdyPKbF6Q2joYu9uEkwD O4nhD/xUfEBKiiy/9QCY5x0aRneyhF0io9cdogo5NmuHlU06BrkJ/AmLC+rUoLXggZuU U7LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RHFa5uneH1vgnhwjmwIiYRoaj+badEIlp+PqhNvxBfY=; b=sx2W1jcz2r2g5qxcxM+dqTkXBRLQAUN5q1A2NlecZlyk6RbqsSJImHU7XY8MgoIuq7 21d80nqKa1HLHhX+AIRrtpSgk4qqgoCnT7ONmtzE7FNZoSivuUe7jGh2zt//FNtetj7A 91k1+hU/1M9w+9n/8MKZcvNWvnvOwE10zkwNKkMuVgivQSus2UaSb7CVJ91HOw/Ofnno W2sBpBpE7J/kNx3x/i1BjxP0e1IBpvnSa6fq9Giac8PCSqXI0oTkaiLyKEJMFHglxjwd DStL43PoBRfKTGgB9AwpKcC5MPnBgT2LOvTOKWA/gBIei4C+l/BtQlD3n11PLIfx8+yr d32Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NbPemvyS; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec43si2338142edb.295.2021.08.04.08.39.44; Wed, 04 Aug 2021 08:40:08 -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=@linaro.org header.s=google header.b=NbPemvyS; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239232AbhHDPgz (ORCPT + 99 others); Wed, 4 Aug 2021 11:36:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239159AbhHDPgs (ORCPT ); Wed, 4 Aug 2021 11:36:48 -0400 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D66DC06179C for ; Wed, 4 Aug 2021 08:36:35 -0700 (PDT) Received: by mail-io1-xd30.google.com with SMTP id m13so2868735iol.7 for ; Wed, 04 Aug 2021 08:36:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RHFa5uneH1vgnhwjmwIiYRoaj+badEIlp+PqhNvxBfY=; b=NbPemvyST8+o1EEm6g4AUqDNA4UOkufttCTvpmuvtoVSMvYMu33Xd9J/W6BQwhExRk cr6tmnNkQBVa5ORry17OcdY9xMAau76uDk5m5h6nWFOakKuwbX+fuOWgsTc3D7qdK6Pu OjWZOma8TSuQhuk2gXySr2+x06PqiAiNWQdktNeybjJ+c6TDcWUbQovRwldz/OPC9cOQ mtsXC09pZyFu5RrIDYPjLEWmOtv4jGuRomrLfPcUgyKD/ZlMxGrSSEbI5SX6iUvJX6Ka 3T+voiuaSJthEOqVLQy/TLpgC3cWaw+DCw/PEFBswjB1x99w5zifGP7dE7Rm0P8P34aF 1e2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RHFa5uneH1vgnhwjmwIiYRoaj+badEIlp+PqhNvxBfY=; b=B0RVjH7n0jEFim5CVcRgkM010zmOAKjhSdlB4cm6EE88FVIbx6EHSUYatWqo6Ph6kA SFqJn1cU3eiQUtlWCjcFjdTVtCBLa08icRtLr2sK4eBt/pEYqyc6+6Eos5WTu2NVbQET KVIZpCYaX3MzyF2FC0oHHGlVR5blLyIN5m/GrPePUJtoY3xy1EUwozjhTB6FRH6ou4fG 90925To3xlmvd6ZR2NKmyeKHZy1WzGwOmA4f6+r0oYkyMAtUU6I3qRtQV5uqhk5PPkhF iTp1+3yGO+RVhliKABUQzAy5gBdNzI3sTZyOv78f31847+sPZ72rOfNqFXKLf7cuFDa0 DbQQ== X-Gm-Message-State: AOAM532+i54n0I7RHxkKDMP4jhsne2+1XRXuW6imsbXrNVrdDvfWstZG g6JqKYyQ4/Flc5bKcgoPM5R2HA== X-Received: by 2002:a5e:9747:: with SMTP id h7mr789038ioq.92.1628091394745; Wed, 04 Aug 2021 08:36:34 -0700 (PDT) Received: from presto.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id z11sm1687480ioh.14.2021.08.04.08.36.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Aug 2021 08:36:34 -0700 (PDT) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: bjorn.andersson@linaro.org, evgreen@chromium.org, cpratapa@codeaurora.org, subashab@codeaurora.org, elder@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 6/6] net: ipa: move IPA flags field Date: Wed, 4 Aug 2021 10:36:26 -0500 Message-Id: <20210804153626.1549001-7-elder@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210804153626.1549001-1-elder@linaro.org> References: <20210804153626.1549001-1-elder@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ipa->flags field is only ever used in "ipa_clock.c", related to suspend/resume activity. Move the definition of the ipa_flag enumerated type to "ipa_clock.c". And move the flags field from the ipa structure and to the ipa_clock structure. Rename the type and its values to include "power" or "POWER" in the name. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa.h | 12 ------------ drivers/net/ipa/ipa_clock.c | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/net/ipa/ipa.h b/drivers/net/ipa/ipa.h index 71ba996096bb9..34152fe02963d 100644 --- a/drivers/net/ipa/ipa.h +++ b/drivers/net/ipa/ipa.h @@ -27,20 +27,9 @@ struct ipa_clock; struct ipa_smp2p; struct ipa_interrupt; -/** - * enum ipa_flag - IPA state flags - * @IPA_FLAG_RESUMED: Whether resume from suspend has been signaled - * @IPA_FLAG_COUNT: Number of defined IPA flags - */ -enum ipa_flag { - IPA_FLAG_RESUMED, - IPA_FLAG_COUNT, /* Last; not a flag */ -}; - /** * struct ipa - IPA information * @gsi: Embedded GSI structure - * @flags: Boolean state flags * @version: IPA hardware version * @pdev: Platform device * @completion: Used to signal pipeline clear transfer complete @@ -83,7 +72,6 @@ enum ipa_flag { */ struct ipa { struct gsi gsi; - DECLARE_BITMAP(flags, IPA_FLAG_COUNT); enum ipa_version version; struct platform_device *pdev; struct completion completion; diff --git a/drivers/net/ipa/ipa_clock.c b/drivers/net/ipa/ipa_clock.c index 9e77d4854fe03..a67b6136e3c01 100644 --- a/drivers/net/ipa/ipa_clock.c +++ b/drivers/net/ipa/ipa_clock.c @@ -45,11 +45,22 @@ struct ipa_interconnect { u32 peak_bandwidth; }; +/** + * enum ipa_power_flag - IPA power flags + * @IPA_POWER_FLAG_RESUMED: Whether resume from suspend has been signaled + * @IPA_POWER_FLAG_COUNT: Number of defined power flags + */ +enum ipa_power_flag { + IPA_POWER_FLAG_RESUMED, + IPA_POWER_FLAG_COUNT, /* Last; not a flag */ +}; + /** * struct ipa_clock - IPA clocking information * @count: Clocking reference count * @mutex: Protects clock enable/disable * @core: IPA core clock + * @flags: Boolean state flags * @interconnect_count: Number of elements in interconnect[] * @interconnect: Interconnect array */ @@ -57,6 +68,7 @@ struct ipa_clock { refcount_t count; struct mutex mutex; /* protects clock enable/disable */ struct clk *core; + DECLARE_BITMAP(flags, IPA_POWER_FLAG_COUNT); u32 interconnect_count; struct ipa_interconnect *interconnect; }; @@ -295,7 +307,7 @@ static void ipa_suspend_handler(struct ipa *ipa, enum ipa_irq_id irq_id) * More than one endpoint could signal this; if so, ignore * all but the first. */ - if (!test_and_set_bit(IPA_FLAG_RESUMED, ipa->flags)) + if (!test_and_set_bit(IPA_POWER_FLAG_RESUMED, ipa->clock->flags)) pm_wakeup_dev_event(&ipa->pdev->dev, 0, true); /* Acknowledge/clear the suspend interrupt on all endpoints */ @@ -388,7 +400,7 @@ static int ipa_suspend(struct device *dev) /* Endpoints aren't usable until setup is complete */ if (ipa->setup_complete) { - __clear_bit(IPA_FLAG_RESUMED, ipa->flags); + __clear_bit(IPA_POWER_FLAG_RESUMED, ipa->clock->flags); ipa_endpoint_suspend(ipa); gsi_suspend(&ipa->gsi); } -- 2.27.0