From patchwork Fri Feb 16 22:32:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 202393 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp28499dyc; Fri, 16 Feb 2024 14:36:30 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWhs2dnl8TkTMBmlaGaSW6uRrWDG5zkpCNdgIQSQKRQSEDzOTJ/CDflb79lrr03GTg5oyz3SJfQLCPduBfm+UegHFcJwQ== X-Google-Smtp-Source: AGHT+IGjBJTMWLYB+/y8G/Wd3daCTtciwWYm684ZFmStUZQNvyP+qDLMIA/BrogIFEFeElgSAL45 X-Received: by 2002:a05:6358:7618:b0:176:3e0d:9910 with SMTP id r24-20020a056358761800b001763e0d9910mr7321699rwg.0.1708122990198; Fri, 16 Feb 2024 14:36:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708122990; cv=pass; d=google.com; s=arc-20160816; b=kGYqEIfzIMty9N+B+xJhv4Sc8hgjmUm4HG+TnydffI9CTKZogrD4UeEbBe1Q0Co/Ah eVJz1M4YPhTHLkmAs/gbkbYORFJy7dF65aVEKYOby3hLgUSBd8mVHW0vDOKFvPfNqV0Z WGJwuuVWiEl5KXx7bYheQ70kV4VaJIGUGWQAAUaIN1lrIVZggq1os/qZudzQ0C16ts72 HXfiMi01vYFOi9QuR9qu85LqmaqqZo7OHquH/Zg/0Yuli5ffLHlHNa6dVfj+jdIekPNZ oAqH2QFjUURzhfoBnfQ9mUpCRFX36Y1v9z1mXJcwzcms9FFwS5hwDNdtqBFmRzQF8tl2 SRpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=TdZ9WPH7Nl2aH1xgLChF6BzPk0ENAzSqqSLTSdJZTwM=; fh=bJhkeEDM28aHVYDhmYsbSCICVVEzG5IshVS8V+IhFms=; b=a1laNu1kQnRXVYsv2uCD61VPYNtbP7KmQgMbQsEew+6XYE5xM6i/43XzJOzl9eF+A5 2yUOWi5PKPbzrRG0Vamn13gglsX6fj2ylVlVO/V/770fqSZ0lyWeIzUsukz4CcZ+v/ap jy2c1qz3vOY6iTbOu/5tWfFM8ZThyr0HUzFkwxdOaSeI68QcOya8+aryWQqOXMPTym1P eJMbNUuB+XWPlkdT9O7WlAY6tvw7Ml7Zzy35cLP+fFL8oIj1tXEqXPIrhGvKvD7Gn77I jAhhkFzFRSHqrC6AaVZN1XZGxqzkrGSwWPHaxUqO25i7U9/WEo2UWWjD7Xhcl98FWMhw Y4Uw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DBMVlEig; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-69414-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69414-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id o20-20020a637314000000b005c279da45f1si508585pgc.566.2024.02.16.14.36.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 14:36:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69414-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DBMVlEig; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-69414-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69414-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B495B2836DD for ; Fri, 16 Feb 2024 22:36:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB215150992; Fri, 16 Feb 2024 22:33:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="DBMVlEig" Received: from mail-oo1-f51.google.com (mail-oo1-f51.google.com [209.85.161.51]) (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 BF9F114A091 for ; Fri, 16 Feb 2024 22:32:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708122776; cv=none; b=EdwQZFGVDxSmA70Zi+0085GR+UTKH/DjY4ERHnyFd9940p4e85fnoTn1ZalRcB3akM0Z89XD2TBDjvFXMQRdvLL5tUZxP+2nBqsC8127HyY+nb85g++94/1mNKsqiQc8MqfsHAYmWNEAZBJ62an7PZ+ALWlfEcQdX0vmwwBdVNo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708122776; c=relaxed/simple; bh=5ZoYtRQ2HjiqGEQZUVOcP2ADlsbfU9MvFiIZ1YzKk+I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LhJHBQ4Rg1ngJv9OtwUXZZ5LZ7sgjZN+E+VV4A3iLSkXyoj3D0RvhEi0SK6AxhO2+hSSfRCg8obOjUXPWgtoYSejA8bS1YEtywJamOHu/ATD0NHev5jXsdp34bACL4s8nzJ10UV1fPaEMSHbFYt3b+GCdy034nDw/qj2BNd1dxU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=DBMVlEig; arc=none smtp.client-ip=209.85.161.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oo1-f51.google.com with SMTP id 006d021491bc7-59d11e0b9e1so1260704eaf.1 for ; Fri, 16 Feb 2024 14:32:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708122772; x=1708727572; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TdZ9WPH7Nl2aH1xgLChF6BzPk0ENAzSqqSLTSdJZTwM=; b=DBMVlEigKGHihYH4vHTOqa2xGoY5LAu+v3b+3DT+OmFF4Tm7FOSURfukWf8t2pVFAq Te2su/ak4htE/Xt8W630Ymmg1WsXrpiXWx8YFkGsgWOCI3W+v7ka8RIWIG8l0zYZc/D3 6dasOe1n02caAX7Pkli3J3tVwmqq6sV29rBX64ItwYuvsu5rsa3naYF8lwOpQnk8TDTB CbOK20I2G9tHRnrt0a+5C36CYSm6J9aVB5NuGYbEFKartO9jv7zKMrw0paHUXxqFH8GS Y0D2AKiMbmBJvu/IwrbzMs3La5nYDH0A67czw+d1rYZui+JVTzudWQLBKmQ1UxQz/zoC S/yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708122772; x=1708727572; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TdZ9WPH7Nl2aH1xgLChF6BzPk0ENAzSqqSLTSdJZTwM=; b=k2ET8tTRQyLZmDv94UHNudn7JkW2ciVfaVWoD3uDUn0GkKAePHGbcmhPIzl1Wul/pO I/iqYrhbfr3A3yuPs7TRJ3ZAQdf97bU5YFZ3gKEVx5vfZsYuTB1Ud/L0JeBwVK6t+lF8 19h3Epoy4uVAiK8KhWZ2H24mJotCKkVPSy0Ln+Pzz1cDKZdsAEaXHb3yhKGO3MaT84sF ZI/WvsDjjXsYJurBOLLshOqVFQd53EJfRigmt9frnMpeImTX0hX4IL7Z1hIS9Vc2x0lN SYlIed98mmS7hS1Kb6g8rW6LUsw8+WE3ktrKZrTuHgL2pdZz+8FjHFIrl6r96xwyJXzx qXfQ== X-Forwarded-Encrypted: i=1; AJvYcCUtLgjuu6xhScfIS0snCNtD65F72SZM8TtIi7P+ro2YzOOWE7917n4z6Fihvqa5RIbVwAOyvSbEjyxUXtusJ2P5Cgb/wvK98o/GbnmX X-Gm-Message-State: AOJu0Yx1V+fkcKewcesWn+5gOSpDgb5RGmQH7hRAsjtlX9YCZVO3GQSq EKSo6uIG+JEXTc8YImaBXkAfmRYOpn8N7iR9hvJaGgLDkpvjcTWJVPaP92GJdtY= X-Received: by 2002:a05:6820:2b11:b0:59f:aa2e:ef8b with SMTP id dt17-20020a0568202b1100b0059faa2eef8bmr1528834oob.0.1708122772629; Fri, 16 Feb 2024 14:32:52 -0800 (PST) Received: from localhost ([136.62.192.75]) by smtp.gmail.com with ESMTPSA id x11-20020a4a9b8b000000b0059d24cfb5e3sm137045ooj.4.2024.02.16.14.32.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 14:32:52 -0800 (PST) From: Sam Protsenko To: Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi Cc: Alim Akhtar , Michael Turquette , Stephen Boyd , Rob Herring , Conor Dooley , Tomasz Figa , linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/16] clk: samsung: Use clk.h as a single header for Samsung CCF Date: Fri, 16 Feb 2024 16:32:37 -0600 Message-Id: <20240216223245.12273-9-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240216223245.12273-1-semen.protsenko@linaro.org> References: <20240216223245.12273-1-semen.protsenko@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791096772851511404 X-GMAIL-MSGID: 1791096772851511404 Make both CPU and PLL clock headers to be included indirectly via clk.h. All Samsung clock drivers already include clk.h, which provides API for Samsung CCF clocks like muxes, gates, etc. Both CPU and PLL Samsung clock are not that different. It makes sense to only use both clk-cpu.h and clk-pll.h internally for Samsung CCF framework, and make clk.h the facade for Samsung CCF. This way all clock drivers only have to include clk.h. No functional change. Signed-off-by: Sam Protsenko --- drivers/clk/samsung/clk-cpu.c | 1 - drivers/clk/samsung/clk-exynos3250.c | 2 -- drivers/clk/samsung/clk-exynos4.c | 1 - drivers/clk/samsung/clk-exynos5250.c | 1 - drivers/clk/samsung/clk-exynos5260.c | 1 - drivers/clk/samsung/clk-exynos5420.c | 1 - drivers/clk/samsung/clk-exynos5433.c | 2 -- drivers/clk/samsung/clk-pll.c | 2 +- drivers/clk/samsung/clk-s3c64xx.c | 1 - drivers/clk/samsung/clk-s5pv210.c | 1 - drivers/clk/samsung/clk.h | 1 + 11 files changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/clk/samsung/clk-cpu.c b/drivers/clk/samsung/clk-cpu.c index a59949990919..4c46416281a3 100644 --- a/drivers/clk/samsung/clk-cpu.c +++ b/drivers/clk/samsung/clk-cpu.c @@ -36,7 +36,6 @@ #include #include "clk.h" -#include "clk-cpu.h" struct exynos_cpuclk; diff --git a/drivers/clk/samsung/clk-exynos3250.c b/drivers/clk/samsung/clk-exynos3250.c index bf149fae04c3..d1b72a75bc5a 100644 --- a/drivers/clk/samsung/clk-exynos3250.c +++ b/drivers/clk/samsung/clk-exynos3250.c @@ -14,8 +14,6 @@ #include #include "clk.h" -#include "clk-cpu.h" -#include "clk-pll.h" #define SRC_LEFTBUS 0x4200 #define DIV_LEFTBUS 0x4500 diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c index d5b1e9f49d8b..3d57020a620f 100644 --- a/drivers/clk/samsung/clk-exynos4.c +++ b/drivers/clk/samsung/clk-exynos4.c @@ -16,7 +16,6 @@ #include #include "clk.h" -#include "clk-cpu.h" /* Exynos4 clock controller register offsets */ #define SRC_LEFTBUS 0x4200 diff --git a/drivers/clk/samsung/clk-exynos5250.c b/drivers/clk/samsung/clk-exynos5250.c index 58df80de52ef..4953da754994 100644 --- a/drivers/clk/samsung/clk-exynos5250.c +++ b/drivers/clk/samsung/clk-exynos5250.c @@ -14,7 +14,6 @@ #include #include "clk.h" -#include "clk-cpu.h" #include "clk-exynos5-subcmu.h" #define APLL_LOCK 0x0 diff --git a/drivers/clk/samsung/clk-exynos5260.c b/drivers/clk/samsung/clk-exynos5260.c index 16da6ef5ca0c..280330ded100 100644 --- a/drivers/clk/samsung/clk-exynos5260.c +++ b/drivers/clk/samsung/clk-exynos5260.c @@ -11,7 +11,6 @@ #include "clk-exynos5260.h" #include "clk.h" -#include "clk-pll.h" #include diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c index bd7b304d2c00..531ef1c3fa30 100644 --- a/drivers/clk/samsung/clk-exynos5420.c +++ b/drivers/clk/samsung/clk-exynos5420.c @@ -15,7 +15,6 @@ #include #include "clk.h" -#include "clk-cpu.h" #include "clk-exynos5-subcmu.h" #define APLL_LOCK 0x0 diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c index d3779eefb438..379744f0a5b6 100644 --- a/drivers/clk/samsung/clk-exynos5433.c +++ b/drivers/clk/samsung/clk-exynos5433.c @@ -17,9 +17,7 @@ #include #include "clk.h" -#include "clk-cpu.h" #include "clk-exynos-arm64.h" -#include "clk-pll.h" /* NOTE: Must be equal to the last clock ID increased by one */ #define CLKS_NR_TOP (CLK_SCLK_HDMI_SPDIF_DISP + 1) diff --git a/drivers/clk/samsung/clk-pll.c b/drivers/clk/samsung/clk-pll.c index 4bbdf5e91650..37aa7beb547a 100644 --- a/drivers/clk/samsung/clk-pll.c +++ b/drivers/clk/samsung/clk-pll.c @@ -14,8 +14,8 @@ #include #include #include + #include "clk.h" -#include "clk-pll.h" #define PLL_TIMEOUT_US 20000U #define PLL_TIMEOUT_LOOPS 1000000U diff --git a/drivers/clk/samsung/clk-s3c64xx.c b/drivers/clk/samsung/clk-s3c64xx.c index d27a1f73f077..8ee3ffdf2b8d 100644 --- a/drivers/clk/samsung/clk-s3c64xx.c +++ b/drivers/clk/samsung/clk-s3c64xx.c @@ -14,7 +14,6 @@ #include #include "clk.h" -#include "clk-pll.h" /* S3C64xx clock controller register offsets. */ #define APLL_LOCK 0x000 diff --git a/drivers/clk/samsung/clk-s5pv210.c b/drivers/clk/samsung/clk-s5pv210.c index cd85342e4ddb..29f2531fd5d3 100644 --- a/drivers/clk/samsung/clk-s5pv210.c +++ b/drivers/clk/samsung/clk-s5pv210.c @@ -13,7 +13,6 @@ #include #include "clk.h" -#include "clk-pll.h" #include diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h index 516b716407e5..8157479f45eb 100644 --- a/drivers/clk/samsung/clk.h +++ b/drivers/clk/samsung/clk.h @@ -11,6 +11,7 @@ #define __SAMSUNG_CLK_H #include +#include "clk-cpu.h" #include "clk-pll.h" /**