From patchwork Sat Aug 12 10:02:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87?= X-Patchwork-Id: 134858 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1632701vqi; Sat, 12 Aug 2023 03:26:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IELtHi2B6k5NG21u5EItLCNAOmabbDvlf422bTs3Ax+ftm8gAvr2WE0ipRIX4RP35OeS53x X-Received: by 2002:a17:90b:3615:b0:268:1b62:2f6c with SMTP id ml21-20020a17090b361500b002681b622f6cmr3792073pjb.2.1691836016709; Sat, 12 Aug 2023 03:26:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691836016; cv=none; d=google.com; s=arc-20160816; b=x0VCTfQj3F/cZYv1zeO2bnCOJXlPNOHrmG25bFbTjYr4O6b3IKx4/+lzycIUehAOCF Zl6xbNIWvv2K4AUNiyGytZxnBcuPUo0j7tSAJtdVMSKD8reqIAwha3NZd6MCH6mup1w7 SdssDSYTU7yg3MT83mcrJsseAD49jI3GS4MkSlYuIgV5NMo63/VEsQ9BCfsasmyzeNvx BKzU0XfY4t43nEFYN0nI/rsy76WHuje8eC/PGMMIWp5iwKgZupKeL6gIoIHBelA5VViF HH6oQuysp34lN55zT6x3laVCp6SyM4dm+8BdtMfhtBIBJPaSEX5KuSF/VZ7oDp8Xxm11 afrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=PDocY7zQHjIvXc34gVZ/UTMkJOYyhwucE+o2OYQgVYM=; fh=vCXHINAHb4XurYdM9F4AVKoBQxk2x8lV9AjUfQ8bZlY=; b=ZTdHuuFbPJlIa86M05MrIKDxWt56m/uJFPWO4aSGCkhGtTn+mGyCf5sob1J5XSe3/Y qC0F0hspyQzjcSyiZlXsb1+mNG3fIljsYWOELLrGCzVoHWwwWjdj8o+3u13yeLw9L4CO uXUJRXyboZ3eySU5fja2gYIqKWcM01TbEkZwz3duv4ER9x/PNo45u6zteVEyByYR3+MH bCjonOg8fdDrBMdoxHInD6FTlRiBZC3YrQSYsO6CKlIvQjwPSl1G7hdk8FeZAU8XQZdv O1T9XEdIS3nqkv/tivJMt3NCByLTGKTUjOHMVxUjSPL5IY9qhu5+pun17eLuGqVVTLdI a/Zw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l12-20020a17090a660c00b002532c9b252asi4689045pjj.73.2023.08.12.03.26.43; Sat, 12 Aug 2023 03:26:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236926AbjHLKEL (ORCPT + 99 others); Sat, 12 Aug 2023 06:04:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236795AbjHLKEB (ORCPT ); Sat, 12 Aug 2023 06:04:01 -0400 Received: from mx.skole.hr (mx1.hosting.skole.hr [161.53.165.185]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57E5E270E; Sat, 12 Aug 2023 03:04:01 -0700 (PDT) Received: from mx1.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id DD37982AB3; Sat, 12 Aug 2023 12:03:58 +0200 (CEST) From: =?utf-8?q?Duje_Mihanovi=C4=87?= Date: Sat, 12 Aug 2023 12:02:56 +0200 Subject: [PATCH v2 1/4] clk: mmp2: Move number of clocks to driver source MIME-Version: 1.0 Message-Id: <20230812-mmp-nr-clks-v2-1-f9271bd7eaa5@skole.hr> References: <20230812-mmp-nr-clks-v2-0-f9271bd7eaa5@skole.hr> In-Reply-To: <20230812-mmp-nr-clks-v2-0-f9271bd7eaa5@skole.hr> To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, =?utf-8?q?Duje_Mihanovi=C4=87?= X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=3125; i=duje.mihanovic@skole.hr; h=from:subject:message-id; bh=OkibwBVVmPOS86JuJy1nP74HMH++zpeePkBpCC9BLWs=; b=owEBbQKS/ZANAwAIAZoRnrBCLZbhAcsmYgBk11jVfn9xj4Jow1iguD2wlx7KSJh33+NrXykP1 6Wet9GBf1OJAjMEAAEIAB0WIQRT351NnD/hEPs2LXiaEZ6wQi2W4QUCZNdY1QAKCRCaEZ6wQi2W 4frSD/wINp9tKj4DAF5hF0Gkx62Wd1HUBI2wskzhmLBCpIs6VTatt7MIWzjgM9AdFFYlF0xxylB BANEFhiY+gMwU4RZtbBopYzfL/r1jHc9WJ6wvis43K0DFTE+uJXrgy1idtkdMCtlqoEvktHGFu5 +9DodTcE95a3dyfggcxZjKOFg0ODsxhcS82h2tCeL4PwGTsnYILFYY0anyJZCIXNvINwzBXXhbd P6Gwphn3rLt9lC0744QEPp4Q9F16n7ZfmTSwHoiVY9yvJor1eoWszRlXUz6b6AAkUjTy8MHKGez ZRMMJDCbJVecjo2xVvYM3/2XVRRmKPZBJaTTSSQ6blfl3L20WiMVrPsDHyH5bJWv77tmjkuebpA GdFBZqRuqqfFKM/dszRvC0z9hPzgqL035ETDrbXepv8ugruulzlW0ZkFe6mXA/wZYUffe0FpCA/ Lg53DcCZDKWr9h0ENkuPl/IzQDJLJRSet80kx8G50sJPELhFQ4qHZFpitT8+9x3Tuvc9KGXWJyv rJyxFBNdnZhhUeX6n0Edqy/bZTejX3V5gCT54epfDPHsrafXe/GHRX98IqLFNF/04KbvEsXAtAo 6n3p3OvkE8bzVUXHUwB82xO/3mGlnmDMxnHDECpJFYyF8Z0oDeMjVpVSg4C4mQnGdTmOQRyDC4r TgUb8H0HNfI700g== X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=53DF9D4D9C3FE110FB362D789A119EB0422D96E1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774018643360637319 X-GMAIL-MSGID: 1774018643360637319 The number of clocks should not be in the dt binding as it is not used by the respective device tree and thus needlessly bloats the ABI. Move this number of clocks into the driver source. Signed-off-by: Duje Mihanović --- drivers/clk/mmp/clk-audio.c | 6 ++++-- drivers/clk/mmp/clk-of-mmp2.c | 4 +++- include/dt-bindings/clock/marvell,mmp2-audio.h | 1 - include/dt-bindings/clock/marvell,mmp2.h | 1 - 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/clk/mmp/clk-audio.c b/drivers/clk/mmp/clk-audio.c index 6fb1aa9487b5..ae521aaf8cdc 100644 --- a/drivers/clk/mmp/clk-audio.c +++ b/drivers/clk/mmp/clk-audio.c @@ -55,6 +55,8 @@ #define SSPA_AUD_PLL_CTRL1_DIV_OCLK_PATTERN_MASK (0x7ff << 0) #define SSPA_AUD_PLL_CTRL1_DIV_OCLK_PATTERN(x) ((x) << 0) +#define CLK_AUDIO_NR_CLKS 3 + struct mmp2_audio_clk { void __iomem *mmio_base; @@ -336,7 +338,7 @@ static int register_clocks(struct mmp2_audio_clk *priv, struct device *dev) priv->clk_data.hws[MMP2_CLK_AUDIO_SYSCLK] = &priv->sysclk_gate.hw; priv->clk_data.hws[MMP2_CLK_AUDIO_SSPA0] = &priv->sspa0_gate.hw; priv->clk_data.hws[MMP2_CLK_AUDIO_SSPA1] = &priv->sspa1_gate.hw; - priv->clk_data.num = MMP2_CLK_AUDIO_NR_CLKS; + priv->clk_data.num = CLK_AUDIO_NR_CLKS; return of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get, &priv->clk_data); @@ -349,7 +351,7 @@ static int mmp2_audio_clk_probe(struct platform_device *pdev) priv = devm_kzalloc(&pdev->dev, struct_size(priv, clk_data.hws, - MMP2_CLK_AUDIO_NR_CLKS), + CLK_AUDIO_NR_CLKS), GFP_KERNEL); if (!priv) return -ENOMEM; diff --git a/drivers/clk/mmp/clk-of-mmp2.c b/drivers/clk/mmp/clk-of-mmp2.c index bcf60f43aa13..eaad36ee323d 100644 --- a/drivers/clk/mmp/clk-of-mmp2.c +++ b/drivers/clk/mmp/clk-of-mmp2.c @@ -78,6 +78,8 @@ #define MPMU_PLL_DIFF_CTRL 0x68 #define MPMU_PLL2_CTRL1 0x414 +#define NR_CLKS 200 + enum mmp2_clk_model { CLK_MODEL_MMP2, CLK_MODEL_MMP3, @@ -543,7 +545,7 @@ static void __init mmp2_clk_init(struct device_node *np) mmp2_pm_domain_init(np, pxa_unit); - mmp_clk_init(np, &pxa_unit->unit, MMP2_NR_CLKS); + mmp_clk_init(np, &pxa_unit->unit, NR_CLKS); mmp2_main_clk_init(pxa_unit); diff --git a/include/dt-bindings/clock/marvell,mmp2-audio.h b/include/dt-bindings/clock/marvell,mmp2-audio.h index 20664776f497..9653e04dedc3 100644 --- a/include/dt-bindings/clock/marvell,mmp2-audio.h +++ b/include/dt-bindings/clock/marvell,mmp2-audio.h @@ -6,5 +6,4 @@ #define MMP2_CLK_AUDIO_SSPA0 1 #define MMP2_CLK_AUDIO_SSPA1 2 -#define MMP2_CLK_AUDIO_NR_CLKS 3 #endif diff --git a/include/dt-bindings/clock/marvell,mmp2.h b/include/dt-bindings/clock/marvell,mmp2.h index f0819d66b230..88c2d716476f 100644 --- a/include/dt-bindings/clock/marvell,mmp2.h +++ b/include/dt-bindings/clock/marvell,mmp2.h @@ -91,5 +91,4 @@ #define MMP3_CLK_SDH4 126 #define MMP2_CLK_AUDIO 127 -#define MMP2_NR_CLKS 200 #endif From patchwork Sat Aug 12 10:02:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87?= X-Patchwork-Id: 134855 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1632657vqi; Sat, 12 Aug 2023 03:26:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFLvUhnZ1sdu+FzyiutxYES4JuDioPeuy5hYdLI6L02tAJ25RFcP5+ksEiDbzgxhUsOgTn+ X-Received: by 2002:a17:902:db06:b0:1bb:c87d:756d with SMTP id m6-20020a170902db0600b001bbc87d756dmr3652535plx.42.1691836009959; Sat, 12 Aug 2023 03:26:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691836009; cv=none; d=google.com; s=arc-20160816; b=uUFInMnzxUpwT0XU9mJ78lU9DeRcZcI9zjiffl+RkTWvNzyku4dvIoTt3uXDg2PB12 0b6aQIqxaeSk4+UIuuvYpste4xWLYT3at8iZUruWOhFik/HTQLHb7vCEChR8u6SvK/0S IX8XNfA48v/FXSv77aOLIcYD78WzvbdB/6lPBkPfiNvAQfnxjTefpNPf6zucE9in1Lk4 Dk1xz3lN7kRpqDM/MZ2UUqOwlUwuohjQ/JRlQu4T/u8IoNp7HgUbNR8IVLbikFaJIWHk 9IEBavHNum6DR+tqskHnP8QfKlciXGX6uwBJPwn72rBOYM0Lhi+i1aU9j/g9C1c26tP9 vlUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=+rg1a6lhFQLFo+sUG0x0AZa6jPPWmjTUpqAKQgvTO2U=; fh=vCXHINAHb4XurYdM9F4AVKoBQxk2x8lV9AjUfQ8bZlY=; b=vxTan1QBszG0uD/rXxZzegeKqyG5hgC0Tmc8XaAt9SND6nHm31mSmOQj8GYXsBcbMR mm+imvAIy5YAeU2NyWOJNpzZ0xKcevD9GML3CNaxzxcbwBRIKWFYo9hbBR2BcICP2uUz vXRkvpkNaPFi4Rp1j19mbOsDII6LBkfLZiFCtP4U/3bJGdCLfwwYAevOTTS1i8xUJqAs jSaenVaxL9ycyqC3bkSKNZwJGerjtei5qavOGOlrIY+c7q9fbYKAG4di9Q0Yfg2/vOrp zzDKX8UnU418uPqqQKQAXxG6EmsB/al6D/xbU9RstHB0FWjm1ysajma5rr3CQxtWH3lx eBMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u5-20020a170903124500b001b3be4fadbfsi4702805plh.159.2023.08.12.03.26.36; Sat, 12 Aug 2023 03:26:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236920AbjHLKEH (ORCPT + 99 others); Sat, 12 Aug 2023 06:04:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236477AbjHLKEA (ORCPT ); Sat, 12 Aug 2023 06:04:00 -0400 Received: from mx.skole.hr (mx2.hosting.skole.hr [161.53.165.186]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3782E2133; Sat, 12 Aug 2023 03:04:01 -0700 (PDT) Received: from mx2.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id 2872883E84; Sat, 12 Aug 2023 12:03:59 +0200 (CEST) From: =?utf-8?q?Duje_Mihanovi=C4=87?= Date: Sat, 12 Aug 2023 12:02:57 +0200 Subject: [PATCH v2 2/4] clk: pxa168: Move number of clocks to driver source MIME-Version: 1.0 Message-Id: <20230812-mmp-nr-clks-v2-2-f9271bd7eaa5@skole.hr> References: <20230812-mmp-nr-clks-v2-0-f9271bd7eaa5@skole.hr> In-Reply-To: <20230812-mmp-nr-clks-v2-0-f9271bd7eaa5@skole.hr> To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, =?utf-8?q?Duje_Mihanovi=C4=87?= X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1430; i=duje.mihanovic@skole.hr; h=from:subject:message-id; bh=An6utDAacc3cFI4LMImvW0yjAueMtmC2mjBjATMsvVg=; b=owEBbQKS/ZANAwAIAZoRnrBCLZbhAcsmYgBk11jVacXgBMCH8q35Ann7jSg4TfdyzeLHaY9hW aq5Nk9+YY+JAjMEAAEIAB0WIQRT351NnD/hEPs2LXiaEZ6wQi2W4QUCZNdY1QAKCRCaEZ6wQi2W 4W7CD/9tICbRAnT159blHcf0W3+F7HJR4nZQ2+CD2Zas6PoasMq4zkdWmJjScbBSDbDWA3wLehN Gf3LCIgtdad8CnUmziNhGXgets10EmMXL3piOofJa8PLr9BPZP41Fr7Q91/xUPO/PgK8foSpGRF DdSKvELZz31Y5x+frC0cwpBlmtXpbqLk6onC5ncPu00SpZmU3LZ/hV5bglUOPR6r+h8aw1vcqBX B2DEvTmjtJaAh6/Sr6Wu6qCLF3fDvf/kkOINLCCoB0RraC6ekFTjV5v87O51GATFpjPCyYs6GCp pfLUAO2NZKZom8PEYBNfOSbzEes/6E5x25ETMCFqB1JtwTIDfRE77AzEjKVtHMD02MXC6Cx1+2S 6LabpuBmrn/f2KBdzGem4tdIKvdxT2xvfFYpKkfSb6oCqk3BDGVKgQSBKnj8F/Kf3ak1EPZrAKo 3hQ4WzHxQ9sEaXJ7yutPVTV0r9fDVu1hTJnsgBC3n6h4H70KkXdMql96wWgXqJmAL2JH7izAYIr uM68CTOCoHaIk5GMXEwCZ1vkRQeHU5ATj6XesWF3Qa5o5MdhwGvvX4ge84yRxJ/5r6tWGsW+roa NZa7ZgdU6HNSsQGIE/rENTIE8x+bhTuCDZgVNsfI2e/gx3HvYZz4fmC1lb3S/4/Grk2E9Ap2hSA W0dToQ+tuGKi2Kw== X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=53DF9D4D9C3FE110FB362D789A119EB0422D96E1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774018635580715351 X-GMAIL-MSGID: 1774018635580715351 The number of clocks should not be in the dt binding as it is not used by the respective device tree and thus needlessly bloats the ABI. Move this number of clocks into the driver source. Signed-off-by: Duje Mihanović --- drivers/clk/mmp/clk-of-pxa168.c | 4 +++- include/dt-bindings/clock/marvell,pxa168.h | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/clk/mmp/clk-of-pxa168.c b/drivers/clk/mmp/clk-of-pxa168.c index 130d1a723879..fb0df64cf053 100644 --- a/drivers/clk/mmp/clk-of-pxa168.c +++ b/drivers/clk/mmp/clk-of-pxa168.c @@ -62,6 +62,8 @@ #define APMU_EPD 0x104 #define MPMU_UART_PLL 0x14 +#define NR_CLKS 200 + struct pxa168_clk_unit { struct mmp_clk_unit unit; void __iomem *mpmu_base; @@ -321,7 +323,7 @@ static void __init pxa168_clk_init(struct device_node *np) return; } - mmp_clk_init(np, &pxa_unit->unit, PXA168_NR_CLKS); + mmp_clk_init(np, &pxa_unit->unit, NR_CLKS); pxa168_pll_init(pxa_unit); diff --git a/include/dt-bindings/clock/marvell,pxa168.h b/include/dt-bindings/clock/marvell,pxa168.h index c92d969ae941..d1bb59187e1d 100644 --- a/include/dt-bindings/clock/marvell,pxa168.h +++ b/include/dt-bindings/clock/marvell,pxa168.h @@ -63,5 +63,4 @@ #define PXA168_CLK_SDH01_AXI 111 #define PXA168_CLK_SDH23_AXI 112 -#define PXA168_NR_CLKS 200 #endif From patchwork Sat Aug 12 10:02:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87?= X-Patchwork-Id: 134857 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1632676vqi; Sat, 12 Aug 2023 03:26:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFwQNfWVKbjMkDaY0pwh3MP2t2J0lloy8dye95iQU6KBRdZhh2VDds05QLMr57jaS7WwdUF X-Received: by 2002:a05:6870:c6a9:b0:1ba:dbad:e70 with SMTP id cv41-20020a056870c6a900b001badbad0e70mr5684955oab.21.1691836012914; Sat, 12 Aug 2023 03:26:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691836012; cv=none; d=google.com; s=arc-20160816; b=UqADwmy+PuolgbIJFo3r/Ol8M7+1I1d5pSi8sJeCp48OkiDspO53NrURqDtxwbiH96 kgrUGgrBaP+2e+hLpU/cyPcsLp7jmd43cDpjy6eyRyGgKK2e4VaQkOyO9jxbi5WBP1kF bEQn5ik4UbZ7sAPCQCk+1CpEnwRiWNwCMSxIZA5uSUAiabqHt+V50TKgN1aGb6C5nbRI pXG7F74lzqc7WObKURphm1vwwxr5xjXUVzruI9Ays3CcytJbS7PHDSRNyw77fONRqvLx t2aXplubFp0G2aMxtdPeAhiUwKANLk1lg8cEimPitivIrZRXbX6LOxXdtPVbJjIGkrpw /mSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=+dujg+Rhm09nNF8yXFI59E6kzqV4V8tpXubUC04dDIA=; fh=vCXHINAHb4XurYdM9F4AVKoBQxk2x8lV9AjUfQ8bZlY=; b=W0jtIg/5acNr9wTUEx88Yq1Xh9TZGJHV6fXzZXj7EQgwmcvwJ8/KM9mYKC9/MG9k3f fbWtVWAAZTk25f9JrNnOBHsE0TWzdMfF/NB4YG0Af6eb4LlmYle5IcWrtFBA70orzeyJ v1L0ssvS1Ya4Ho7MuPdtvnQvmN965e8a9OYwI1Va8b5iJsohdbIwy4R4jwsx1+Tq0dCC e+JnHegqfXVkWK/X4a6n/j3AmDv9AbdEJfvAo4gxgNEUXJR4Q6gGtqW0Yg+S8j5wQGCe Xl7VzgNhmX5p0CS+S71VsuMJ208tTpexeJdpibAwwH0yfnjR5Fdjk6CVdaGvBZgrrN89 sGzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hk2-20020a17090b224200b0026810b074afsi7234315pjb.3.2023.08.12.03.26.40; Sat, 12 Aug 2023 03:26:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236859AbjHLKEB (ORCPT + 99 others); Sat, 12 Aug 2023 06:04:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229499AbjHLKEA (ORCPT ); Sat, 12 Aug 2023 06:04:00 -0400 Received: from mx.skole.hr (mx1.hosting.skole.hr [161.53.165.185]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53B20270C; Sat, 12 Aug 2023 03:04:01 -0700 (PDT) Received: from mx1.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id A6FF882AB0; Sat, 12 Aug 2023 12:03:59 +0200 (CEST) From: =?utf-8?q?Duje_Mihanovi=C4=87?= Date: Sat, 12 Aug 2023 12:02:58 +0200 Subject: [PATCH v2 3/4] clk: pxa1928: Move number of clocks to driver source MIME-Version: 1.0 Message-Id: <20230812-mmp-nr-clks-v2-3-f9271bd7eaa5@skole.hr> References: <20230812-mmp-nr-clks-v2-0-f9271bd7eaa5@skole.hr> In-Reply-To: <20230812-mmp-nr-clks-v2-0-f9271bd7eaa5@skole.hr> To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, =?utf-8?q?Duje_Mihanovi=C4=87?= X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1992; i=duje.mihanovic@skole.hr; h=from:subject:message-id; bh=vj5z83mXAuP8rLNNCZ7zCFdduTpLvT0Y/0PeXHVxG9c=; b=owEBbQKS/ZANAwAIAZoRnrBCLZbhAcsmYgBk11jV9whohEZlGCSdDYIjemFxugN5NczZpN1ZA CKnMNJC34KJAjMEAAEIAB0WIQRT351NnD/hEPs2LXiaEZ6wQi2W4QUCZNdY1QAKCRCaEZ6wQi2W 4ZRUEACE6nVHtpRqZdkY4HQcfyRo2UT+c4yTTQMzMedutz8+YAfRsMc9fkbiFs4V31oAi4VoFye RAmXBCWrbvBQ6SJo28/y8fweKU7V11YynE/vCZpVtfgx6dT0p62mFeIl2xOpRkdHYbnknQbGdg/ S8dn8HuGsiy+7sIGKeVZ2FoIJh42jYEfIUtj0V2EVSGrKX7laiV7UCbCFqsRU/7DiXP2rjUY/gC hvIyMosuxXBMyqqPqw4sDXMTXTG/ov4A0fMiBSiSJ+qz+gyS6gHkSNs3tudwsldUDiVDfI+5daS qxPUsdkMbnBY4TZX1p0oq3NocMXR6gFhTsflKozEpyCxwW30vShp0Y5/v0OsrMTGWwYNAF47SD6 FkCCxQBDiTSwjftVK/uvguZYkbhUQAqJ9FmO2NpcCLfjwVW7ezbQ3FylrVjKE1Fsmf8+78edFZO 7xe0rj1a3ebEr4+ePdgf38G9TbmPYXz2UKHthHqwhs3QFWZhMzOA+7e+IP7VBQSXaAALQZ+qWbd XnHTHREncrr1upIl2xlEuu0hanK/3hEMcJvy8Eadb/lgMXsBB+oI2CXQQc+fCOWkUliHdnFqiq9 fFGj+Ll1KWfoM9arXOHRnkMB5u5jnERIHlaE87RsvpoTHn3O+JNf/Q/S1YipnRIFb/sH+dyJnzH kSv/wNNUrNf35fw== X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=53DF9D4D9C3FE110FB362D789A119EB0422D96E1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774018639032291402 X-GMAIL-MSGID: 1774018639032291402 The number of clocks should not be in the dt binding as it is not used by the respective device tree and thus needlessly bloats the ABI. Move this number of clocks into the driver source. Signed-off-by: Duje Mihanović --- drivers/clk/mmp/clk-of-pxa1928.c | 7 +++++-- include/dt-bindings/clock/marvell,pxa1928.h | 3 --- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/clk/mmp/clk-of-pxa1928.c b/drivers/clk/mmp/clk-of-pxa1928.c index 2508a0d795f8..9def4b5f10e9 100644 --- a/drivers/clk/mmp/clk-of-pxa1928.c +++ b/drivers/clk/mmp/clk-of-pxa1928.c @@ -22,6 +22,9 @@ #define MPMU_UART_PLL 0x14 +#define APBC_NR_CLKS 48 +#define APMU_NR_CLKS 96 + struct pxa1928_clk_unit { struct mmp_clk_unit unit; void __iomem *mpmu_base; @@ -235,7 +238,7 @@ static void __init pxa1928_apmu_clk_init(struct device_node *np) return; } - mmp_clk_init(np, &pxa_unit->unit, PXA1928_APMU_NR_CLKS); + mmp_clk_init(np, &pxa_unit->unit, APMU_NR_CLKS); pxa1928_axi_periph_clk_init(pxa_unit); } @@ -256,7 +259,7 @@ static void __init pxa1928_apbc_clk_init(struct device_node *np) return; } - mmp_clk_init(np, &pxa_unit->unit, PXA1928_APBC_NR_CLKS); + mmp_clk_init(np, &pxa_unit->unit, APBC_NR_CLKS); pxa1928_apb_periph_clk_init(pxa_unit); pxa1928_clk_reset_init(np, pxa_unit); diff --git a/include/dt-bindings/clock/marvell,pxa1928.h b/include/dt-bindings/clock/marvell,pxa1928.h index 5dca4820297f..0c708d3d3314 100644 --- a/include/dt-bindings/clock/marvell,pxa1928.h +++ b/include/dt-bindings/clock/marvell,pxa1928.h @@ -36,7 +36,6 @@ #define PXA1928_CLK_THSENS_CPU 0x26 #define PXA1928_CLK_THSENS_VPU 0x27 #define PXA1928_CLK_THSENS_GC 0x28 -#define PXA1928_APBC_NR_CLKS 0x30 /* axi peripherals */ @@ -53,6 +52,4 @@ #define PXA1928_CLK_GC3D 0x5d #define PXA1928_CLK_GC2D 0x5f -#define PXA1928_APMU_NR_CLKS 0x60 - #endif From patchwork Sat Aug 12 10:02:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Duje_Mihanovi=C4=87?= X-Patchwork-Id: 134860 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1632813vqi; Sat, 12 Aug 2023 03:27:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE5OBzkVIG/I4VCFJw+5vj10rN8GzTRfDz9aFJ8ZInbLPG0eoQFdooyItcULE1WutvFwH9p X-Received: by 2002:a17:902:ab45:b0:1bb:a522:909a with SMTP id ij5-20020a170902ab4500b001bba522909amr5331024plb.37.1691836035628; Sat, 12 Aug 2023 03:27:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691836035; cv=none; d=google.com; s=arc-20160816; b=Z55qoRkE2ZpUndwfCUupNT46m0vG+0SCY7WxYh5pZPDeAssbNWZPPxznR3Ds5HGSY2 Hr0eK1hqiZoLNxNpLDsWoWbLNhbGqAfltZESzQqDIPO8gijEeVy+6bUFtqSAdrD4Ymfv 2Td5o9RH9Ipw/AhhKXQnkhjL+uORlkImZDksPnyiRr5vXm1oPZXputDpIIio1ujS4yiX +1FH5H7gxdXoxZ9zPLy8wDWG/SpL2ULlqkpu62/vCHMuK/lDyqKF+kkX1N50yRc91u9H 771XqzL3XpIDFpszpSMTQAtwGBQtX2Xc3AbFIb9Req+8/A2mDzoI+gNhC7YhOxS+0meL qZhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=WNoRkhcZtU9kWko5O2XNH9M0HFB9qxXXcWskS3Dx60M=; fh=vCXHINAHb4XurYdM9F4AVKoBQxk2x8lV9AjUfQ8bZlY=; b=Jr9NAbDtoYWSEM8j2V5b/MyO4Q4+sIeQVLzD24RcBHspc5qhb2rjADDWXxzQJPENzi rsRiJMu6Ds6epJQP3AzqqC4rIisfUrBSXPydhPlN+AfgeZVVmBXCvV87RaZPMOC5dLzT 4duP0yeFLzuLjsCssShJitrtCw7KZQPDXMlCUHX/+NdlAAsgktApvtckUkbsygWa2T5r yTcAYmqfhQuPGwE/ZYq3J6euntG8rUyAM4ozmqc3rtQa5ClMCw/avPFgOYZXaTYMAFy3 kHLyo8tDzkXllSenfg2PepuSnSkgKZs5p3J5C0oHeK1oIxUIL1XI5R8L/BrDa9d2XgW7 lxRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p1-20020a170902e74100b001bbad3b063bsi4829545plf.345.2023.08.12.03.27.02; Sat, 12 Aug 2023 03:27:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236899AbjHLKEE (ORCPT + 99 others); Sat, 12 Aug 2023 06:04:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236696AbjHLKEA (ORCPT ); Sat, 12 Aug 2023 06:04:00 -0400 Received: from mx.skole.hr (mx2.hosting.skole.hr [161.53.165.186]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 890BA270F; Sat, 12 Aug 2023 03:04:01 -0700 (PDT) Received: from mx2.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id E5D09840B7; Sat, 12 Aug 2023 12:03:59 +0200 (CEST) From: =?utf-8?q?Duje_Mihanovi=C4=87?= Date: Sat, 12 Aug 2023 12:02:59 +0200 Subject: [PATCH v2 4/4] clk: pxa910: Move number of clocks to driver source MIME-Version: 1.0 Message-Id: <20230812-mmp-nr-clks-v2-4-f9271bd7eaa5@skole.hr> References: <20230812-mmp-nr-clks-v2-0-f9271bd7eaa5@skole.hr> In-Reply-To: <20230812-mmp-nr-clks-v2-0-f9271bd7eaa5@skole.hr> To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, =?utf-8?q?Duje_Mihanovi=C4=87?= X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1446; i=duje.mihanovic@skole.hr; h=from:subject:message-id; bh=bly1aASdWUJrlcyrZt3WskO9eN5tVF6cUHmmrzJg8UU=; b=owEBbQKS/ZANAwAIAZoRnrBCLZbhAcsmYgBk11jWEzZpwoDieY1YVAjCCH1x1xQXehidFWpgq 9H8atPlLVyJAjMEAAEIAB0WIQRT351NnD/hEPs2LXiaEZ6wQi2W4QUCZNdY1gAKCRCaEZ6wQi2W 4aU3EACpydUl/5i56ATj+xlOLPRCc36f2rPxfP21b+/QyAbvWaxA/rXvGLfxK228tosn19KyJJ+ JGWWdoqUaNJiqGuS3kWtpRSPPgf4xyIPEanXIC88bzPMqWzhhlIlFM4srEnWS6VzF9jW0Oqgtdo 2mpzowTqJhfMqQ5wRLhLjSPZOE758itKWnqrQablk9Tu6P/aMsm1woeQIcLAQuEnJJ2G/SyS9ZQ OVrfONAOgYclLrJmt3j3QoyijRB7nTYVebVhuojA5lwe6JPKMhnE9XmUmm3a8WqNiQs2POuCwKA j/XXkgROsNeUr9nxusVyYysq9hujHyZkxDNxh03hqRhz/98oaJ6d+pie4AaOzuG+9hnWX8WSRg6 m3dftv/PkQBYMbRQpK0fRsuF5EJKJafCrrj9LkgxLfP1urwvy8Oq8PLdUH75OLB8yVUq0LOlW4Q i63OBSLMbUHTNSeH9jEJHtUaws4nSpzoJFSyxlCZXd5stfib4MGrzapCeVej5meczyTl/4M3h+a YCLWdl3a06UQdALASKps8obG1JJB2wGYLpTZ7zFK9Ua2Z2Yp7HaLXjU8ZxJuizulrliFypptz5H 8YSPrUcq997X0VIJsWBk4Q8Pm2D6lTHzv+KUSpXe7ishnDAf/slnHyfMIiV/iNWtXB3nH7GNFR8 Y7/C71m4wMYMCkQ== X-Developer-Key: i=duje.mihanovic@skole.hr; a=openpgp; fpr=53DF9D4D9C3FE110FB362D789A119EB0422D96E1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774018662899385446 X-GMAIL-MSGID: 1774018662899385446 The number of clocks should not be in the dt binding as it is not used by the respective device tree and thus needlessly bloats the ABI. Move this number of clocks into the driver source. Signed-off-by: Duje Mihanović --- drivers/clk/mmp/clk-of-pxa910.c | 4 +++- include/dt-bindings/clock/marvell,pxa910.h | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/clk/mmp/clk-of-pxa910.c b/drivers/clk/mmp/clk-of-pxa910.c index 4d15bac987eb..7a38c424782e 100644 --- a/drivers/clk/mmp/clk-of-pxa910.c +++ b/drivers/clk/mmp/clk-of-pxa910.c @@ -44,6 +44,8 @@ #define APMU_DFC 0x60 #define MPMU_UART_PLL 0x14 +#define NR_CLKS 200 + struct pxa910_clk_unit { struct mmp_clk_unit unit; void __iomem *mpmu_base; @@ -296,7 +298,7 @@ static void __init pxa910_clk_init(struct device_node *np) goto unmap_apbc_region; } - mmp_clk_init(np, &pxa_unit->unit, PXA910_NR_CLKS); + mmp_clk_init(np, &pxa_unit->unit, NR_CLKS); pxa910_pll_init(pxa_unit); diff --git a/include/dt-bindings/clock/marvell,pxa910.h b/include/dt-bindings/clock/marvell,pxa910.h index c9018ab354d0..6caa231de0c1 100644 --- a/include/dt-bindings/clock/marvell,pxa910.h +++ b/include/dt-bindings/clock/marvell,pxa910.h @@ -55,5 +55,4 @@ #define PXA910_CLK_CCIC0_PHY 108 #define PXA910_CLK_CCIC0_SPHY 109 -#define PXA910_NR_CLKS 200 #endif