From patchwork Tue Aug 8 08:27:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13345833 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 72440C001B0 for ; Tue, 8 Aug 2023 08:28:22 +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=gB6O5GeKO8hbIQo9PvHk62+OL98vw9R9+pM38JRbHYg=; b=CrtE+DneMaQcET XRzGKOOrwz9KmttOpgLiV8mceiE8Lc0AYAPJlTBO0nZwICJUxlOq8htdL4QeYaaAd2WjH1TWHZSvA 1zPig2vXhOsCfWuppSb2MCpJP3EIxih4PYDcbJed1SqjLYTDZJ3BGTt2HfXa/Ex88mSTL0fHJmkXw 65VUU5qzrYgYLTCLBOwE/KvmBzRsiK6QVrPWCXSzZUln+K5qIfb6csCduGv0r0BKjBEvNlUq8SfcE bqjrGxop35OxMhrw3kY07N4CHtWx3+glG5gxQUiqaPFs/mDotvk94LHVHWSXNe8EguozNQgu39/5O jbYWBZYIuMo+sGlChz+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTI4K-0020qH-2s; Tue, 08 Aug 2023 08:27:56 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTI4G-0020ml-0i for linux-arm-kernel@lists.infradead.org; Tue, 08 Aug 2023 08:27:53 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3fbea14706eso45512195e9.2 for ; Tue, 08 Aug 2023 01:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691483268; x=1692088068; 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=pZH8BihJHBp/DZtT1lzAgFgSWlR+gykQRY/CxVLX/NQ=; b=ZX0A2HKTBB2C8c56d+04UTTla+1+fs/SaQq7KebUvRijzAZpBXFhEbyNmWT3mMOkBQ DqxZomutojYbdZNhTplSEh6kvLqTv3GU8H5AzqGMV51Mr9X0N+GreRMihQXcou9JhXcR eovziQg7X2g7SCCqvDg5rYWUC3AzFkvffeA+P8SjK5090OIcLj0o/ZtyYIRtcsChOdWn +sMbn8VKyOLIE7Hgj2oaENkzW9rLCh7jDpdwQRCPREVUwHkyUGaJyMQYyTGGWBXaOdt2 1Ol8XALBzT105kBGGaRBNLIVUHF3gKDzuO1s719etA7/xlqvLR1pUmkgW1PnNUsmXCxb s31Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691483268; x=1692088068; 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=pZH8BihJHBp/DZtT1lzAgFgSWlR+gykQRY/CxVLX/NQ=; b=jM8OCMBY6aH+qnKWhVuEM+hSCarYnizlXyET9fFb0MXVAO26PRgB2JvqsDLrvN7Hw6 UP12jAufsSFo4mehEvRCDOfpsUi+ScWoW7t4eYDftizoEdeDIOSzVS0ag0/4l+2tI/s/ li/b80RK//bH5ITktP3g0Bt+jK10WiJiZHCjEm+RsNgbKUvYNQaa2eYr+CJ6ZimwpqBQ BcXyNUZRMhqM8VuGhEDQ3WEotl/TxwE9IBTCBu9DHVMLANhiRK3QGYf2pN6SeuXkxE6Y dfsrwp8nSftW6hcpYbktnYHJM9355BJNxey1jirXrFXG1n5NGabszQIVk3bK6+ez5WUz a58Q== X-Gm-Message-State: AOJu0YzjZOh4XFxOru0CXRMBRyijjnJj0mfXkqubii/s0Mmt0VTamVlV McF/h21fBMquCXLGHpF8bT6QZg== X-Google-Smtp-Source: AGHT+IHxIGUFAD12lJphQeKsQdF3PxwsoN29JQ5BiG4xlGacb03xttiIY8EXVTEebeJ/xuBM044S4Q== X-Received: by 2002:adf:ce90:0:b0:314:3b02:a8a8 with SMTP id r16-20020adfce90000000b003143b02a8a8mr7447482wrn.55.1691483268603; Tue, 08 Aug 2023 01:27:48 -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.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Aug 2023 01:27:47 -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 03/11] clk: samsung: exynos5250: do not define number of clocks in bindings Date: Tue, 8 Aug 2023 10:27:30 +0200 Message-Id: <20230808082738.122804-4-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_012752_262311_11DA7CBA X-CRM114-Status: GOOD ( 16.01 ) 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-exynos5250.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/clk/samsung/clk-exynos5250.c b/drivers/clk/samsung/clk-exynos5250.c index 92fb09922f28..8ebe6155d8b7 100644 --- a/drivers/clk/samsung/clk-exynos5250.c +++ b/drivers/clk/samsung/clk-exynos5250.c @@ -100,6 +100,9 @@ #define PWR_CTRL2_CORE2_UP_RATIO (1 << 4) #define PWR_CTRL2_CORE1_UP_RATIO (1 << 0) +/* NOTE: Must be equal to the last clock ID increased by one */ +#define CLKS_NR (CLK_MOUT_VPLLSRC + 1) + /* list of PLLs to be registered */ enum exynos5250_plls { apll, mpll, cpll, epll, vpll, gpll, bpll, @@ -797,7 +800,7 @@ static void __init exynos5250_clk_init(struct device_node *np) panic("%s: unable to determine soc\n", __func__); } - 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, exynos5250_fixed_rate_ext_clks,