From patchwork Wed Aug 25 15:03:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tretter X-Patchwork-Id: 12457853 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A333DC4338F for ; Wed, 25 Aug 2021 15:09:20 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 6F09C61100 for ; Wed, 25 Aug 2021 15:09:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6F09C61100 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Kj+4KbmQRlm8vAsB79shLz5+/DcsvtRWSmN2PFaXdrc=; b=zIRzpXCUShPOIC zQzM83+aCmol2PpHgMZxDowg3+GtpwHeomJWWUb72B3JEv09lHiQP40BVQbuMbCuu2+xZShpd0FQ+ nfky8nk32WVp4oI7uiuU6g+WR2NL4Lgfq1gcUaKLpFG2FpyXxQu3z2U9OCRg/+MHtL6BM7tl47wab x5LZcRwtoAfFACB50ceAaRHIDKfvvOFP+QJTRaYhVdGa7tnKC4FY2skp1s2BnXANjExCctmQmzNNp jAAOWjmayei0pbvAo51mV44vwHIyOeTCd+gOYC9LiKA2y3fYHq7UcjVNTC+rIi6XduWApUxzvYF5g xokCy/7PYiR1i+/uJTtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mIuUa-007R7P-9v; Wed, 25 Aug 2021 15:07:04 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mIuQv-007PcW-8H for linux-arm-kernel@lists.infradead.org; Wed, 25 Aug 2021 15:03:20 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIuQs-0004QI-1N; Wed, 25 Aug 2021 17:03:14 +0200 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mIuQr-0005Pq-4q; Wed, 25 Aug 2021 17:03:13 +0200 Received: from mtr by dude03.red.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1mIuQr-00GvDf-3t; Wed, 25 Aug 2021 17:03:13 +0200 From: Michael Tretter To: linux-arm-kernel@lists.infradead.org Cc: michal.simek@xilinx.com, rajan.vaja@xilinx.com, jolly.shah@xilinx.com, m.tretter@pengutronix.de Subject: [PATCH v2 0/4] soc: xilinx: pm_domains: cleanup and fix PM_INIT_FINALIZE Date: Wed, 25 Aug 2021 17:03:09 +0200 Message-Id: <20210825150313.4033156-1-m.tretter@pengutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mtr@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210825_080317_398663_45EEEEE3 X-CRM114-Status: GOOD ( 12.15 ) 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 Hi, This is v2 of the series to cleanup and fix the zynqmp_pm_domains driver [0]. Patch 1 of this series fixes the ZynqMP PMU FW power management initialization, which was done by the wrong driver. PM_INIT_FINALIZE must be called from the zynqmp_pm_domains driver, which handles power domains, instead of the zynmp_power driver, which is responsible for suspend and shutdown. As a side effect, PM_INIT_FINALIZE powers down all devices that have not been requested, which might lead to misbehaving devices. Calling it from the sync_state callback ensures that all consumers have probed and are able to handle power management themselves. Patches 2 to 4 are various cleanup patches to improve the readability and debugging experience of the zynqmp_pm_domains driver. Michael [0] https://lore.kernel.org/linux-arm-kernel/20210317160410.2097178-1-m.tretter@pengutronix.de/ Changelog: v2: - move PM_INIT_FINALIZE to sync_state callback Michael Tretter (4): soc: xilinx: move PM_INIT_FINALIZE to zynqmp_pm_domains driver soc: xilinx: cleanup debug and error messages soc: xilinx: use a properly named field instead of flags soc: xilinx: add a to_zynqmp_pm_domain macro drivers/soc/xilinx/zynqmp_pm_domains.c | 91 +++++++++++++++----------- drivers/soc/xilinx/zynqmp_power.c | 1 - 2 files changed, 51 insertions(+), 41 deletions(-) Acked-by: Michal Simek Acked-by: Rajan Vaja