From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D02CB3C01; Tue, 27 May 2025 17:35:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748367334; cv=none; b=INpRXzm2YN2+374KNHrUepAFEy2kPnASCpnBtVSSdpT5pKxeL3gLh8dGt8xd6N9TDqKtEkk0CMJKv51HW4AN7QqbUujmgNYx9i+22X0r23ShtcZo7fhkvrwhF4R6Dq52FRrTdJJtgO6jYh7F01DAN7Y2ycJ0MT7GQ/NWJ68GDgE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748367334; c=relaxed/simple; bh=q9dGDe3BThzSIPme6f+HXLsLii9eMK9zDu15pOzRq0M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d2zfgvEm25iFyGvInKK2lqinDuvFUdiqvt87lCHhNn4B4iMreWOoH8rxtcoDkchB7VeaUIoNKk1htwZbIxsbnQc2+8kBY6P93crvheTh81jwSn1x/JgYrE1N+4g8KNKM6VJGK/fDZbNYvRi8jlZrC8oJpC/w0m9bTwifRMI8NtY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AWHaZDut; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="AWHaZDut" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F01BC4CEE9; Tue, 27 May 2025 17:35:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748367332; bh=q9dGDe3BThzSIPme6f+HXLsLii9eMK9zDu15pOzRq0M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AWHaZDutessUHaoeg0zMS/TRWAjyvCCpoEWbqrtkKTGRFBjH7VoeuF6gmU8cFQSeq Pn0EWgvIDmYp6yp8GjEvzd4WXaYOXZvKgEhPKVDeeGaS+LQc1dJtnZ1/v+ckwquMKQ 0ejacyQ+qQmWexrrHqMIRN0q7ORuTkFGo0HgJ5zs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Andrew Davis , Nishanth Menon , Sasha Levin Subject: [PATCH 6.14 346/783] soc: ti: k3-socinfo: Do not use syscon helper to build regmap Date: Tue, 27 May 2025 18:22:23 +0200 Message-ID: <20250527162527.153795184@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250527162513.035720581@linuxfoundation.org> References: <20250527162513.035720581@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andrew Davis [ Upstream commit a5caf03188e44388e8c618dcbe5fffad1a249385 ] The syscon helper device_node_to_regmap() is used to fetch a regmap registered to a device node. It also currently creates this regmap if the node did not already have a regmap associated with it. This should only be used on "syscon" nodes. This driver is not such a device and instead uses device_node_to_regmap() on its own node as a hacky way to create a regmap for itself. This will not work going forward and so we should create our regmap the normal way by defining our regmap_config, fetching our memory resource, then using the normal regmap_init_mmio() function. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20250123181726.597144-1-afd@ti.com Signed-off-by: Nishanth Menon Signed-off-by: Sasha Levin --- drivers/soc/ti/k3-socinfo.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/soc/ti/k3-socinfo.c b/drivers/soc/ti/k3-socinfo.c index 4fb0f0a248288..704039eb3c078 100644 --- a/drivers/soc/ti/k3-socinfo.c +++ b/drivers/soc/ti/k3-socinfo.c @@ -105,6 +105,12 @@ k3_chipinfo_variant_to_sr(unsigned int partno, unsigned int variant, return -ENODEV; } +static const struct regmap_config k3_chipinfo_regmap_cfg = { + .reg_bits = 32, + .val_bits = 32, + .reg_stride = 4, +}; + static int k3_chipinfo_probe(struct platform_device *pdev) { struct device_node *node = pdev->dev.of_node; @@ -112,13 +118,18 @@ static int k3_chipinfo_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct soc_device *soc_dev; struct regmap *regmap; + void __iomem *base; u32 partno_id; u32 variant; u32 jtag_id; u32 mfg; int ret; - regmap = device_node_to_regmap(node); + base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(base)) + return PTR_ERR(base); + + regmap = regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg); if (IS_ERR(regmap)) return PTR_ERR(regmap); -- 2.39.5