Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp300613lqh; Thu, 28 Mar 2024 02:25:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVnNky2PnjIuc8uM6MLq9adGdq5rrc6BhLGJfN5xWPaheo90HyVnMrvsBtRlnu25Bau1UozKNyNwayEjNiBvtulEYS9FdXlJmPOEWhcog== X-Google-Smtp-Source: AGHT+IHcgmqHuVjxOYmbq9ru40o8ECNKhJ97GJ1dN3gjKlZleB8JZA1I/tjmwFShz+wpgYlse++l X-Received: by 2002:ac8:7d91:0:b0:431:760f:beb4 with SMTP id c17-20020ac87d91000000b00431760fbeb4mr2553237qtd.22.1711617940121; Thu, 28 Mar 2024 02:25:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711617940; cv=pass; d=google.com; s=arc-20160816; b=KpNGi4C5BvRrk82rD/+6ci0Pm99S9ULsUYPHsF5TE15qaxXgNt8UtAhtf9YDsZRNwm VzQ8QCcvu54TyhOaXLL4LwAFeYZ3D8OkMGhASXO8cpjEfrdOh8MxqhZSRJJfix5VAX49 ty/o9l88GIJPT5AiNrfGooL1yhcREJnbMwycURZC9kKcRDVeXm3qB8RstyJOYJaMC3FU HITrNHgolVXJ9xwpUIgFgEyId0v/J//n6YWfo2D3Dah2/rC5VCJPU17mXdwD38eY4VFS fgP16u9l0svKZoxc4FpmyPGEAeiMdh3BtghoHJf+WVu5z/5xnTGUxq1PeGS+1LEs8FqZ YF7A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=GP9+afefXmxrn552E+5zoI9Qrw0HgBxF5UsTwrTB7R0=; fh=pR0Ei2Dq2pO9AeZtyck5rKvOnOpWXshiwo5So6oOqbI=; b=nBs7OKd/MAPsgF42w99JRzk0Xrwl++6LaWaXrSTOD6+owPrAtVJf4OcYKrvofcZvLE px9d+gZDjrXR+m1SgjH8Wv5wRmjhm79/AK+ZHILeRArDE4et3Thsm20x6E3dwIPeDTDe O5hNyEBaIaGb+V+9zRY8ub0VKV+LAQUBDyV7kK1C6XS/nJMOdLPFWFm1EQcaxkjLsSyY iKeT2ymrn3lK/W6dYTriA4OJUu5sgv5T2aeJt4CblA4IGC4ssnjlEai19nY1oeD8LUYH TveFKU2fEVQ8oOzxn4E/a4BTUkz7PFtkpvxXusFs5tsvKr51w82HiewH0/x2j+nv2VHA 1NMA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kbFpXJEA; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-122676-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122676-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f15-20020ac87f0f000000b004312033dc3dsi983946qtk.656.2024.03.28.02.25.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 02:25:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-122676-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kbFpXJEA; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-122676-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122676-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C86031C29D4F for ; Thu, 28 Mar 2024 09:25:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F3EA7C6C9; Thu, 28 Mar 2024 09:23:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kbFpXJEA" Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A74E7BB12; Thu, 28 Mar 2024 09:23:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711617809; cv=none; b=LjQ414OtzGQuFm6p1hSrvikrgg3pP0gGbe6g1c8J0Q9bCNqjFfqB59ZrzMJHIR+LVyhGNKSNcXwbWQcvOrX356LAxNcLBgd2ii11VZzTr31wQphfeXgAH15h1nizl3KpN5cjfEQV5GeohgSJUeCu89Gjxupm3z33aUBmj6QZ12g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711617809; c=relaxed/simple; bh=6yqLLrbyRf8n8iGwl36fXaImdnYsuitbiC91ybrCgGg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=AVguuItDV0Hw+jv5VmRfs3RvkPVTm4ztEY9TrF+NAC2f43guzUwJW9zEFUVnbwa6bcWN4rOJB4WGl4Im1YWC5IjBg+7h6WaPadJH2Fvs/o8ss/OXU9ojuZen1hns5vk38gKGvIK9xQKptBrBKNGnKmesfN2nvWU5PlVmSdPWLTg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kbFpXJEA; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-513d212f818so694220e87.2; Thu, 28 Mar 2024 02:23:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711617806; x=1712222606; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=GP9+afefXmxrn552E+5zoI9Qrw0HgBxF5UsTwrTB7R0=; b=kbFpXJEA+JfkGAuELbyMYh1cR3Yy8/TgKVBKB66/7G+CrRypi0CU9coA0mxuy7lob0 L1cyYfgf4Vy1w9PL0gfFX4GG2Mng4pcIQy18XP8tzzUmrySb84fijh2r1Ge7Qmfwy+29 skLlU4V1b+ucJDVo+eQUPDPD/ovvPlEpMQiUDGRc1xcDMlhNYvnSVVBD2ZLSoZz4r6ja c9lq0dWsvj55Waqx3n6YXZWiZNY+sJTj8Qr4xS3RKzld+55PM6sR8d+vpfj4BJOqO76Q R+4zvrHrAFJzOt2/nFuxQRx7UgOmCFTQek0N/YzrI6glGjNaiopE0RzwYKmXlXWAezGR CbKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711617806; x=1712222606; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GP9+afefXmxrn552E+5zoI9Qrw0HgBxF5UsTwrTB7R0=; b=hEDR2veY/56/JkHepj80ceBsnLU0KQmo1VzwzEfy7bAN1Kc2RLB/Dm2puFWVM2f+nZ DzjN/1L7hogtIoTAITHga47PHvx2ioBlRC8xrGJ4nnISQHuxuWA2tFYGQCdUHslSyve4 qelwD0OA96EcoTCn0Az6HBulCVCrQ87Kdo/NRg8J4zow+TSy93+F9Hed581sTa88qfv1 dDHku1CXyWe5hC39XgjK7rHWtgWZN8B1CGE4GApFupwNhMkamjt0eyK8QvHhCJypNHiv cNkPBqtOAYokEIRP6FIObMSg2NDH9+8sw7AKOFWHWG8PocjSkCI89aB6uX8MnMOSiTj7 7IAg== X-Forwarded-Encrypted: i=1; AJvYcCVb00Ofk5bq8oOUnD2yY3Rwr0vuSu0vHkbaIBAcuPw6JD/a9dpNh6yTUmo8lkta0VhmaTOc9cXX/Mud9ebJwl7UThQdNsVznm3+uouDo0itq2EYBzoWOBLn6Vo01NC6yslv1VIy+1sZ X-Gm-Message-State: AOJu0YwcF5TzHYMFXM/qu2EOCft5XeSY5bfPuh3uKB+dZJktgnnUjvaa WIRHEVq8PgMoAql+5QwAHaa3ykf7LHLRDfWUN0L70038nCREdlbC X-Received: by 2002:a19:ca43:0:b0:513:d01e:b68 with SMTP id h3-20020a19ca43000000b00513d01e0b68mr1303471lfj.3.1711617805404; Thu, 28 Mar 2024 02:23:25 -0700 (PDT) Received: from [192.168.20.102] (57657817.catv.pool.telekom.hu. [87.101.120.23]) by smtp.googlemail.com with ESMTPSA id cf2-20020a0564020b8200b0056b0af78d80sm609298edb.34.2024.03.28.02.23.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 02:23:25 -0700 (PDT) From: Gabor Juhos Date: Thu, 28 Mar 2024 10:23:10 +0100 Subject: [PATCH v4 1/5] clk: qcom: apss-ipq-pll: reuse Stromer reg offsets from 'clk_alpha_pll_regs' Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240328-apss-ipq-pll-cleanup-v4-1-eddbf617f0c8@gmail.com> References: <20240328-apss-ipq-pll-cleanup-v4-0-eddbf617f0c8@gmail.com> In-Reply-To: <20240328-apss-ipq-pll-cleanup-v4-0-eddbf617f0c8@gmail.com> To: Bjorn Andersson , Konrad Dybcio , Dmitry Baryshkov , Michael Turquette , Stephen Boyd Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Gabor Juhos X-Mailer: b4 0.13.0 The register offset array defined locally for the CLK_ALPHA_PLL_TYPE_STROMER_PLUS is the same as the entry defined for CLK_ALPHA_PLL_TYPE_STROMER in the 'clk_alpha_pll_regs' array. To avoid code duplication, remove the local definition and use the global one instead. No functional changes. Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Gabor Juhos --- Changes in v4: - no changes - Link to v3: https://lore.kernel.org/r/20240326-apss-ipq-pll-cleanup-v3-1-15c4aeeb14ac@gmail.com Changes in v3: - rebase on top of v6.9-rc1 - add Reviewed-by tag from Konrad - Link to v2: https://lore.kernel.org/r/20240321-apss-ipq-pll-cleanup-v2-1-201f3cf79fd4@gmail.com Changes in v2: - add Reviewed-by tag from Dmitry - Link to v1: https://lore.kernel.org/r/20240318-apss-ipq-pll-cleanup-v1-1-52f795429d5d@gmail.com Depends on the following patches: - "clk: qcom: apss-ipq-pll: use stromer ops for IPQ5018 to fix boot failure" Link: https://lore.kernel.org/r/20240315-apss-ipq-pll-ipq5018-hang-v2-1-6fe30ada2009@gmail.com - "clk: qcom: clk-alpha-pll: Stromer register cleanup" Link: https://lore.kernel.org/r/20240311-alpha-pll-stromer-cleanup-v1-0-f7c0c5607cca@gmail.com --- drivers/clk/qcom/apss-ipq-pll.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/drivers/clk/qcom/apss-ipq-pll.c b/drivers/clk/qcom/apss-ipq-pll.c index dfffec2f06ae..ed3e6405f99c 100644 --- a/drivers/clk/qcom/apss-ipq-pll.c +++ b/drivers/clk/qcom/apss-ipq-pll.c @@ -24,17 +24,6 @@ static const u8 ipq_pll_offsets[][PLL_OFF_MAX_REGS] = { [PLL_OFF_TEST_CTL] = 0x30, [PLL_OFF_TEST_CTL_U] = 0x34, }, - [CLK_ALPHA_PLL_TYPE_STROMER_PLUS] = { - [PLL_OFF_L_VAL] = 0x08, - [PLL_OFF_ALPHA_VAL] = 0x10, - [PLL_OFF_ALPHA_VAL_U] = 0x14, - [PLL_OFF_USER_CTL] = 0x18, - [PLL_OFF_USER_CTL_U] = 0x1c, - [PLL_OFF_CONFIG_CTL] = 0x20, - [PLL_OFF_STATUS] = 0x28, - [PLL_OFF_TEST_CTL] = 0x30, - [PLL_OFF_TEST_CTL_U] = 0x34, - }, }; static struct clk_alpha_pll ipq_pll_huayra = { @@ -57,12 +46,7 @@ static struct clk_alpha_pll ipq_pll_huayra = { static struct clk_alpha_pll ipq_pll_stromer = { .offset = 0x0, - /* - * Reuse CLK_ALPHA_PLL_TYPE_STROMER_PLUS register offsets. - * Although this is a bit confusing, but the offset values - * are correct nevertheless. - */ - .regs = ipq_pll_offsets[CLK_ALPHA_PLL_TYPE_STROMER_PLUS], + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_STROMER], .flags = SUPPORTS_DYNAMIC_UPDATE, .clkr = { .enable_reg = 0x0, @@ -80,7 +64,11 @@ static struct clk_alpha_pll ipq_pll_stromer = { static struct clk_alpha_pll ipq_pll_stromer_plus = { .offset = 0x0, - .regs = ipq_pll_offsets[CLK_ALPHA_PLL_TYPE_STROMER_PLUS], + /* + * The register offsets of the Stromer Plus PLL used in IPQ5332 + * are the same as the Stromer PLL's offsets. + */ + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_STROMER], .flags = SUPPORTS_DYNAMIC_UPDATE, .clkr = { .enable_reg = 0x0, -- 2.44.0