From patchwork Thu Oct 14 19:53:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William McVicker X-Patchwork-Id: 12559313 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1D6DC433FE for ; Thu, 14 Oct 2021 19:55:20 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B86BE610A0 for ; Thu, 14 Oct 2021 19:55:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B86BE610A0 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:Cc:To:From:Subject:Mime-Version: Message-Id:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=GwfA0PhJKq5j5Y/1nAYeZ7mmsc/swGlEDB5ej/PaYug=; b=S77 BpNtFxy5kjmUkuw+29fUBiz5VcMT0e5rQz/y1Z5m0voz2mb7t5I4xutOR1t8B8fqpBaE9gRZV/Xkd c4CfEn3EYrBxQxkWJcq9IeJ3T3NBkH3UjPb67gJuH/W/iOleaE6r1IF3jvYliQeN+EWluGwSMpRot MA9LIvbbVsV20Joz0P9VDlbzz9SFmBSpvgDR457ki1SrVtH/S97Hh2TLMYghMk8CnpGUPkrPb4+hu v0Y1yKI9DJGmi6IuGSR0bZMqLZimu2rD0XrGYz3x26/E89HQfS3UHkMjhDNSSrKaQScnLTGPT5dQr F8CLIEW59RowAec8om/PXYI6MWseJDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mb6nd-004Gq5-UH; Thu, 14 Oct 2021 19:53:58 +0000 Received: from mail-pf1-x449.google.com ([2607:f8b0:4864:20::449]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mb6na-004Gp7-DY for linux-arm-kernel@lists.infradead.org; Thu, 14 Oct 2021 19:53:56 +0000 Received: by mail-pf1-x449.google.com with SMTP id y41-20020a056a00182900b0044d43d31f20so4022463pfa.11 for ; Thu, 14 Oct 2021 12:53:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=R/A1A0PEacctbWxfoyinE4EXZjh0hs5rayBemyeKvhs=; b=Ccj60KB5+clN/g8yw8V0AvFPqpYtRevRPNAl88ECaouDXwhePm0EVHn3TvUZXBuikb NAKgCmTzauq5p0dQbKjSIBENAVJbSfMBQSV+lMb5tUj2fFi3+Aq2GeRXo9by7rMu/6f5 D7PpHFhD7x1sF4gdy/3JxjrmCmAM4yTrv29zz80JGrCedp6YfuqRmzzfqaSv/esEj9sr SLCJqftzhLudSp/QUTsOVfNuQ2FNHexSrmZ0TCNe8tG8xU7TaoiEKHZm0Jtr8DkueIT6 5shOlqnZ4vWy2erzNJHml8C/2dGDK29j9cxITM0usC7jpgFRtQGx0tChJVwri9MFfOxd /Ltg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=R/A1A0PEacctbWxfoyinE4EXZjh0hs5rayBemyeKvhs=; b=Ci9FKt3QZT9GtRhAi4/XQP9AuXMAx6k7AOohfpJuC8lrMKiX8H4/tm+Rb8bKIWsd25 05n56OM6uqZAN+B51skpgPcBj3r+U381TW419JxA3BiXQGkQKFicqEtUe2sr2YxCVjU6 Fp9c48Kdlucykq3EcB5kyJDFur58CumTfkF4bCvt50hWiTRZGHmtDnBe3cz1VcmwyI0E PfZpHPkn2l6mc/tSz2+8JFsSfePEXdhg5TnPUZXEFSF4d9Ek2uY+6ze7XISoh3Vhy7ka pPOX/qifXh6l29s8AZ9EivqjCr3KE8PMAorzbqE2xuNfJ1R+Zsu0RAoQv162GsABn6ZW vjNA== X-Gm-Message-State: AOAM532zkq3P9X7BK0LWOgmTJEOJQDBmzZ+ku6MAcRsSw7gz+vCeXnsy CGWgFMA0qGF9xfocfKbUyAk39vnwKD0DJ/g+nC4= X-Google-Smtp-Source: ABdhPJzJB0746aYvHaw0UyQpC8oiqKxrUMbT0zTR2WHYcybIVao09r4yq54iQiEOGomsy45bhkxA4UHH5Xjs/8E1XLU= X-Received: from willmcvicker.c.googlers.com ([fda3:e722:ac3:cc00:24:72f4:c0a8:2dd0]) (user=willmcvicker job=sendgmr) by 2002:a17:902:b70d:b0:13d:f6c9:2066 with SMTP id d13-20020a170902b70d00b0013df6c92066mr6942092pls.2.1634241232300; Thu, 14 Oct 2021 12:53:52 -0700 (PDT) Date: Thu, 14 Oct 2021 19:53:44 +0000 Message-Id: <20211014195347.3635601-1-willmcvicker@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.33.0.1079.g6e70778dc9-goog Subject: [RFT PATCH v4 0/2] clk: samsung: add common support for CPU clocks From: Will McVicker To: Sylwester Nawrocki , Tomasz Figa , Chanwoo Choi , Michael Turquette , Stephen Boyd , Krzysztof Kozlowski Cc: kernel-team@android.com, Marek Szyprowski , Will McVicker , linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211014_125354_481936_829E82D9 X-CRM114-Status: GOOD ( 12.81 ) 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 These two patches were originally a part of the series [1]. They add support to the common samsung clock driver to parse and register the CPU clocks when provided. This allows for the samsung clock drivers to simply provide a `struct samsung_cpu_clock` to `struct samsung_cmu_info` and then call samsung_cmu_register_one(). With this new support, we can now get rid of the custom apollo and atlas CLK_OF_DECLARE init functions. Since I don't have the hardware to test these, I'm including the RFT tag to try and get help testing and verifying these. [1] https://lore.kernel.org/all/20210928235635.1348330-4-willmcvicker@google.com/ Will McVicker (2): [RFT] clk: samsung: add support for CPU clocks [RFT] clk: samsung: exynos5433: update apollo and atlas clock probing --- Changes in v4: - Updated 'struct samsung_cpu_clock' to reference the parent and alt_parent hw clocks via ID instead of name - Dropped __clk_lookup() in favor of ctx->clk_data.hw instead Changes in v3: - Same as v1-v2 - Tested-by: Marek Szyprowski drivers/clk/samsung/clk-cpu.c | 18 ++++ drivers/clk/samsung/clk-exynos5433.c | 120 +++++++++++---------------- drivers/clk/samsung/clk.c | 2 + drivers/clk/samsung/clk.h | 26 ++++++ 4 files changed, 94 insertions(+), 72 deletions(-)