From patchwork Thu Mar 21 07:49:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabor Juhos X-Patchwork-Id: 13598440 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 ABF0453819; Thu, 21 Mar 2024 07:50:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711007412; cv=none; b=ZNxELGcxLklYBXHVDJya5AXW1UVrDZZGKLqM0wDisID8bQL49Rg0lWN048PqRss56wZwKzW2Z2jz4/Shr8dMHTRWJ3hvzCm1SMRhbD/FKbxSdtTuypbj6TPBU4bZgZoBUI0RA3Z3DdXUnKAe/5JDeKQlBZ3t+ohn6UfhNrnkXkI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711007412; c=relaxed/simple; bh=cYbcthCG9P8DgaJDGamgchXAyi4jJc8vGs7tu9tR3vA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=r/jcVdlHL9Ugf/4xDCGnxiyTlkV+XioY3TWZUK8xFXeA02q2QYZPVjENunKpLRkY1tTMB+npUw6+LfrsX6FeTnLjcA4MJfGLwYHawTW5aMDCLFGnOkHtAKK9FxEKKLMiEYdyaQ9+bU6pemB8APg1xjs7cyt9rDiPJVuc6iy1X4c= 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=Cg99NGJd; arc=none smtp.client-ip=209.85.128.46 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Cg99NGJd" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4146e5c719bso5039035e9.2; Thu, 21 Mar 2024 00:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711007409; x=1711612209; 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=7c6xsBSA+Ep4/2CdGzcOfHT8xx5ktGGm+tKwvoVGkAU=; b=Cg99NGJdbFPB0048ZTm2u3IQxjsdlaC74IDNj2WLrVfT7jjGD+TsEcQYHV4KssMBgz X7yGstCNSP0p58/koU4ZbzZlsJCXJTR82QvR7qfE5fWr048XO4N+X3LY+r05ev10iUrk VovNBnJwKbxdoA6muj+cD4r+ts3Imu+SSbWqkZ0AGVCIqyMHG5/ILA7z1QtG4cC5Xflt k53yifGc+UPuf7jGON4vtbYpxfwrsIhjigordKMTlWGIHGyg7cECl1h300fGOsNl5LWP KD8K9z2F9dmdRuYAwqPvRnnLXdkk1uZf2awhsLUhiBBiZ0gDdb4sLOGUGdPrpIwUkuGx BmqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711007409; x=1711612209; 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=7c6xsBSA+Ep4/2CdGzcOfHT8xx5ktGGm+tKwvoVGkAU=; b=cW1gfpYK9FIkYpJwYKxEvCoyIlxDtGd4GE9/krbB1eNl2fdAGNJF1NjTRA5HOIwy/9 3V8+0KujgRmWOV49cAA4Emeg2+mKYhyXFcYjgqFeo8O5aSmhJU1bmlkUeWR01S5E5J88 O6vp8yqM8GU28CNYq0ZAmqDGercfjjx8frvTMLRZafJfyppTNqtuMTc358WcYlFvTCeg PnpA46DQo48qwo7SbY0/smUqJ+kn6YeD3AeUcc17kyXrWoyB5ARM8NRWZsLthfX4dazC qH/0upHNA/0TeM6UWlrLabihzrCLoZmWmla2eQO4oHin+7NeOJ0BTzxZmGY552rP9ojz AvWg== X-Forwarded-Encrypted: i=1; AJvYcCVAr1h56ZbitvqGZXSfISPxsfzlmJTvTkigKwBdgW6Ys8M60iZ/szF38T7YZBkS536n6hNElc74p0Ib5yHyZqwO7t8fLp4Tt//S/CLHD1jT7PeDOhmJso5+MrFvE0gflXOuvaLWxYJU X-Gm-Message-State: AOJu0YwVYL62RgZtMImDK8/fdGcAG0pxM9Nzb9MNMiAjjS+dfCg1UhoB w/PiBnOK6ipyuImPhd8LywjglIVNiTftHr9EJLjh8TE2l0cHY1kq X-Google-Smtp-Source: AGHT+IHjhhk0y+43R1gh1ylRakmsANYVD+Q7QBsOHW3aFt+RsOaAJyr0fZYG1dg2Mln3M2NwcgN8Iw== X-Received: by 2002:a05:600c:4f44:b0:414:f60:5d6a with SMTP id m4-20020a05600c4f4400b004140f605d6amr3094529wmq.0.1711007408912; Thu, 21 Mar 2024 00:50:08 -0700 (PDT) Received: from [192.168.1.253] (57657817.catv.pool.telekom.hu. [87.101.120.23]) by smtp.googlemail.com with ESMTPSA id p1-20020a05600c1d8100b004146bda6c32sm4637096wms.9.2024.03.21.00.50.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 00:50:08 -0700 (PDT) From: Gabor Juhos Date: Thu, 21 Mar 2024 08:49:54 +0100 Subject: [PATCH v2 1/6] clk: qcom: apss-ipq-pll: reuse Stromer reg offsets from 'clk_alpha_pll_regs' Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240321-apss-ipq-pll-cleanup-v2-1-201f3cf79fd4@gmail.com> References: <20240321-apss-ipq-pll-cleanup-v2-0-201f3cf79fd4@gmail.com> In-Reply-To: <20240321-apss-ipq-pll-cleanup-v2-0-201f3cf79fd4@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.12.3 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 Signed-off-by: Gabor Juhos Reviewed-by: Konrad Dybcio --- 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 dfffec2f06ae7..ed3e6405f99cb 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, From patchwork Thu Mar 21 07:49:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabor Juhos X-Patchwork-Id: 13598441 Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (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 4B7EE58AC8; Thu, 21 Mar 2024 07:50:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711007414; cv=none; b=H+wjd/tDO+mOBCGDuwZ0HUIuiejARZ7aLsfLm1Ell+Kbp+fmp/tPAEOOOk1vyXjz9MLHQmTCi3YCWq+nFaf7m0vDCbcsfB8gc9oExs8XZJd20WH1hD11cPMxNhI3H/Lv8tF+7aGOPGxj3dIm40FabXEYtdrRDUUs2FDsIhwMn78= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711007414; c=relaxed/simple; bh=gkYIn34lV6cArKfOi+z58a1urGMGre3p+FPo1kVOAZg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SO7g69wVWsS9AFRVlXpgRvUPETVrnwrshgp/8sZtwXa9JVElZaCw0xNkd9x6LSJsKL+CF34KTnshATFee9Z9Yq3F0+ZbBlmLz0+AGLyLmDEK0xiPpSV3X4D4SQ1qsaBX831y7/YTERLtvLdHaFhBuQK2vaiojGdEwrCkpyaz9Vo= 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=maCKJeOO; arc=none smtp.client-ip=209.85.208.170 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="maCKJeOO" Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2d6a1af9c07so4800981fa.3; Thu, 21 Mar 2024 00:50:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711007410; x=1711612210; 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=mlzptlKCan7FzrZvOG6zSbotTVIToSrb2LNogTEvEVs=; b=maCKJeOOafytkf73Igyk6lWaNDtgp14FxTNFVQ/oww0PQALvjJRxiYiN3RWCRcNR8w 6F9g5GTeop2s1E6FIhrFvK7neVWVIjgctD1cFHKfvA44yr1yLH3e9XZOoRN0rX3qNHFS 8FwNhvjIMBrhKliNRWQp2e7Pgb5Y3YitPXkFuKvn0tDGN7TtGdja6mf1843nFaB3NGrC /bbbmvS3NzrKJ9u40Sy8Ak/AFjIe5qwEU6f0HKWs3FLYXZtdGjupwKgDJHbDOXWRNybg bAEaSJS+detJm9hA1Ev1XBkEMknaZKauGp5Drv5rUjuv/j6JEQapnOIP8Je5w+81XIFN n+pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711007410; x=1711612210; 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=mlzptlKCan7FzrZvOG6zSbotTVIToSrb2LNogTEvEVs=; b=njDVY1nKY+x6GvysXyQRBJQOQ6ywXeswrJcZo0oneiQOpzd3pktPSwaxzRy3AwiTNJ 0ctHWylcOcEWHTQWOtOEYTPmzZfVdyDNRtmG/spUhqtyZCHM5bznOBMuix5zMF1qYI01 BEA+3QnvOUVmxn1ZHi+Ex61LuN+SNYr84/EWgjRa2JCPqu/Mq4dgK164todZYFL4ru/6 1Nv9nwg7dmLALBX0aXBCIGHLuJ6be2EwV1KwcZI8apiSvtz4o6gBVMuWdXsKLB8JQ96f 80a789Ux0R2I3SojfJxCk2OXyePXaTPLABXFhx92lccQYunreUehTAulQeLEPNIjT0LW IRxw== X-Forwarded-Encrypted: i=1; AJvYcCUmgn3zrzSQNsJlotbqo1p2+TpOXckUkIJWXkBWms6cG/Gj9g6Jsexuj0nreAPUIt3+4daHCBJHN4TzR6hW0EXK1mUbXmL07zM1c6883tgo8G2ZKSbzMa3rYbEkETe+oQB1ThHbBE8W X-Gm-Message-State: AOJu0YwrW0NrRhHE6kAQstvMq8/ifh0p/80jZYpGPCoioz2PpJfbEfdZ nwsfqWStH6WOdFkcVsMMnC3iVAHBjfUxVwCnitCsQPvbgGI7QkvaDSEbnW9E X-Google-Smtp-Source: AGHT+IHOu64Q+AOIZIcgcE9O20EUksyFd4Kg/L7XKUtFsmYTYUpbXQJ+vxC0vIUzEo/ddmfn7Veeww== X-Received: by 2002:a2e:874d:0:b0:2d2:af88:8947 with SMTP id q13-20020a2e874d000000b002d2af888947mr13948457ljj.15.1711007410309; Thu, 21 Mar 2024 00:50:10 -0700 (PDT) Received: from [192.168.1.253] (57657817.catv.pool.telekom.hu. [87.101.120.23]) by smtp.googlemail.com with ESMTPSA id p1-20020a05600c1d8100b004146bda6c32sm4637096wms.9.2024.03.21.00.50.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 00:50:09 -0700 (PDT) From: Gabor Juhos Date: Thu, 21 Mar 2024 08:49:55 +0100 Subject: [PATCH v2 2/6] clk: qcom: apss-ipq-pll: move Huayra register map to 'clk_alpha_pll_regs' Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240321-apss-ipq-pll-cleanup-v2-2-201f3cf79fd4@gmail.com> References: <20240321-apss-ipq-pll-cleanup-v2-0-201f3cf79fd4@gmail.com> In-Reply-To: <20240321-apss-ipq-pll-cleanup-v2-0-201f3cf79fd4@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.12.3 Move the locally defined Huayra register map to 'clk_alpha_pll_regs' in order to allow using that by other drivers, like the clk-cbf-8996. No functional changes. Signed-off-by: Gabor Juhos Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio --- Changes in v2: - rework the patch as requested by Dmitry Baryshkov by moving the register map into clk-alpha-pll.c instead of keeping that locally - Link to v1: https://lore.kernel.org/r/20240318-apss-ipq-pll-cleanup-v1-2-52f795429d5d@gmail.com --- drivers/clk/qcom/apss-ipq-pll.c | 20 +------------------- drivers/clk/qcom/clk-alpha-pll.c | 10 ++++++++++ drivers/clk/qcom/clk-alpha-pll.h | 1 + 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/drivers/clk/qcom/apss-ipq-pll.c b/drivers/clk/qcom/apss-ipq-pll.c index ed3e6405f99cb..8cf17374a2e2a 100644 --- a/drivers/clk/qcom/apss-ipq-pll.c +++ b/drivers/clk/qcom/apss-ipq-pll.c @@ -8,27 +8,9 @@ #include "clk-alpha-pll.h" -/* - * Even though APSS PLL type is of existing one (like Huayra), its offsets - * are different from the one mentioned in the clk-alpha-pll.c, since the - * PLL is specific to APSS, so lets the define the same. - */ -static const u8 ipq_pll_offsets[][PLL_OFF_MAX_REGS] = { - [CLK_ALPHA_PLL_TYPE_HUAYRA] = { - [PLL_OFF_L_VAL] = 0x08, - [PLL_OFF_ALPHA_VAL] = 0x10, - [PLL_OFF_USER_CTL] = 0x18, - [PLL_OFF_CONFIG_CTL] = 0x20, - [PLL_OFF_CONFIG_CTL_U] = 0x24, - [PLL_OFF_STATUS] = 0x28, - [PLL_OFF_TEST_CTL] = 0x30, - [PLL_OFF_TEST_CTL_U] = 0x34, - }, -}; - static struct clk_alpha_pll ipq_pll_huayra = { .offset = 0x0, - .regs = ipq_pll_offsets[CLK_ALPHA_PLL_TYPE_HUAYRA], + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_HUAYRA_APSS], .flags = SUPPORTS_DYNAMIC_UPDATE, .clkr = { .enable_reg = 0x0, diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c index 55a77e36dc44c..ba039b2b24a09 100644 --- a/drivers/clk/qcom/clk-alpha-pll.c +++ b/drivers/clk/qcom/clk-alpha-pll.c @@ -82,6 +82,16 @@ const u8 clk_alpha_pll_regs[][PLL_OFF_MAX_REGS] = { [PLL_OFF_TEST_CTL_U] = 0x20, [PLL_OFF_STATUS] = 0x24, }, + [CLK_ALPHA_PLL_TYPE_HUAYRA_APSS] = { + [PLL_OFF_L_VAL] = 0x08, + [PLL_OFF_ALPHA_VAL] = 0x10, + [PLL_OFF_USER_CTL] = 0x18, + [PLL_OFF_CONFIG_CTL] = 0x20, + [PLL_OFF_CONFIG_CTL_U] = 0x24, + [PLL_OFF_STATUS] = 0x28, + [PLL_OFF_TEST_CTL] = 0x30, + [PLL_OFF_TEST_CTL_U] = 0x34, + }, [CLK_ALPHA_PLL_TYPE_BRAMMO] = { [PLL_OFF_L_VAL] = 0x04, [PLL_OFF_ALPHA_VAL] = 0x08, diff --git a/drivers/clk/qcom/clk-alpha-pll.h b/drivers/clk/qcom/clk-alpha-pll.h index a1a75bb12fe88..d057955138952 100644 --- a/drivers/clk/qcom/clk-alpha-pll.h +++ b/drivers/clk/qcom/clk-alpha-pll.h @@ -15,6 +15,7 @@ enum { CLK_ALPHA_PLL_TYPE_DEFAULT, CLK_ALPHA_PLL_TYPE_HUAYRA, + CLK_ALPHA_PLL_TYPE_HUAYRA_APSS, CLK_ALPHA_PLL_TYPE_BRAMMO, CLK_ALPHA_PLL_TYPE_FABIA, CLK_ALPHA_PLL_TYPE_TRION, From patchwork Thu Mar 21 07:49:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabor Juhos X-Patchwork-Id: 13598442 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 671A3657A7; Thu, 21 Mar 2024 07:50:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711007415; cv=none; b=Va7bNavxUg++uhT+yJnq9NbrNFs6vVCl6l+pNthOwuyiuXoO1v1xI6+iUJLnxP/ATWuHqt2dMLWI8JJCQhwJcK15q8uywlduAAqMOUBt+u1eJLsQbBvqRXcbr97lpsJwLno9r48pcKBCKwG0ln3sROtO3fgrL0IXAg3kFFb9QlI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711007415; c=relaxed/simple; bh=UvTo8QBYeQLV3PuMvoWcILVTc6H9jSID+qTr6Vz8NBg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pTizmub5g66ZZjf0hOPwolg+ItAopQLbV4mf3bpK8m3KGv/ZNACsW/JYTvjC7dn9fv/Hw1vK+e8cQFJ2PK0nzCoIowrDJTy2T8vCfREJgzckKZFHbJD7Bv6YWqrZ+fQTAO2t90iRhGeJVv8dd+/VgKqH/+Nd8q2PV0Dz/itCqyw= 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=glDBXnLc; arc=none smtp.client-ip=209.85.128.47 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="glDBXnLc" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-41412411622so4818325e9.2; Thu, 21 Mar 2024 00:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711007412; x=1711612212; 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=YU9jaC6xqKM+QmdGJCmjA9LeXXuHKL87qwRP8YiRjAU=; b=glDBXnLcvjffVWtAseEfNPJzpWCpYKXVDaE0B2yt476lmEtcBSe1oGnIEzzFlZ5Ob1 QsIx/e2sPWJD7eR8QzVIxFIeNX/XC9yS90JEAj+kKZ1Fd6Xng7+Z4lQZQaYAsSaWN5pw DIyYaodWW7PGdEihE7YPCKQMHiwQ79dRjM86nIo6fwNM/4KNbp0zlMMRKH+XQJ1WcIdf 90zxQEpM5jOAXnCMoPkI+whmaBEEVwFHSCSDWh7k8CU2C4SX6NNSBAOsXRH5K2o/Nusj PeaL1oIgO1KU5/ce8OQykIZt013C/AArGj3xAg5hYDGezecNDlAexuZe1dQMMdgVJFcu WjAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711007412; x=1711612212; 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=YU9jaC6xqKM+QmdGJCmjA9LeXXuHKL87qwRP8YiRjAU=; b=xC1A+YcuhrvtivWRA9vch4z6iB5gNTbqPercQOU2ULx95tGCgMr7ca5ZObZnORdbUP APs56svoWdTjV0ocr0Qzllxob6DcRt5zdBGGB35ce4aLh7JmNJaQWUyMhfBcofkE3dvn 6+LXEdwbBnzH7DNX9nUtN2t00nDa3WDaxdBr3/pwcU4ndcuBP/dQq7wBzXQCB8ZrnDul uljRZic2tGVww4OkFWtMJOvtJBMAo9XCAvmCepQzYQlj4gLp6wi4E5NnIzW62q86WwdF IR+GapPGtEWxEaUN6NSrPTm4DhPk2de77Xo+b1IfJBvLqhV2YyEVCgaDsHEvwtOoYKTo SBlQ== X-Forwarded-Encrypted: i=1; AJvYcCV4lpZYuIFn0ne3OotwoYHNTnp+o7BOGF0aw//bzGDxPHrriv+DpltrV40ZWoP/mvns1llP5HwuHHAzlMg3naaVgm+cWnz4XW2Gm6gociuZuO2t9lrK0c/ZXuvR4lmkkzuGe/1dqQwY X-Gm-Message-State: AOJu0Yxzxse6XiBuYbSJcUzYYOQj3d01V3dissvqeM5TTnKoKvu0z4/u LcCe//6zq5o3H4ECz52PEDCwGVDDRl/N1n1/qB4eYEHWtoRSvm8s X-Google-Smtp-Source: AGHT+IHbSjTmUAYcjmFlhbvazW9Kj5/6k2CITs59Ro9fqQ68aJ1wzi4bxIXAqi50LlzBon/+ym3Shg== X-Received: by 2002:a05:600c:46c8:b0:414:4d82:e4dd with SMTP id q8-20020a05600c46c800b004144d82e4ddmr782997wmo.7.1711007411815; Thu, 21 Mar 2024 00:50:11 -0700 (PDT) Received: from [192.168.1.253] (57657817.catv.pool.telekom.hu. [87.101.120.23]) by smtp.googlemail.com with ESMTPSA id p1-20020a05600c1d8100b004146bda6c32sm4637096wms.9.2024.03.21.00.50.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 00:50:11 -0700 (PDT) From: Gabor Juhos Date: Thu, 21 Mar 2024 08:49:56 +0100 Subject: [PATCH v2 3/6] clk: qcom: apss-ipq-pll: remove 'pll_type' field from struct 'apss_pll_data' Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240321-apss-ipq-pll-cleanup-v2-3-201f3cf79fd4@gmail.com> References: <20240321-apss-ipq-pll-cleanup-v2-0-201f3cf79fd4@gmail.com> In-Reply-To: <20240321-apss-ipq-pll-cleanup-v2-0-201f3cf79fd4@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.12.3 The value of the 'pll_type' field of 'struct apps_pll_data' is used only by the probe function to decide which config function should be called for the actual PLL. However this can be derived also from the 'pll' field which makes the 'pll_type' field redundant. Additionally, the CLK_ALPHA_PLL_TYPE_* enumeration values are meant to be used as indices to the 'clk_alpha_pll_regs' array so using those to define the pll type in this driver is misleading anyway. Change the probe function to use the 'pll' field to determine the configuration function to be used, and remove the 'pll_type' field to simplify the code. No functional changes. Signed-off-by: Gabor Juhos --- Changes in v2: - no changes - Link to v1: https://lore.kernel.org/r/20240318-apss-ipq-pll-cleanup-v1-3-52f795429d5d@gmail.com --- drivers/clk/qcom/apss-ipq-pll.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/clk/qcom/apss-ipq-pll.c b/drivers/clk/qcom/apss-ipq-pll.c index 8cf17374a2e2a..816b0d1f8d8c8 100644 --- a/drivers/clk/qcom/apss-ipq-pll.c +++ b/drivers/clk/qcom/apss-ipq-pll.c @@ -131,37 +131,31 @@ static const struct alpha_pll_config ipq9574_pll_config = { }; struct apss_pll_data { - int pll_type; struct clk_alpha_pll *pll; const struct alpha_pll_config *pll_config; }; static const struct apss_pll_data ipq5018_pll_data = { - .pll_type = CLK_ALPHA_PLL_TYPE_STROMER, .pll = &ipq_pll_stromer, .pll_config = &ipq5018_pll_config, }; static struct apss_pll_data ipq5332_pll_data = { - .pll_type = CLK_ALPHA_PLL_TYPE_STROMER_PLUS, .pll = &ipq_pll_stromer_plus, .pll_config = &ipq5332_pll_config, }; static struct apss_pll_data ipq8074_pll_data = { - .pll_type = CLK_ALPHA_PLL_TYPE_HUAYRA, .pll = &ipq_pll_huayra, .pll_config = &ipq8074_pll_config, }; static struct apss_pll_data ipq6018_pll_data = { - .pll_type = CLK_ALPHA_PLL_TYPE_HUAYRA, .pll = &ipq_pll_huayra, .pll_config = &ipq6018_pll_config, }; static struct apss_pll_data ipq9574_pll_data = { - .pll_type = CLK_ALPHA_PLL_TYPE_HUAYRA, .pll = &ipq_pll_huayra, .pll_config = &ipq9574_pll_config, }; @@ -194,10 +188,10 @@ static int apss_ipq_pll_probe(struct platform_device *pdev) if (!data) return -ENODEV; - if (data->pll_type == CLK_ALPHA_PLL_TYPE_HUAYRA) + if (data->pll == &ipq_pll_huayra) clk_alpha_pll_configure(data->pll, regmap, data->pll_config); - else if (data->pll_type == CLK_ALPHA_PLL_TYPE_STROMER || - data->pll_type == CLK_ALPHA_PLL_TYPE_STROMER_PLUS) + else if (data->pll == &ipq_pll_stromer || + data->pll == &ipq_pll_stromer_plus) clk_stromer_pll_configure(data->pll, regmap, data->pll_config); ret = devm_clk_register_regmap(dev, &data->pll->clkr); From patchwork Thu Mar 21 07:49:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabor Juhos X-Patchwork-Id: 13598443 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (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 B9C8E69971; Thu, 21 Mar 2024 07:50:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711007416; cv=none; b=m/dW8JzJ9vGIvMZxf6sl5gefSucBQwKoMU3Aa5yyIlCn4Tkt1nkV97veFXrvU+X7zar5joOUY8fDH8lKpEF0MJ78pAGdW+StqSEcsb6BqeRj8x441xjcUyTq5mwdEcHm351yhbJh8pWP05R/2+rLe7GSVsOVpzBa5HAfTgbvk+U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711007416; c=relaxed/simple; bh=SMgAsKkEs5GaLb3ObM+ETzsphSav0e7nuDg0ec4brto=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WbfoQvNijxgmiaakzDq0UCc/pdu4AtHqe6YIzVh4m281QsAPVmiIUepiTrlIq5FuaDh3p7/KSmk183D/Aux0X5wVPPn14/i6/Fmj1QCIbtlZH4CvLC7Ufn9lB8Za9ePmlFT5i0FMIEg2QtdNaR5itfnjU+4JkXswO4SsEfXFR34= 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=Zj3uD43T; arc=none smtp.client-ip=209.85.221.49 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Zj3uD43T" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-3412f49bac7so456599f8f.0; Thu, 21 Mar 2024 00:50:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711007413; x=1711612213; 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=2S5Rh9foK5diPxVaypXMHTBWZ5SvF8XVJcwbUU67u6Q=; b=Zj3uD43TfEhOIKKnQKRxeFlCtJv/Ylol45VqnkFbLp77K91ws4DrOmh0O6eKAfuaou G0qeE34AwxpGqn1We/4iMq1mB73i4QdLMM9YW0MbLx0kegcwlNOw3YGEJqFUAIQ5THlH qhh2lyh0BZxIddI2a4JEWgMyU8jPyeikgj6y/3jeBoAmwgxExev1N3tNQvbp1xuuQiti Ll8WctijO2iy+5AL/eF3/w10V2zQLbNHQ8645cQPbCus/jaUQob1tG+J3EKaAY1VebBa 3OMkwWebafJQUCIhmwwv3eFqk2Id4TsYXVb6sNnFjq127i9GoBoGRuktL9r7jx/JMWgY iAKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711007413; x=1711612213; 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=2S5Rh9foK5diPxVaypXMHTBWZ5SvF8XVJcwbUU67u6Q=; b=U8Ie0D2EdvrJGPUiHkLizOGYiR62aevIZ2GnZYOf1VcaOQwW0Pd3PxYAJOMx3JHD1o kAUdDtIKdzZ44f7vq/v0bDcT4GyzS0ElFk4jv7rSYhDj+hblMyscB37uE789Xt8Velq3 tbWlsPezUGI7pZEVJQVhbMde9+YTSK/9wKfNEG809MNGLj7c3Mth7692RxxE5cn1PdMp QNsHoMXPsSGXd5bc70CwiPX7zlZkjz44kkT6TP5Irwfo35owc8PQpyMpn545JrIR3pe8 egIIS4x3zklfZ/oKbc1ScNq5g1UYPdTrriSu2wb9eRNV8uqu/Jju30iLFypiiN1NzRlt ByQA== X-Forwarded-Encrypted: i=1; AJvYcCVbBvyKi4E8WqlSyK0u+QL0p5YspNB1eyy3cRsJSw2yEFeiAdt2xi70B/jkWzc4M7qAXxJl8LXDVFuy26iAIdKrT0+TKRBvVIVkfYxFF43Ahgv1ObD7ZzeLWKOwoM2zyqM/W+g0yNyO X-Gm-Message-State: AOJu0YyT6KixSPVFq/Oekic6EKsrcI/ATJ9yHPs3pH2bjMaiO91+Sbvv minrwhbe8c8f/Y+1gjJv1MVfx+l7DRTLHdZLv5p50zCYr/MZjkbR X-Google-Smtp-Source: AGHT+IF3Qt5A4TYSPqz5KdqZNYsS0+swvj35yi9DD4wcISqNf0gMYuL12H4v/zV5oLdb0fmnkUVofA== X-Received: by 2002:adf:f646:0:b0:33e:c677:3272 with SMTP id x6-20020adff646000000b0033ec6773272mr1191665wrp.56.1711007413254; Thu, 21 Mar 2024 00:50:13 -0700 (PDT) Received: from [192.168.1.253] (57657817.catv.pool.telekom.hu. [87.101.120.23]) by smtp.googlemail.com with ESMTPSA id p1-20020a05600c1d8100b004146bda6c32sm4637096wms.9.2024.03.21.00.50.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 00:50:12 -0700 (PDT) From: Gabor Juhos Date: Thu, 21 Mar 2024 08:49:57 +0100 Subject: [PATCH v2 4/6] clk: qcom: apss-ipq-pll: constify match data structures Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240321-apss-ipq-pll-cleanup-v2-4-201f3cf79fd4@gmail.com> References: <20240321-apss-ipq-pll-cleanup-v2-0-201f3cf79fd4@gmail.com> In-Reply-To: <20240321-apss-ipq-pll-cleanup-v2-0-201f3cf79fd4@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.12.3 The match data structures are used only by the apss_ipq_pll_probe() function and are never modified so mark those as constant. No functional changes. Reviewed-by: Dmitry Baryshkov Signed-off-by: Gabor Juhos Reviewed-by: Konrad Dybcio --- Changes in v2: - add Reviewed-by tag from Dmitry - Link to v1: https://lore.kernel.org/r/20240318-apss-ipq-pll-cleanup-v1-4-52f795429d5d@gmail.com --- drivers/clk/qcom/apss-ipq-pll.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/qcom/apss-ipq-pll.c b/drivers/clk/qcom/apss-ipq-pll.c index 816b0d1f8d8c8..49da67435d4fe 100644 --- a/drivers/clk/qcom/apss-ipq-pll.c +++ b/drivers/clk/qcom/apss-ipq-pll.c @@ -140,22 +140,22 @@ static const struct apss_pll_data ipq5018_pll_data = { .pll_config = &ipq5018_pll_config, }; -static struct apss_pll_data ipq5332_pll_data = { +static const struct apss_pll_data ipq5332_pll_data = { .pll = &ipq_pll_stromer_plus, .pll_config = &ipq5332_pll_config, }; -static struct apss_pll_data ipq8074_pll_data = { +static const struct apss_pll_data ipq8074_pll_data = { .pll = &ipq_pll_huayra, .pll_config = &ipq8074_pll_config, }; -static struct apss_pll_data ipq6018_pll_data = { +static const struct apss_pll_data ipq6018_pll_data = { .pll = &ipq_pll_huayra, .pll_config = &ipq6018_pll_config, }; -static struct apss_pll_data ipq9574_pll_data = { +static const struct apss_pll_data ipq9574_pll_data = { .pll = &ipq_pll_huayra, .pll_config = &ipq9574_pll_config, }; From patchwork Thu Mar 21 07:49:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabor Juhos X-Patchwork-Id: 13598444 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 660A577A0F; Thu, 21 Mar 2024 07:50:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711007418; cv=none; b=RzMH81GPTJ9Q+kLQLKmgl1F7vN9IPKrcXsyqEAaCRlLgVCanKmms07kg8xnkk931b1RJ6GEF0Xlz1YJBW7nx3jYEHHoKYGYyJmv9duRBIV8o/G/gIZcI+LM1aeIgx84ucSKpyl8CoOrmGvonx5b8O8/9MbLW0oBIi2pSLGwTEyY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711007418; c=relaxed/simple; bh=TPKfokofPKWzc2OBgMHDrVTdBdePyNL2eD/POdq0oN8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YXTdcMZOEVm269LnTq8BSGJaJELYWlCjNf/cIDvX01VaJl+pedX+MQBPs2bywcBifjFDtH4sugxjKT+45hJtb7RJUtoSdLzEZLBAD4hSpOavdyG6/fyzDllyiU/bQEzrcJGViaPFb8VZoCmhtFaqCstMTZjzU9Z9UNEoq3n16lA= 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=ItBhTc6S; arc=none smtp.client-ip=209.85.128.49 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ItBhTc6S" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-41400a9844aso10034655e9.0; Thu, 21 Mar 2024 00:50:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711007415; x=1711612215; 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=fHUxOwmal6qtF9YTqDD1z15OlxUPQ5b62w1T2fIRGXs=; b=ItBhTc6SVhQ7/zpdhzQULTZe8edpzIOUTNV1MF4rH4PEYSPxnksGnjHGZT2vM/WKhk 2Bmg6PFMP2l1TfXvLN4/15CfC7xYuHEmLScdCr4jeqYs/YtF1hmZHH9PB8wdyyhja4mr jE/txS325d20tpMvGA8+B3yrRBa9c6H40UVu5DVR8/Fn/uZ1vJZL5FGoMJ6GIrd37gZa UozXu/hdQwSiZWkYYXf643cszrEqnI5Z/BJ78d9GVZ0nFvlYnvzbdvyh1VoADn/RCEdp Ze9pCmdOS3XuVVBPmBUziVfOU16u6xAcNhyL4J8LNVgeB6I7k+iahzQToMFY1DJSvISd t/Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711007415; x=1711612215; 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=fHUxOwmal6qtF9YTqDD1z15OlxUPQ5b62w1T2fIRGXs=; b=KZpfUnJOrR+MW4JSPGJvUzqtis+iVft7zt0qvAsGwVDUS8RFVFqedVvrRe+FKvRc2+ kTtPEdE8uSjm+sKArtKBSF+SnN6fvWskxYjMzrMkXrIuQaTJJQ0huxn75rozFnzJcEW+ cxzJpQdXyGdGTZXXEWLNcDL17YVFXn555oROPu8cWKHFk3tqSpawLIxGzRhLBv9whZ5e +Wkxu6BPbNW8ItEEZao8E1AwsKzvU9CECSerSMixFmw2aKnua3/iG3FFCKUTKTPW1hqz hUp38YTsxt1dxx2UYDX4F2urQ8rcLJifRkb9DSxpGpHHvfjpE4dT9pQ/GgLjgv1+9wWG BBuA== X-Forwarded-Encrypted: i=1; AJvYcCXB6l/bzomoMVC7QAlepVNB8vPfNxLUs14QiyLZGWUoy2X12hdv4fCqYOyV8akKzqyEyFFXx8MSDZy2Y8wNXWnCmUEdea6drSdcAjj3S5f0Vwq9qGtobF/MNJv7Xq83FHgAK7Wo1O4P X-Gm-Message-State: AOJu0YzqLuYl8RevoUdsw9If7yZPbC3UQqJ889IDxw7l6KkDThIy6y2f CB2ZUBC6ZQrVubkAnySXinMMVvTIZyPsx2wH6YroF2XVO8DMn+ua X-Google-Smtp-Source: AGHT+IEdev7pXxL09ucQ+0YmKSbCtHC9NGgyh/epDqGXGrz8wEjHYTJqI5uMLEibUmeqslpSdyrxWw== X-Received: by 2002:a5d:5582:0:b0:33e:c0f0:c159 with SMTP id i2-20020a5d5582000000b0033ec0f0c159mr1553484wrv.10.1711007414771; Thu, 21 Mar 2024 00:50:14 -0700 (PDT) Received: from [192.168.1.253] (57657817.catv.pool.telekom.hu. [87.101.120.23]) by smtp.googlemail.com with ESMTPSA id p1-20020a05600c1d8100b004146bda6c32sm4637096wms.9.2024.03.21.00.50.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 00:50:14 -0700 (PDT) From: Gabor Juhos Date: Thu, 21 Mar 2024 08:49:58 +0100 Subject: [PATCH v2 5/6] clk: qcom: apss-ipq-pll: constify clk_init_data structures Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240321-apss-ipq-pll-cleanup-v2-5-201f3cf79fd4@gmail.com> References: <20240321-apss-ipq-pll-cleanup-v2-0-201f3cf79fd4@gmail.com> In-Reply-To: <20240321-apss-ipq-pll-cleanup-v2-0-201f3cf79fd4@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.12.3 The clk_init_data structures are never modified, so add const qualifier to the ones where it is missing. No functional changes. Signed-off-by: Gabor Juhos Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio --- Changes in v2: - no changes - Link to v1: https://lore.kernel.org/r/20240318-apss-ipq-pll-cleanup-v1-5-52f795429d5d@gmail.com --- drivers/clk/qcom/apss-ipq-pll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/apss-ipq-pll.c b/drivers/clk/qcom/apss-ipq-pll.c index 49da67435d4fe..5bbf329c9bdd1 100644 --- a/drivers/clk/qcom/apss-ipq-pll.c +++ b/drivers/clk/qcom/apss-ipq-pll.c @@ -15,7 +15,7 @@ static struct clk_alpha_pll ipq_pll_huayra = { .clkr = { .enable_reg = 0x0, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data) { .name = "a53pll", .parent_data = &(const struct clk_parent_data) { .fw_name = "xo", @@ -55,7 +55,7 @@ static struct clk_alpha_pll ipq_pll_stromer_plus = { .clkr = { .enable_reg = 0x0, .enable_mask = BIT(0), - .hw.init = &(struct clk_init_data){ + .hw.init = &(const struct clk_init_data) { .name = "a53pll", .parent_data = &(const struct clk_parent_data) { .fw_name = "xo", From patchwork Thu Mar 21 07:49:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabor Juhos X-Patchwork-Id: 13598445 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.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 DFDA577F2D; Thu, 21 Mar 2024 07:50:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711007419; cv=none; b=Vgwb1X2qXEeK1ny2NU8qJrLw7j5slpP3NXWo0R2s+0lFTjNSJSGlXAtB8oTK3EGRNnqgGoqbYiPbbfPCmXhnoTLbYZadm7L6YRoIQLThcyn1uP6BWh4rTDdopXeIbRP2uVJJVgSi1MXZC8eUdReXMh68OaSDpLeQVynxtELb9sY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711007419; c=relaxed/simple; bh=DVHMTHd9cw8fYFLji10BJ/X3RxtwR7CoHYOkARmz740=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EuGhK9tfwJGqV9vY7bPDAduvOZ06mP5gt3w1X3Ytmn5txPK/dYJKh3enw6Al7EdZHlWyRB7FJnq+YMCbZKLfpX5HSAO80JMcfC2T/2J7ubxr8cRwp8Urwnq/fPQyP4S4EA5lqvu/+s1Sdb+vvN3QRnxhASgTXsXzxlpKgK3SXXk= 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=WKmDXSHx; arc=none smtp.client-ip=209.85.128.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WKmDXSHx" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-414633f7a52so6643835e9.0; Thu, 21 Mar 2024 00:50:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711007416; x=1711612216; 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=oMgePyPqtHXUGa3piv5tLSTW7fonCxVeBttImy15UeU=; b=WKmDXSHxfAGf1M8z878XISsHFU27GtgGfK2HK5hAf+33iDw3nArWqRO8Pja+FakqnL PimkPmmYapL0KdeBnjqN+A1XPlytNlcqXHBUYsiA9/L9ZrlpGV0psEUGwLbPEj0dM8VJ rwxiBqUSeZMRqnxZal4HkK33vHoIwBgmC05dSJuFjJ1Edr3+sAQ4aj0CMgQL1Mz6pWSD lFCrMT8/+nT+rXIwQ20ospXF64nH2WqTx9jq7Eck2JYvImuUd55TYP7XyA/oBQ8II4RX n8b2Tc+J1HEkYT0gmGS78IrZNpSsM2kPVIoQK1XrrELnlraAcAz2YSqwkd3nO2n5Uafa l6Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711007416; x=1711612216; 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=oMgePyPqtHXUGa3piv5tLSTW7fonCxVeBttImy15UeU=; b=ecPa+KiI87g1A689S5MDE1lnAXNtuvhHEldAWk6zbqUg/deexvCH+9at9SMpTPiBmS rWD2SQMPbAuRhHoS8RT9ADXbzX6J+naSrnbfc1rorsqiXyIkETSEWPsWhfaI/MbWbv2L bufJ7XPQFLl37tUQbqVVUGHnlNdHy9AFOCKaUcFVfI80mFhX7Cjc+1GRJo1HOMUZctdO 6Aq5SUpRg+gWcew8jNtgUlCBtd+ZAPJ8nHfaYslDRjhjtuF7ORzmTeBzscMR2J4TS19O bWW6m1D4uEA3rIgFNDO4przUmxbxyA/CRCrU4TvllDOzcRvT7OH62Mly4rgK7DOjpGBB 7rHw== X-Forwarded-Encrypted: i=1; AJvYcCWHVppMovZqx5d8C9ncBwPRyWf0QDC+VbHAzRwyln2T4W0jodEEjXCwe+FbFn6EYFkM6Lmn/2vLpCKqYzUlunX3aAI1GkO6qlyPqFsAUtKkq+rTdvcgg7aLCAhc5uzq+xH7c0A0WY/7 X-Gm-Message-State: AOJu0YyWohmZY1KG9WeTOAOFho9La9t2PL+hEARc9+NzdgDpoQoAR0JS oCDbjFee2G5X2mX55KiYZ9f3BDVEfWHAjLkcTwF8vQJhG9u0MdNUhFT2rAOh X-Google-Smtp-Source: AGHT+IFBxiVcxHlAt0MfenJ1sZGVg/Umm4dOVc/7FHqmtl04FBAihzW5AKA70GImVUAiAUI6QCTPhg== X-Received: by 2002:a05:600c:1395:b0:413:271d:8889 with SMTP id u21-20020a05600c139500b00413271d8889mr970161wmf.11.1711007416283; Thu, 21 Mar 2024 00:50:16 -0700 (PDT) Received: from [192.168.1.253] (57657817.catv.pool.telekom.hu. [87.101.120.23]) by smtp.googlemail.com with ESMTPSA id p1-20020a05600c1d8100b004146bda6c32sm4637096wms.9.2024.03.21.00.50.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 00:50:15 -0700 (PDT) From: Gabor Juhos Date: Thu, 21 Mar 2024 08:49:59 +0100 Subject: [PATCH v2 6/6] clk: qcom: clk-cbf-8996: use HUAYRA_APPS register map for cbf_pll Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240321-apss-ipq-pll-cleanup-v2-6-201f3cf79fd4@gmail.com> References: <20240321-apss-ipq-pll-cleanup-v2-0-201f3cf79fd4@gmail.com> In-Reply-To: <20240321-apss-ipq-pll-cleanup-v2-0-201f3cf79fd4@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.12.3 The register map used for 'cbf_pll' is the same as the one defined for the CLK_ALPHA_PLL_TYPE_HUAYRA_APSS indice in the 'clk_alpha_pll_regs' array. Drop the local register map and use the global one instead to reduce code duplication. No functional changes intended. Compile tested only. Suggested-by: Dmitry Baryshkov Signed-off-by: Gabor Juhos Reviewed-by: Dmitry Baryshkov --- Changes since v1: - new patch Note: Although this patch is not strictly related to the subject of the series but as the change has been suggested by Dmitry during the review process it has been added here for completeness. --- drivers/clk/qcom/clk-cbf-8996.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/clk/qcom/clk-cbf-8996.c b/drivers/clk/qcom/clk-cbf-8996.c index fe24b4abeab48..76bf523431b85 100644 --- a/drivers/clk/qcom/clk-cbf-8996.c +++ b/drivers/clk/qcom/clk-cbf-8996.c @@ -41,17 +41,6 @@ enum { #define CBF_PLL_OFFSET 0xf000 -static const u8 cbf_pll_regs[PLL_OFF_MAX_REGS] = { - [PLL_OFF_L_VAL] = 0x08, - [PLL_OFF_ALPHA_VAL] = 0x10, - [PLL_OFF_USER_CTL] = 0x18, - [PLL_OFF_CONFIG_CTL] = 0x20, - [PLL_OFF_CONFIG_CTL_U] = 0x24, - [PLL_OFF_TEST_CTL] = 0x30, - [PLL_OFF_TEST_CTL_U] = 0x34, - [PLL_OFF_STATUS] = 0x28, -}; - static struct alpha_pll_config cbfpll_config = { .l = 72, .config_ctl_val = 0x200d4828, @@ -67,7 +56,7 @@ static struct alpha_pll_config cbfpll_config = { static struct clk_alpha_pll cbf_pll = { .offset = CBF_PLL_OFFSET, - .regs = cbf_pll_regs, + .regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_HUAYRA_APSS], .flags = SUPPORTS_DYNAMIC_UPDATE | SUPPORTS_FSM_MODE, .clkr.hw.init = &(struct clk_init_data){ .name = "cbf_pll",