From patchwork Mon Oct 2 18:08:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Wolsieffer X-Patchwork-Id: 13406508 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 14892E74901 for ; Mon, 2 Oct 2023 18:10:03 +0000 (UTC) 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=475FKT6+tuFic8XLmo1T6eBY+YyOiPAaEs6uVE24WWY=; b=zW2BH1bsUmJ+s0 npCXUVT9aPG1VNEf9ZByS+k3W+1m5huabj8c4+lkEQRJixF3GdcMZKtUkktIr2oDHEC9f9xX0PKT6 S7wytI9miETWOACt1SuDKd47RKNH+c//c6uQ4FnOscDicHiUv+79qZ98uyQpbH0MsZknu00lmjuYQ 5On5eoKfB3kr6WW0jqUaitg2t6/371P3qIlvUC3YjTbr3aIikzHx+P/I4zUk+on8UhNupimDMZ3Ea YTz/u4Bq3f3Ff+yIu+d5xoJq4IZQbGnFNaaLs6XXkkBNAjp6YcBKo85aCKIUxa2JpibJhEjgI2onN 7rrd/Lapccn2912PSyGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qnNML-00DByt-0d; Mon, 02 Oct 2023 18:09:33 +0000 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qnNMI-00DBy6-1a for linux-arm-kernel@lists.infradead.org; Mon, 02 Oct 2023 18:09:31 +0000 Received: by mail-qk1-x72e.google.com with SMTP id af79cd13be357-7741b18a06aso6407085a.1 for ; Mon, 02 Oct 2023 11:09:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hefring-com.20230601.gappssmtp.com; s=20230601; t=1696270169; x=1696874969; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=NfCq6MAu8bRwi9TEgatpoY4BVdbPJq248wgHhwcLCxU=; b=TUoCRjwF7hHMZyY7Afg69ti5dqxddJVEUx0EAywBbxRIfx+D8vTmeo/qBiYFlqAU+5 3EEGfgCvgqRCmF+7SSClTqN89kV2cwhM9ngjKInfzvEuXg7vghcGtzKocsAO3vc5zpXa PJgEwYPhl6XCyxGIk+jx3Zn5nlLJ3Gd0A/8oK2FjHVk5ub5xEhGPcwtZOEHkWM2/UEsi vq8NcJbpGjPB4ePU5+lHVi2w/XMZ+jTe/LEtWgEG6B6/tgoHXV0OYmZPyaykXZW/QioN llMmIkGhpTJPKWvXp1uXQkbOcnaN4HKdgwdFFPui19+gYH6eTutZgEDn57lAuVngj658 73kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696270169; x=1696874969; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NfCq6MAu8bRwi9TEgatpoY4BVdbPJq248wgHhwcLCxU=; b=LPCLBS0v2tiO4bg3nu86Hn/iOKVtvwvrgz3r/IKJUNP+CXlSsVa2dcpYEB5UB0pwNi RkoAHCzH1fckVs694rs6DXoyNntEap3nYjHeLgzlYbsHb+cHYdSi3gYLI2pVslfVJLe/ OB2JlA2ZUzyEc/NQzf/Nzp6Xib0ygjzspNt+HcadHlbeCwKbEsSYgwbQhZeNkrTA8zKf m/PuRts67kgUU9QDjmP5WRY3M/eoACVDGCYqSTfMv+PsfzgHeCMQJ7LVhyX0rUtQ4gaG uCbYJzbAXFspXXl4lHPZDCS7JcQaGa3ebS3eMcsCM3cCq2G19ovg9CoWpfIVvsz69O2D 53mA== X-Gm-Message-State: AOJu0YyWzDI2gbSS4XH0K6oZGcQTmTPqJrrCpiu0LQhKHahGP3XrZ/5S CgcVSN/3tapCUEbQHSuV8uJnQg== X-Google-Smtp-Source: AGHT+IHop+Asiy9bLSfXRnllAQF/F67qbTBnzT0eLQO8TWH47NHOTuxYVaMToaBRfrPoZTYvNxMALg== X-Received: by 2002:a05:620a:40c4:b0:774:1ac2:79be with SMTP id g4-20020a05620a40c400b007741ac279bemr16806248qko.53.1696270168810; Mon, 02 Oct 2023 11:09:28 -0700 (PDT) Received: from localhost.localdomain ([50.212.55.89]) by smtp.gmail.com with ESMTPSA id w15-20020ae9e50f000000b0077423f849c3sm7390255qkf.24.2023.10.02.11.09.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 11:09:28 -0700 (PDT) From: Ben Wolsieffer To: linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Michael Turquette , Stephen Boyd , Ben Wolsieffer Subject: [PATCH 0/2] ARM: stm32: add clock for pwrcfg syscon Date: Mon, 2 Oct 2023 14:08:52 -0400 Message-ID: <20231002180854.1603452-1-ben.wolsieffer@hefring.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231002_110930_530851_E8287345 X-CRM114-Status: GOOD ( 12.12 ) 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 The STM32F4/7 pwrcfg syscon was missing its clock, making it impossible to use after clk_disable_unused(). Simply adding the clock creates a circular dependency, because the syscon is used by the clock driver. This series resolves this dependency and then adds the clock. I tested this on a STM32F746 and verified that syscon writes now succeed even after clk_disable_unused(). Ben Wolsieffer (2): clk: stm32: initialize syscon after clocks are registered ARM: dts: stm32: add pwrcfg clock for stm32f4/7 arch/arm/boot/dts/st/stm32f429.dtsi | 1 + arch/arm/boot/dts/st/stm32f746.dtsi | 1 + drivers/clk/clk-stm32f4.c | 12 ++++++------ 3 files changed, 8 insertions(+), 6 deletions(-)