From patchwork Fri Sep 20 08:16:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuan Liu via B4 Relay X-Patchwork-Id: 13808254 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 0DA162AEF5; Fri, 20 Sep 2024 08:16:15 +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=1726820176; cv=none; b=Tt4yqakVjkO4VgD4pmNy69L2TRcN5sJ0jJuZ1Ug6F/hC9s5mwUXrSSHRywa2I2NI5mYdNdZ7JcWzDuQZN5zOHF9EXSPFjX0IulbhLiDWjEdnUSpstPrLR8cfcA5G1Q7NnrT+B4oqsIcRXOCvGS29Ll1bbNFf/3Rz+bCzTNDVhFs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726820176; c=relaxed/simple; bh=zYrG4JOdof5Kb4KbKr9UqFtgnrrQGTE+AbTafTRVifY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Oeliz8XlBH4B80z6/NLhWub/1VfE3yiKB2sWyGQFJbX2y+fZuN8NoNsSdywOQb8NonZkH250dTm76o5woz5SNrchxec1aH+ZxzAfZhNqJd0qoHnm8Nc1ujuNps07HCeqJTkNefg7QwNDgPG6qN3S+NdmqKwL2th83s+GngUrRa4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=m7szP3+f; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="m7szP3+f" Received: by smtp.kernel.org (Postfix) with ESMTPS id A4805C4CECD; Fri, 20 Sep 2024 08:16:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726820175; bh=zYrG4JOdof5Kb4KbKr9UqFtgnrrQGTE+AbTafTRVifY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=m7szP3+fwUyzikmJZ2LdFSgLmJZ3olD/2ioaIno0bkiPeKe+WUfWfFsiRGBfarO5g 2m+2sgPGZuU9E+0fVUdCdNyRSMJXXp/WWS5+yTyw+DOWvIXvEqn3PR9ZQyrR8aKBz2 z5jOE+rqhL86qsUaUr4cvBCo/HwULe1bnqpnGWA3VI0Ds2hv5vNAmpH/KlAiCH5TGu PxZCpp+B+6OyJPynndxV41VuK7yXGt0P3zP9VRwnykSrYwQkRB3lL73OIeZYAnDTzv KtQAVQT5Ah358eGuYn6t7mUPXI9ohR40L6Vk55BC1TdXeFN2hDECqYMSz9xLkQMy9d lZNWTMvDRFesg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F6FCCF58DD; Fri, 20 Sep 2024 08:16:15 +0000 (UTC) From: Chuan Liu via B4 Relay Date: Fri, 20 Sep 2024 16:16:11 +0800 Subject: [PATCH 1/6] clk: meson: mpll: Delete a meaningless spinlock from the MPLL Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240920-mpll_spinlock-v1-1-5249a9a7e2b7@amlogic.com> References: <20240920-mpll_spinlock-v1-0-5249a9a7e2b7@amlogic.com> In-Reply-To: <20240920-mpll_spinlock-v1-0-5249a9a7e2b7@amlogic.com> To: Neil Armstrong , Jerome Brunet , Michael Turquette , Stephen Boyd , Kevin Hilman , Martin Blumenstingl Cc: linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Chuan Liu X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1726820173; l=1612; i=chuan.liu@amlogic.com; s=20240902; h=from:subject:message-id; bh=BZXhg4CTNZVT2pfn9n5YtAFzBvDkKei7u08ePhTMQ5Y=; b=c5RWy2so9ARwlG7HP5tJMif6Xs8tPQe83hHw4BrCVOzlgZUKN4PVqezSrnxDy0IjHki3OrbUv 9rUeCaK7jI7CMadjwdGnhqnZsyzNB6BuZ9yonfem7thhHL6aJo+BlDv X-Developer-Key: i=chuan.liu@amlogic.com; a=ed25519; pk=fnKDB+81SoWGKW2GJNFkKy/ULvsDmJZRGBE7pR5Xcpo= X-Endpoint-Received: by B4 Relay for chuan.liu@amlogic.com/20240902 with auth_id=203 X-Original-From: Chuan Liu Reply-To: chuan.liu@amlogic.com From: Chuan Liu The existing locking mechanism of CCF can effectively avoid concurrent register access. struct meson_clk_mpll_data has no meaning in defining a spinlock repeatedly. Signed-off-by: Chuan Liu --- drivers/clk/meson/clk-mpll.c | 11 ----------- drivers/clk/meson/clk-mpll.h | 1 - 2 files changed, 12 deletions(-) diff --git a/drivers/clk/meson/clk-mpll.c b/drivers/clk/meson/clk-mpll.c index f639d56f0fd3..aa9abd06ae65 100644 --- a/drivers/clk/meson/clk-mpll.c +++ b/drivers/clk/meson/clk-mpll.c @@ -112,26 +112,15 @@ static int mpll_set_rate(struct clk_hw *hw, struct clk_regmap *clk = to_clk_regmap(hw); struct meson_clk_mpll_data *mpll = meson_clk_mpll_data(clk); unsigned int sdm, n2; - unsigned long flags = 0; params_from_rate(rate, parent_rate, &sdm, &n2, mpll->flags); - if (mpll->lock) - spin_lock_irqsave(mpll->lock, flags); - else - __acquire(mpll->lock); - /* Set the fractional part */ meson_parm_write(clk->map, &mpll->sdm, sdm); /* Set the integer divider part */ meson_parm_write(clk->map, &mpll->n2, n2); - if (mpll->lock) - spin_unlock_irqrestore(mpll->lock, flags); - else - __release(mpll->lock); - return 0; } diff --git a/drivers/clk/meson/clk-mpll.h b/drivers/clk/meson/clk-mpll.h index a991d568c43a..4ffd3aeef799 100644 --- a/drivers/clk/meson/clk-mpll.h +++ b/drivers/clk/meson/clk-mpll.h @@ -20,7 +20,6 @@ struct meson_clk_mpll_data { struct parm misc; const struct reg_sequence *init_regs; unsigned int init_count; - spinlock_t *lock; u8 flags; }; From patchwork Fri Sep 20 08:16:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuan Liu via B4 Relay X-Patchwork-Id: 13808252 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 0D9D526AE8; Fri, 20 Sep 2024 08:16:15 +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=1726820176; cv=none; b=AjbRfn+dCe9NWVXobmdXQ8W0yHFXLyPouuwvs+W0/XcHYhjrt46q8CttG5MOe2V1y4h+ggJ5LdvV4+lnGgVY8Q2N5MT2DRMpoKv0NV5laoaTcQE3ZZKdQiJ/NKevdHcFnXwAnJIUwa5V2DTyokIEx2yeB9PvhROAt/GAkvFhpEQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726820176; c=relaxed/simple; bh=uDJ/JfCAZYzKjfsCM7SEEMTMXp/hsTtivqJC8/88TmQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jMWUfHMPCeUNEffxbNkGiiLXtT3O5z3mwsxpd6FT2/K7DhD5bIJCMipI1x5nZ04YpdlocuWJMcZyL2650Xs92ie56zAFr8yKPDdjEZ6Pg0vTRp60oGpfBiWgS5/0v4ekBi1wrLVh11MgG1toQ/P8BBtZhUGgL8v+Zf61NZP+hNQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sR3R6Mgu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sR3R6Mgu" Received: by smtp.kernel.org (Postfix) with ESMTPS id B5AA0C4CECE; Fri, 20 Sep 2024 08:16:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726820175; bh=uDJ/JfCAZYzKjfsCM7SEEMTMXp/hsTtivqJC8/88TmQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=sR3R6MguRXUzRqDWyPt9p6vqAPTNrX+We6G0fTU+DbxS2ndvmqYJZr08N9wlyBMg0 uglZrVlhz5TwGDqhk3DHcG6VkAuEQsCZZkwNYHMKkxKAegI6cce0u6HLi47Fq9brOH r91gRteRO1b/qMlMxcaru0Psecmup3LhNlxJSMis+9d/Qm3sS8grp+8EcJwdu5AK1+ rPZTZdjgBLjzoaGf1jhkWIl9K72h1Ga90WO+PQKYd56GgmFJEdlFeCrIBie5DcYgCj R12jpj/SVR7iB/CDKBVnrCMM/ewzB30qSaGH0GFHs+REhERxdE4cwOmOtKNNZr0Dxg Zs9jI1cZexriw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7BD3CF58E9; Fri, 20 Sep 2024 08:16:15 +0000 (UTC) From: Chuan Liu via B4 Relay Date: Fri, 20 Sep 2024 16:16:12 +0800 Subject: [PATCH 2/6] clk: meson: axg: Delete the spinlock from the MPLL Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240920-mpll_spinlock-v1-2-5249a9a7e2b7@amlogic.com> References: <20240920-mpll_spinlock-v1-0-5249a9a7e2b7@amlogic.com> In-Reply-To: <20240920-mpll_spinlock-v1-0-5249a9a7e2b7@amlogic.com> To: Neil Armstrong , Jerome Brunet , Michael Turquette , Stephen Boyd , Kevin Hilman , Martin Blumenstingl Cc: linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Chuan Liu X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1726820173; l=1500; i=chuan.liu@amlogic.com; s=20240902; h=from:subject:message-id; bh=A66AwGhQ5KfvBGuX3+8YPfqlQmWjyAOHLmEF/9YfExU=; b=bC07qWlOnIwGnXk6bbO3cqsQy+tRulPBMDppiO6cLZkxQu92f1niJme+f0EGewC2yIcRM9eSX uoKBnEkizCdDJKW8+cYsx8Ay+NjiznMnc324fuKn0XBL08ySyMbrG3s X-Developer-Key: i=chuan.liu@amlogic.com; a=ed25519; pk=fnKDB+81SoWGKW2GJNFkKy/ULvsDmJZRGBE7pR5Xcpo= X-Endpoint-Received: by B4 Relay for chuan.liu@amlogic.com/20240902 with auth_id=203 X-Original-From: Chuan Liu Reply-To: chuan.liu@amlogic.com From: Chuan Liu It is meaningless to define a spinlock in the struct meson_clk_mpll_data. Signed-off-by: Chuan Liu --- drivers/clk/meson/axg.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c index 757c7a28c53d..1b08daf579b2 100644 --- a/drivers/clk/meson/axg.c +++ b/drivers/clk/meson/axg.c @@ -23,8 +23,6 @@ #include -static DEFINE_SPINLOCK(meson_clk_lock); - static struct clk_regmap axg_fixed_pll_dco = { .data = &(struct meson_clk_pll_data){ .en = { @@ -506,7 +504,6 @@ static struct clk_regmap axg_mpll0_div = { .shift = 0, .width = 1, }, - .lock = &meson_clk_lock, .flags = CLK_MESON_MPLL_ROUND_CLOSEST, }, .hw.init = &(struct clk_init_data){ @@ -557,7 +554,6 @@ static struct clk_regmap axg_mpll1_div = { .shift = 1, .width = 1, }, - .lock = &meson_clk_lock, .flags = CLK_MESON_MPLL_ROUND_CLOSEST, }, .hw.init = &(struct clk_init_data){ @@ -613,7 +609,6 @@ static struct clk_regmap axg_mpll2_div = { .shift = 2, .width = 1, }, - .lock = &meson_clk_lock, .flags = CLK_MESON_MPLL_ROUND_CLOSEST, }, .hw.init = &(struct clk_init_data){ @@ -664,7 +659,6 @@ static struct clk_regmap axg_mpll3_div = { .shift = 3, .width = 1, }, - .lock = &meson_clk_lock, .flags = CLK_MESON_MPLL_ROUND_CLOSEST, }, .hw.init = &(struct clk_init_data){ From patchwork Fri Sep 20 08:16:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuan Liu via B4 Relay X-Patchwork-Id: 13808253 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 0DA7F2BAEF; Fri, 20 Sep 2024 08:16:15 +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=1726820176; cv=none; b=Na/bWi3jNVLkVVMa3pbrHngFkIbgyxlr9WMo1CDRDjVtpmaW8ysEVMM6YHdPUld5JtviTWGskZ3MMhIiBdBQahMfu8ZwpTccbqEtMHdOnMCfOiXljAbZp/AXAQp7JDBiytgyqgsguhDIetb2Jksoos65Bw9+aCnl1SWLEu69g0g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726820176; c=relaxed/simple; bh=KGg+9yxlFddJLvy59fqrK62adIYW2fdEx4QtkoNDsrU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cTwy9tCF1OQkjSZsFttU0kUBQg9sgE/qwJI56blUs+1TzoqxQjIDdYNcumjgnLpWehpPf6Ub+7k9IiiXG7mtpkS8+HGXo6IQmkaQnOxfq6yZeKsxtvOAcYOWbNmSETf4PysDT0wkpAtGTF73w/a0ctnIZf5rIhY/bkc5HITFkCc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PetVLVQ+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PetVLVQ+" Received: by smtp.kernel.org (Postfix) with ESMTPS id C1D2AC4CED0; Fri, 20 Sep 2024 08:16:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726820175; bh=KGg+9yxlFddJLvy59fqrK62adIYW2fdEx4QtkoNDsrU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=PetVLVQ+3aRmiyk7jD37i7VBES0LRNaEcx1+/3DbN288tLnLBJirx6WWfzlJEA/af fMe66vfaM9Y2arpx2JcaLTgk2b6fGDhaX6WjzvhKvPGngb304Jw1shjJmdYMCMYtRW b0BhtwSLXzNRc71Z7RvrjyfhETBf/QFTxUfJ/I5yxfka4px6v06GKb2BgySTuhE08I rycCXPqCabVPfs9tpI452Mh/20wnZpJHsalMGHngMSYteeQFB8mZ7kLY9hlqwBxqiF rZelzOs93zVCxygRwuVQ4tmiLeDwRVsu3mivCF64Tev/5XcY9am2jvGYhr4NKdMA9o vpSqoUGS57zwg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B74ECCF58EA; Fri, 20 Sep 2024 08:16:15 +0000 (UTC) From: Chuan Liu via B4 Relay Date: Fri, 20 Sep 2024 16:16:13 +0800 Subject: [PATCH 3/6] clk: meson: meson8b: Delete the spinlock from the MPLL Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240920-mpll_spinlock-v1-3-5249a9a7e2b7@amlogic.com> References: <20240920-mpll_spinlock-v1-0-5249a9a7e2b7@amlogic.com> In-Reply-To: <20240920-mpll_spinlock-v1-0-5249a9a7e2b7@amlogic.com> To: Neil Armstrong , Jerome Brunet , Michael Turquette , Stephen Boyd , Kevin Hilman , Martin Blumenstingl Cc: linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Chuan Liu X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1726820173; l=1042; i=chuan.liu@amlogic.com; s=20240902; h=from:subject:message-id; bh=N+7gK8ye2ZH8Sz8SGwh9nN4Tn81n4jpbYcpMlhBsfdw=; b=dphtUdfobSoHJkXJrIcLyyGoAhtVltiI2V0nUCiZXjLIwlYlcis4LsTvsd/4d/Gg5DfGZ6PUO OqjLr1Eei1QAyuIutGAG1gmYy2uTt1vpwQylU9mZVhHDYpYCp/cMf3Y X-Developer-Key: i=chuan.liu@amlogic.com; a=ed25519; pk=fnKDB+81SoWGKW2GJNFkKy/ULvsDmJZRGBE7pR5Xcpo= X-Endpoint-Received: by B4 Relay for chuan.liu@amlogic.com/20240902 with auth_id=203 X-Original-From: Chuan Liu Reply-To: chuan.liu@amlogic.com From: Chuan Liu It is meaningless to define a spinlock in the struct meson_clk_mpll_data. Signed-off-by: Chuan Liu --- drivers/clk/meson/meson8b.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c index b7417ac262d3..5011768c0f4e 100644 --- a/drivers/clk/meson/meson8b.c +++ b/drivers/clk/meson/meson8b.c @@ -492,7 +492,6 @@ static struct clk_regmap meson8b_mpll0_div = { .shift = 25, .width = 1, }, - .lock = &meson_clk_lock, }, .hw.init = &(struct clk_init_data){ .name = "mpll0_div", @@ -537,7 +536,6 @@ static struct clk_regmap meson8b_mpll1_div = { .shift = 16, .width = 9, }, - .lock = &meson_clk_lock, }, .hw.init = &(struct clk_init_data){ .name = "mpll1_div", @@ -582,7 +580,6 @@ static struct clk_regmap meson8b_mpll2_div = { .shift = 16, .width = 9, }, - .lock = &meson_clk_lock, }, .hw.init = &(struct clk_init_data){ .name = "mpll2_div", From patchwork Fri Sep 20 08:16:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuan Liu via B4 Relay X-Patchwork-Id: 13808257 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 435A574BE1; Fri, 20 Sep 2024 08:16:15 +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=1726820176; cv=none; b=dvbxucs2JxPeS1Hs4lnsWOXfXJlVn2X/iJsGJ8w7TGx7V8k8czAju32XkcoEV60SGjT5PaGC3LbB9HK43o1K7khrRgBnhhlMfE1uZU9SvRe0/M6KmPRmju438FJKV7VYQvyinhty7+V9f9LS8wKilUB5HKJh8oOcRA5BiaKhINs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726820176; c=relaxed/simple; bh=DradNtZLKYKI/pe922nGMOfjuaKzkzgQd7KVWBEvvso=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=su/AJCQvOzZqeeCcUUuvM1bOufNwgUNwZcMibenFYQPAG9ls1T3cz5sMtwuegwzx/j3yA5WfuzRxGYcif8BUhgcCgqley4CR9zja5m3oDRlSmxtGFfLoEzKkVpdnls1ER6KRE6+pfXVZxCaN+/LNF2s8YF+uqhaBB6jCXWXSExM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aimu5PHd; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aimu5PHd" Received: by smtp.kernel.org (Postfix) with ESMTPS id D399AC4CED3; Fri, 20 Sep 2024 08:16:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726820175; bh=DradNtZLKYKI/pe922nGMOfjuaKzkzgQd7KVWBEvvso=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=aimu5PHdTxRSviYw9IsCYWW8ejEKajFIc+y5xuoRBSDZ9PGRi5K73TKVN3QHu2Szv mMQjURBzxf901Kz4Zl2JNwmTh7yU/8SDCUQxAIEY0H8Hb/iYpBIt3Yu9c9a9ih1AQ3 Sdto4RJCrHUs68epLAPhIaCdYKGdxj84vrj5UrxCpEjUxUPRwLarV2Jv2sjIzliNt2 KIcDnmvY7f5TLgUvmlTe3kozbMIotNuDDrnP9lhJ/rAQOepWJgDCYQ5wAvmY97IsSD bg7yRrz3zZdBK6ersKzt04Kq+V1c9XGPh9aiFQJbadF2eyT1XmaddU+TSUCind7iml LC8vSj3PZkriw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C54D9CF58DD; Fri, 20 Sep 2024 08:16:15 +0000 (UTC) From: Chuan Liu via B4 Relay Date: Fri, 20 Sep 2024 16:16:14 +0800 Subject: [PATCH 4/6] clk: meson: gxbb: Delete the spinlock from the MPLL Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240920-mpll_spinlock-v1-4-5249a9a7e2b7@amlogic.com> References: <20240920-mpll_spinlock-v1-0-5249a9a7e2b7@amlogic.com> In-Reply-To: <20240920-mpll_spinlock-v1-0-5249a9a7e2b7@amlogic.com> To: Neil Armstrong , Jerome Brunet , Michael Turquette , Stephen Boyd , Kevin Hilman , Martin Blumenstingl Cc: linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Chuan Liu X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1726820173; l=1458; i=chuan.liu@amlogic.com; s=20240902; h=from:subject:message-id; bh=r/V4f8IDG1LGpMtumtpaJ0LFZXwZ5q/tzNNHh8H7+Ng=; b=NtifgucIpJ4Mvxn1mZSWmWBsWYiHyWJUsScY1EzaHpJAZqr8qLzhX8/r5U3bVyAU6Q7KgpmrE 5Qi+Dq7JQwADH+ieFl7XPqEZ9egM5mtM6IaxvziEggqp0Z8Gfgv2thW X-Developer-Key: i=chuan.liu@amlogic.com; a=ed25519; pk=fnKDB+81SoWGKW2GJNFkKy/ULvsDmJZRGBE7pR5Xcpo= X-Endpoint-Received: by B4 Relay for chuan.liu@amlogic.com/20240902 with auth_id=203 X-Original-From: Chuan Liu Reply-To: chuan.liu@amlogic.com From: Chuan Liu It is meaningless to define a spinlock in the struct meson_clk_mpll_data. Signed-off-by: Chuan Liu --- drivers/clk/meson/gxbb.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index f071faad1ebb..262c318edbd5 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -19,8 +19,6 @@ #include -static DEFINE_SPINLOCK(meson_clk_lock); - static const struct pll_params_table gxbb_gp0_pll_params_table[] = { PLL_PARAMS(32, 1), PLL_PARAMS(33, 1), @@ -731,7 +729,6 @@ static struct clk_regmap gxbb_mpll0_div = { .shift = 16, .width = 9, }, - .lock = &meson_clk_lock, }, .hw.init = &(struct clk_init_data){ .name = "mpll0_div", @@ -760,7 +757,6 @@ static struct clk_regmap gxl_mpll0_div = { .shift = 16, .width = 9, }, - .lock = &meson_clk_lock, }, .hw.init = &(struct clk_init_data){ .name = "mpll0_div", @@ -812,7 +808,6 @@ static struct clk_regmap gxbb_mpll1_div = { .shift = 16, .width = 9, }, - .lock = &meson_clk_lock, }, .hw.init = &(struct clk_init_data){ .name = "mpll1_div", @@ -855,7 +850,6 @@ static struct clk_regmap gxbb_mpll2_div = { .shift = 16, .width = 9, }, - .lock = &meson_clk_lock, }, .hw.init = &(struct clk_init_data){ .name = "mpll2_div", From patchwork Fri Sep 20 08:16:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuan Liu via B4 Relay X-Patchwork-Id: 13808258 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 7056976C61; Fri, 20 Sep 2024 08:16:16 +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=1726820176; cv=none; b=cN9lFhOcuqOMGTA5f/zVy4Dhdx1a0sJeEjslSpezBRmkZNq+hAYWjwMjgCv6Qlpkg22eYTyCg3BsW8Z91JVbPQv7HOpFa3A+5l+xQP+PEzBUtavRaTM4op2vhghAwSmLO97+JJ3eOMnspyltZvthdaJ+TyHqafJog72Iol8PdVA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726820176; c=relaxed/simple; bh=+Mcq8HQCyVmQFXDqiSObnUSgLIkezOO5EMsHAPIWPUM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hvlHi4NppIRZFiD/9zqoUJYHayNe/i5Kumub5JRPl4SIQSpD5gclhJe61XB97U29pNHByZiv9RDlVvjUu60xWVSWuqS99EqdekFS2G+7z3U1xHDSrZ3zYSSUIKJSEc48t9e7MU9Scihc1pKZA8Xbfja51hGUk2JLWmehpZMSQo4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dqnpXtnA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dqnpXtnA" Received: by smtp.kernel.org (Postfix) with ESMTPS id E3F68C4CED5; Fri, 20 Sep 2024 08:16:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726820175; bh=+Mcq8HQCyVmQFXDqiSObnUSgLIkezOO5EMsHAPIWPUM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=dqnpXtnAJw9jHfRlMwR11g5ByIKieefRsy79eFQAmp8uKnSkxq7qTnwPryf58bfX0 k1pUm4ISmGjMwlG8C3/YuqQltMgbfnTmB4zb4MRrUu8rUBrgnkNh+OfeFkh9qT84zs LHZM6zJUnYGehKWHvxr0MFW1pjRZ7VXBWSqU1eeQgcXPSa+wzQ8U1V8mtHi0G2ktNr FWree7PlZ5rhlIaZanb86eOXF7NC3HNOn+mMnXCc8G6ti97yLapnM60biIJ1Xzjynd BDMrf4aQHkcvjeaknfA2/1EgsYoE2PoxoY4bYetCr9i98/8wjhz8/cVkBOtzmNG/20 X2QwnYPOB5trQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA191CF58EA; Fri, 20 Sep 2024 08:16:15 +0000 (UTC) From: Chuan Liu via B4 Relay Date: Fri, 20 Sep 2024 16:16:15 +0800 Subject: [PATCH 5/6] clk: meson: g12a: Delete the spinlock from the MPLL Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240920-mpll_spinlock-v1-5-5249a9a7e2b7@amlogic.com> References: <20240920-mpll_spinlock-v1-0-5249a9a7e2b7@amlogic.com> In-Reply-To: <20240920-mpll_spinlock-v1-0-5249a9a7e2b7@amlogic.com> To: Neil Armstrong , Jerome Brunet , Michael Turquette , Stephen Boyd , Kevin Hilman , Martin Blumenstingl Cc: linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Chuan Liu X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1726820173; l=1559; i=chuan.liu@amlogic.com; s=20240902; h=from:subject:message-id; bh=MZl3oPXVbFrreOWsDGIWEgWOlrCQLcqRIhkDzjt3Cc8=; b=rP/mr0KX0CYpSvUBB4/ILbi/5tZMB85fblKCbF0E0b2repGNwdGARAflq4jCqraXN5U5FXntI GPjaJ4vFjmqC1ljnYvzbDMZT3fLMLx8vU1fFX/HMF92Onx3NjkXe6O1 X-Developer-Key: i=chuan.liu@amlogic.com; a=ed25519; pk=fnKDB+81SoWGKW2GJNFkKy/ULvsDmJZRGBE7pR5Xcpo= X-Endpoint-Received: by B4 Relay for chuan.liu@amlogic.com/20240902 with auth_id=203 X-Original-From: Chuan Liu Reply-To: chuan.liu@amlogic.com From: Chuan Liu It is meaningless to define a spinlock in the struct meson_clk_mpll_data. Signed-off-by: Chuan Liu --- drivers/clk/meson/g12a.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c index 02dda57105b1..d3539fe9f7af 100644 --- a/drivers/clk/meson/g12a.c +++ b/drivers/clk/meson/g12a.c @@ -28,8 +28,6 @@ #include -static DEFINE_SPINLOCK(meson_clk_lock); - static struct clk_regmap g12a_fixed_pll_dco = { .data = &(struct meson_clk_pll_data){ .en = { @@ -2225,7 +2223,6 @@ static struct clk_regmap g12a_mpll0_div = { .shift = 29, .width = 1, }, - .lock = &meson_clk_lock, .init_regs = g12a_mpll0_init_regs, .init_count = ARRAY_SIZE(g12a_mpll0_init_regs), }, @@ -2279,7 +2276,6 @@ static struct clk_regmap g12a_mpll1_div = { .shift = 29, .width = 1, }, - .lock = &meson_clk_lock, .init_regs = g12a_mpll1_init_regs, .init_count = ARRAY_SIZE(g12a_mpll1_init_regs), }, @@ -2333,7 +2329,6 @@ static struct clk_regmap g12a_mpll2_div = { .shift = 29, .width = 1, }, - .lock = &meson_clk_lock, .init_regs = g12a_mpll2_init_regs, .init_count = ARRAY_SIZE(g12a_mpll2_init_regs), }, @@ -2387,7 +2382,6 @@ static struct clk_regmap g12a_mpll3_div = { .shift = 29, .width = 1, }, - .lock = &meson_clk_lock, .init_regs = g12a_mpll3_init_regs, .init_count = ARRAY_SIZE(g12a_mpll3_init_regs), }, From patchwork Fri Sep 20 08:16:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuan Liu via B4 Relay X-Patchwork-Id: 13808256 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 3CA066F307; Fri, 20 Sep 2024 08:16:16 +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=1726820176; cv=none; b=PtQ3pr3idbnnAPyKI+4qkncDkwYrUX4eE5EvZZxManp2xj+YBIw7jiiRwW2cCGfH46YMge3uDYQ3CvxX5NkHa/9qDw/KGHsEgD16hWqmAktCqbPsNXqeyDHN+3b3gbAYX32Lg7d/yNzrUSrTwrIslKYjf8p6hGvyLmdDkCggJ+c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726820176; c=relaxed/simple; bh=KFoyhl3w36LgJKQF6XlNX6jdkTChd706ofq02msKEhg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tXDtVrdkDaVhzvkPFjHLvaoUkymwpUIAFaUtwth/6WC3GwkcNKy8YLdHvPLn9j6MjNz3LemYzrnSnenxI/7JxXrpKTgyKxR2ky8Wu7BX+kGzhvB6k7+savUpp1LjgqG6BbqElwpAY7hTPlogRPbz7ztrYBwu9eUpsCo5CE1lRlg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NocuYjic; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NocuYjic" Received: by smtp.kernel.org (Postfix) with ESMTPS id F233DC4CED8; Fri, 20 Sep 2024 08:16:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726820176; bh=KFoyhl3w36LgJKQF6XlNX6jdkTChd706ofq02msKEhg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=NocuYjicviiHW9dkiMF1PZAPN+bOKTEV8Q/8GI/dVG4rWnrBzWMf3t/lahZSH2iy7 VS/32v06yE9EdLx9H+qpjXgD3j98icutMRSmYJxWIk85Pt8iQAthT+CWUIjI7/oeBQ HmOHaCYWHWq5g9tESqP6uXE178bzI2/SQ64wVwrp3DZpR8aSO00L/oe7MZLmBOnetu 70buGgFLqBcdp4uaKx936hjQ4eCFNBEh/TGCfpaz2K7mPh9sl+eTtJ4DlYazqihHCb byhDbV1jXYdfjjNeDFKzW719lTG0gIK5EwsC7C5QAl2xRROoWpeZDr1VbXUFc0ja6N CzHJQS+MNsn1g== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E90D9CF58E5; Fri, 20 Sep 2024 08:16:15 +0000 (UTC) From: Chuan Liu via B4 Relay Date: Fri, 20 Sep 2024 16:16:16 +0800 Subject: [PATCH 6/6] clk: meson: s4: Delete the spinlock from the MPLL Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240920-mpll_spinlock-v1-6-5249a9a7e2b7@amlogic.com> References: <20240920-mpll_spinlock-v1-0-5249a9a7e2b7@amlogic.com> In-Reply-To: <20240920-mpll_spinlock-v1-0-5249a9a7e2b7@amlogic.com> To: Neil Armstrong , Jerome Brunet , Michael Turquette , Stephen Boyd , Kevin Hilman , Martin Blumenstingl Cc: linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Chuan Liu X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1726820174; l=1660; i=chuan.liu@amlogic.com; s=20240902; h=from:subject:message-id; bh=kO2S9WluZnKsZu8WbD08FCxRfFkq+Y8JsWEudLTTuJE=; b=XoCk+GChXy9oiDtXd6sz8adYDgdcRqK51hXoqH8GCDNNc/qoUkYn7Gv9MKWO5M+QWeYQuOBUM L6QxNxGTq4kCsmICSgdLYk2oDQPdZiwAsiVXPVaK4uYGyhXIAE4IDFG X-Developer-Key: i=chuan.liu@amlogic.com; a=ed25519; pk=fnKDB+81SoWGKW2GJNFkKy/ULvsDmJZRGBE7pR5Xcpo= X-Endpoint-Received: by B4 Relay for chuan.liu@amlogic.com/20240902 with auth_id=203 X-Original-From: Chuan Liu Reply-To: chuan.liu@amlogic.com From: Chuan Liu It is meaningless to define a spinlock in the struct meson_clk_mpll_data. Signed-off-by: Chuan Liu --- drivers/clk/meson/s4-pll.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/clk/meson/s4-pll.c b/drivers/clk/meson/s4-pll.c index 9697f6577e06..d8e621e79428 100644 --- a/drivers/clk/meson/s4-pll.c +++ b/drivers/clk/meson/s4-pll.c @@ -17,8 +17,6 @@ #include "meson-clkc-utils.h" #include -static DEFINE_SPINLOCK(meson_clk_lock); - /* * These clock are a fixed value (fixed_pll is 2GHz) that is initialized by ROMcode. * The chip was changed fixed pll for security reasons. Fixed PLL registers are not writable @@ -547,7 +545,6 @@ static struct clk_regmap s4_mpll0_div = { .shift = 29, .width = 1, }, - .lock = &meson_clk_lock, .init_regs = s4_mpll0_init_regs, .init_count = ARRAY_SIZE(s4_mpll0_init_regs), }, @@ -601,7 +598,6 @@ static struct clk_regmap s4_mpll1_div = { .shift = 29, .width = 1, }, - .lock = &meson_clk_lock, .init_regs = s4_mpll1_init_regs, .init_count = ARRAY_SIZE(s4_mpll1_init_regs), }, @@ -655,7 +651,6 @@ static struct clk_regmap s4_mpll2_div = { .shift = 29, .width = 1, }, - .lock = &meson_clk_lock, .init_regs = s4_mpll2_init_regs, .init_count = ARRAY_SIZE(s4_mpll2_init_regs), }, @@ -709,7 +704,6 @@ static struct clk_regmap s4_mpll3_div = { .shift = 29, .width = 1, }, - .lock = &meson_clk_lock, .init_regs = s4_mpll3_init_regs, .init_count = ARRAY_SIZE(s4_mpll3_init_regs), },