From patchwork Thu Jun 20 17:56:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Piotr Wojtaszczyk X-Patchwork-Id: 810015 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 283D2C2BD09 for ; Mon, 1 Jul 2024 12:24:18 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 69D6A2343; Mon, 1 Jul 2024 14:24:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 69D6A2343 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1719836656; bh=oTww1XOoHQ1WZkCJUUsZn1fHEHSTJ8ydZDprCFOKPl0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=gvcnvdRLsrANR308Ax8tM8gZfrWRJvv5T1gdpQaj/0QrTVZxvkA5pQ1dbYqlPUgfs pv7A4NfEUvINDvuFg6Z6wuQPMZgsyaB1dEtnvj/AkjFsFcNlwefpCykuIa9RRF1bs3 A8rnFdXDp3r9mpOcptTpzCaEc9XcWLXolCHRzTEs= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 07B16F808CB; Mon, 1 Jul 2024 14:20:42 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 32E86F80C17; Mon, 1 Jul 2024 14:20:42 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B73A7F800ED; Thu, 20 Jun 2024 19:59:23 +0200 (CEST) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D5AA5F800ED for ; Thu, 20 Jun 2024 19:59:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D5AA5F800ED Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=timesys-com.20230601.gappssmtp.com header.i=@timesys-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=Kfzp3PQC Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a6fb341a7f2so151884666b.1 for ; Thu, 20 Jun 2024 10:59:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timesys-com.20230601.gappssmtp.com; s=20230601; t=1718906359; x=1719511159; darn=alsa-project.org; 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=R+nbkylU75B66T8IPhGtcEUJs01o0nAAuyIYHNhQRcE=; b=Kfzp3PQCrsBFxbBxoFec/5hdovz3pfY/WcgeOhUkxmY8K2yQwyIVMewnwMy9fh2MoL 1Wyis3o78/EUvpMPZCQpo1nWetG1TWPlDmLZikaspIehGDj6gjWZS7sTBimZrA0jNgaB ZvFbB/KbZ1hx/Nnay4vsJG8NJ1FSFeC+xTffaBbIHx7xA2WmbpLmaOVHK9QKbGXFcavo z1hg0KY8rEI20VC/JZ2Yd5HoHVTfOaOxJONrgSnI2+9sxGLhD0UL6DqkF/ul/kqk/rU3 N3ROq6+rqQ46wB6rDwX9t25sd1v01tNmWZkASL8+4VWHfWPtz3rNvg9bYrua8jyhsmjo U/zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718906359; x=1719511159; 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=R+nbkylU75B66T8IPhGtcEUJs01o0nAAuyIYHNhQRcE=; b=GZbXv7r8D/7zqDmzFj1rmb7easwd0OvCNb3MfvwHXjYxnMhxbEXpKlUosYooUyRX1m Vcz4DPiTNKhjfKvmHwUCVy6A5hPFnfII7zXSDPeBJ38M430KtaC7H3+quX3ZRh7582oM iKtDGEMAzgD+rk2ggSP2QvQ6N7tBxEQnCedKOq2n0lZNjPNGdPGSJVDV+QlovfbNEYbG 4yU4CclETuYJZvWmRqZTLnijCr9v1Ru54SNWZbozC0ace6nx5MbSO5n1qNM8c01MUwa/ Uv5m3F/tUMOYQcwblf7gXHwZjFf6k4AEP9XdxirVTXLyF2PmAQi2LEug9ZdU3UKiFqNm A9cQ== X-Forwarded-Encrypted: i=1; AJvYcCXapTNXH8D6nu9UsWwudQQC0nIXBxzPsEosinA8kDnpFNnBw8mm3iAknrU2U9fQ/9QoIyhE90vYoYlTDlD4XtH7PQFh3omv6JUq7gc= X-Gm-Message-State: AOJu0YyaZCbBBXS03zA3WO9inSQkpnhMLs5824+rnFvRpbVd5dqyG5TL OCHfoidud9/62Sbu39B/wAjXYKCshu29RolCIRSVzVgBLcFfKYXpqGWxgtcvK50= X-Google-Smtp-Source: AGHT+IGwiD3L95St/ehfaodQi7lOhfrdpQHGauU5aloxC0usOuACZecYTLoGty75spYidqSIKDxV5Q== X-Received: by 2002:a17:907:7293:b0:a6f:6f4a:b25c with SMTP id a640c23a62f3a-a6fab60a2acmr584690566b.14.1718906359615; Thu, 20 Jun 2024 10:59:19 -0700 (PDT) Received: from localhost.localdomain ([91.216.213.152]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56f42e80sm781370766b.186.2024.06.20.10.59.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 10:59:19 -0700 (PDT) From: Piotr Wojtaszczyk To: Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "J.M.B. Downing" , Piotr Wojtaszczyk , Vladimir Zapolskiy , Liam Girdwood , Mark Brown , Russell King , Michael Turquette , Stephen Boyd , Andi Shyti , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Jaroslav Kysela , Takashi Iwai , Arnd Bergmann , Yangtao Li , Li Zetao , Michael Ellerman , Chancel Liu , dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-sound@vger.kernel.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, linux-mtd@lists.infradead.org Cc: Markus Elfring Subject: [Patch v4 05/10] clk: lpc32xx: initialize regmap using parent syscon Date: Thu, 20 Jun 2024 19:56:36 +0200 Message-Id: <20240620175657.358273-6-piotr.wojtaszczyk@timesys.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240620175657.358273-1-piotr.wojtaszczyk@timesys.com> References: <20240620175657.358273-1-piotr.wojtaszczyk@timesys.com> MIME-Version: 1.0 X-MailFrom: piotr.wojtaszczyk@timesys.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: KAHFFBO7JCHKVILOOUTSINJSBXBCGC2W X-Message-ID-Hash: KAHFFBO7JCHKVILOOUTSINJSBXBCGC2W X-Mailman-Approved-At: Mon, 01 Jul 2024 12:20:16 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This allows to share the regmap with other simple-mfd devices like nxp,lpc32xx-dmamux Signed-off-by: Piotr Wojtaszczyk --- Changes for v4: - This patch is new in v4 drivers/clk/Kconfig | 1 + drivers/clk/nxp/clk-lpc32xx.c | 10 ++-------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 3e9099504fad..85ef57d5cccf 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -346,6 +346,7 @@ config COMMON_CLK_LOONGSON2 config COMMON_CLK_NXP def_bool COMMON_CLK && (ARCH_LPC18XX || ARCH_LPC32XX) select REGMAP_MMIO if ARCH_LPC32XX + select MFD_SYSCON if ARCH_LPC32XX select MFD_SYSCON if ARCH_LPC18XX help Support for clock providers on NXP platforms. diff --git a/drivers/clk/nxp/clk-lpc32xx.c b/drivers/clk/nxp/clk-lpc32xx.c index d0f870eff0d6..2a183a9ded93 100644 --- a/drivers/clk/nxp/clk-lpc32xx.c +++ b/drivers/clk/nxp/clk-lpc32xx.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -1511,17 +1512,10 @@ static void __init lpc32xx_clk_init(struct device_node *np) return; } - base = of_iomap(np, 0); - if (!base) { - pr_err("failed to map system control block registers\n"); - return; - } - - clk_regmap = regmap_init_mmio(NULL, base, &lpc32xx_scb_regmap_config); + clk_regmap = syscon_node_to_regmap(np->parent); if (IS_ERR(clk_regmap)) { pr_err("failed to regmap system control block: %ld\n", PTR_ERR(clk_regmap)); - iounmap(base); return; }