From patchwork Tue Aug 8 08:27:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13345837 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1BB31C001B0 for ; Tue, 8 Aug 2023 08:28:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2qJRoSREF5vX6sjMYLtN9kcDpxgPfsU16pfFMdzq4I4=; b=tYbqyYrdHe3Bf7 5xzN8FrZKAqeYpRuHtrGr9jgfN5x7Xj5D4sQNZ+e+Q1b+R6M+iCwu7G9P+3CfVcTXgX2kclwBXUnP Sd9cRo11wMua2S7SpcTqtrJzHRvOn+DfDiSaxLoGXMH/09Z5idTmAv9J6MqlXKMN34yappjueyb+d TMO+l0v4pPAnh09BKTTcxBqoKa+NeNXD3jYIV4wAQayx65GQvo1brNsLP7e2lHO8GLqKXCZUmee4z 1RAeV0XXGrNjb0R5M96ftUyhUEDa3X2lh70o2LsZmLM2aRN3k7cmXTxXEXZeTzVYSfElB8LDfqCQJ /t7eP7iDa1QshaXeyBqA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTI4T-0020up-1l; Tue, 08 Aug 2023 08:28:05 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTI4L-0020pQ-0Z for linux-arm-kernel@lists.infradead.org; Tue, 08 Aug 2023 08:27:58 +0000 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4fe2d152f62so8883459e87.0 for ; Tue, 08 Aug 2023 01:27:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691483274; x=1692088074; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=R/ysiPNWLR7wpbVD7YtHSC9xvbZhsi6ZL4lXHxj1M6c=; b=hTqTZIgBWsO4P2g6XegBl9D/MMInb/iWAPewdy8XITjm33wiG7IEyERQvpaHQZTwBZ z1JpqIyCpiKPEp2+MKwpO98FShWJVZ7+HLT+sM4PfpWpjth1cgWzy4iMb6KIc7CUyCxh waFZUlXh/HOHAS4rPn94NGcnpaxhyhaHmc7K+xzX54cbGjVns+dh7p5CGZksURIq/5Pf J/djVNsUl/SBicRjkzDTh00K1yq8/2NE4y6n6jSaMXLElBCwSdaZxznLy9Uqb4FEkxRs wD6hdaolacc66VBcmcbWsl0p3jAGuBd6uS518vqao1ullr4AoT7+ojrt1mKv3Mh12o2X hzIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691483274; x=1692088074; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R/ysiPNWLR7wpbVD7YtHSC9xvbZhsi6ZL4lXHxj1M6c=; b=K/S+Jrp8ewmOzQvIWxXYxjsKLcnFUvfnOsiUA4yC8UMa3COonZu2f2awXmGHH8tZ9E 1Ot+8q6aA1HRRufGNZZhLf8ELZZTzPY022ZwaiZZFFBdpw0J8CdMJ5yFeukaaXckAmH5 dTMrBlmpyp+n66X6xW0K4InwTp0x+P6PMnQEURZY5OasIu6gNQqxLCju5yw8hGSNEgh4 hUENIHAg+P3HIcdVq9zAGuLr+BZgPYi7fE1BTFwlOOugQ8H1WFKwVKEObo4NqhAXBcbN QBQNs5oN91EYFGoWXRkLnjxD4lXdk1Y3gnREBDc1ezg2qtqVVi71Y213kL5qUn3YIx+M aN+w== X-Gm-Message-State: AOJu0YwqTwNnSZ434c4koWIGMRRKbWKoC05d9h+PWwQhKJzzr5Ew9YbG /eob/YP+/aofgMMaLu+wjLvY4Q== X-Google-Smtp-Source: AGHT+IFQ1+reGKbu7+VQxeellkzInKFEL4NfkTVROJIeIltY/tZlYlFyqdoEIWGGNtTNFwjonuVnVw== X-Received: by 2002:a05:6512:2347:b0:4f9:5580:1894 with SMTP id p7-20020a056512234700b004f955801894mr8212298lfu.15.1691483274184; Tue, 08 Aug 2023 01:27:54 -0700 (PDT) Received: from krzk-bin.. ([178.197.222.113]) by smtp.gmail.com with ESMTPSA id s18-20020adfeb12000000b0031779a6b451sm12861246wrn.83.2023.08.08.01.27.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 01:27:53 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , Sylwester Nawrocki , Tomasz Figa , Chanwoo Choi , Alim Akhtar , Michael Turquette , Stephen Boyd , Rob Herring , Conor Dooley , linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 06/11] clk: samsung: exynos5420: do not define number of clocks in bindings Date: Tue, 8 Aug 2023 10:27:33 +0200 Message-Id: <20230808082738.122804-7-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230808082738.122804-1-krzysztof.kozlowski@linaro.org> References: <20230808082738.122804-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230808_012757_223588_8FBB31BD X-CRM114-Status: GOOD ( 16.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Number of clocks supported by Linux drivers might vary - sometimes we add new clocks, not exposed previously. Therefore this number of clocks should not be in the bindings, because otherwise we should not change it. Define number of clocks per each clock controller inside the driver directly. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar --- drivers/clk/samsung/clk-exynos5420.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c index 1e0cbf762408..199843f12ae5 100644 --- a/drivers/clk/samsung/clk-exynos5420.c +++ b/drivers/clk/samsung/clk-exynos5420.c @@ -139,6 +139,9 @@ #define SRC_KFC 0x28200 #define DIV_KFC0 0x28500 +/* NOTE: Must be equal to the last clock ID increased by one */ +#define CLKS_NR (CLK_DOUT_PCLK_DREX1 + 1) + /* Exynos5x SoC type */ enum exynos5x_soc { EXYNOS5420, @@ -1587,7 +1590,7 @@ static void __init exynos5x_clk_init(struct device_node *np, exynos5x_soc = soc; - ctx = samsung_clk_init(NULL, reg_base, CLK_NR_CLKS); + ctx = samsung_clk_init(NULL, reg_base, CLKS_NR); hws = ctx->clk_data.hws; samsung_clk_of_register_fixed_ext(ctx, exynos5x_fixed_rate_ext_clks,