From patchwork Fri Jul 2 22:51:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 12356767 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56633C07E96 for ; Fri, 2 Jul 2021 22:54:34 +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 0DF85613C8 for ; Fri, 2 Jul 2021 22:54:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0DF85613C8 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gIJ6aT6Xz+3aHZVI5uXchPeRnaGSkQ0OXS4vXNX6xrI=; b=TYnKluIe9F17fO Unf4+OiLTVQhzkruO8dPi8vfsUWXCF8lZ3DzIKwoxgY8nFxpa7ma3poA8kN8cV48iQDcfkW/0UCSs rIY/H14C/4HQEtzru4ZjXaLmSH8OlimXKCeffnEsLtmiVNmDMFwxpFfHAz4SI+u/TNzHH8Yy7TlPw h5H1SDpqqlq2PdJolNnv+bifMS/hEKiB0/GfPre8WnfPsMriJ6NNYlceJ13LhVLkov15CxN3m07Er UUyeAnrdn5D8D/C5lDXvTclFYaC3fXjb2RBGTJ1tIATUxYwTkYTS4TEzjP5GLKlJAAxUz7Qx28L80 oKH6qHqgVsMekL9pA0NA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lzS1T-004C5U-S7; Fri, 02 Jul 2021 22:52:36 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lzS0w-004BzW-Lg; Fri, 02 Jul 2021 22:52:04 +0000 Received: by mail-ej1-x633.google.com with SMTP id gn32so18684412ejc.2; Fri, 02 Jul 2021 15:52:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mzYXAwF64f/gxWVFvm1N2KLW8QBmOTpV3947N44jc8k=; b=CTn+N6FlnVuDYOdettXBeZiSaNynHJ17hYZHXx3sAgms7Lb5hfK7zuvSjEMiH2Ebn2 0DJJQqpoH2AEzPIvkIIXgd3Rn1Dxxk2W0rlW7LaQoXA/rz4KTvh+pLWu20RRzl6g0Zov Nko+cf1eCkXWv5X6CMLloxIzofX5B7Vzjy1npTMTQL/F5VQVZW09oBNCK2tFhryQykeW wMMgBvU7Tdg5krmOsn+33yZAmDGR70B9zFnFXF52QWtHz0fCJoX5e+1nzqDzsF07z7dm Q0uc8U5YR4LhLxzeCoaK8TxxTjKU3bKj7bSSPh/76riXlEyVKqAyPKPWRXjfTGgBBqYS KPaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mzYXAwF64f/gxWVFvm1N2KLW8QBmOTpV3947N44jc8k=; b=TNAHkt36daiGc+AT/h+Qy8DauqbjNT7OkXrPa0WwA0rZPdJWO5zV5cuXTCciLmMXHV d9QtJvqHR1jHG//qJcJQFiM+TueoFXg7ny+XtMfR6HIfm1ZfzUOCsL8ARKWljjf9jXMw LjA30WSfVzrH590pzOe/HGwFcHsfueP2/7TRMxeuCA/nlehUdzyOwKiIjdX5NN8l5ZrH z7N4b9g4eX1Ucnn68qwkhwnaHq8nulFjT1W/JMw25TmDnmpLT3BX+p8xnCmAdrVdSv7E /pMg968MCN6Ek8ugnqEYHVLvpE6Q7BhVYDFvzk06hHzvWJQOwFQQ8mTnnwwnZ4lBtY/q AvMw== X-Gm-Message-State: AOAM531Fe6RwRr3tHJ7x+a7KF2/Rj4mNDRI0wLPNdl6NgDXoT7PQtKej xYYyY9ogDnk1ObGo9te2wqY= X-Google-Smtp-Source: ABdhPJwk/IGv7QwyMAJhvJkCoFiMgOpxbkig7bE7F5RSHG2SeyHQsaLmNT8gNJw08Pk5Gn+zfd0bzg== X-Received: by 2002:a17:907:3f8b:: with SMTP id hr11mr1983938ejc.381.1625266321267; Fri, 02 Jul 2021 15:52:01 -0700 (PDT) Received: from localhost.localdomain (dynamic-095-117-063-046.95.117.pool.telefonica.de. [95.117.63.46]) by smtp.googlemail.com with ESMTPSA id r17sm1866964edt.33.2021.07.02.15.52.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jul 2021 15:52:01 -0700 (PDT) From: Martin Blumenstingl To: linux-clk@vger.kernel.org, sboyd@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Blumenstingl , Marek Szyprowski , Nicolas Saenz Julienne , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org Subject: [PATCH v1 3/6] clk: bcm2835: Switch to clk_divider.determine_rate Date: Sat, 3 Jul 2021 00:51:42 +0200 Message-Id: <20210702225145.2643303-4-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210702225145.2643303-1-martin.blumenstingl@googlemail.com> References: <20210702225145.2643303-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210702_155202_783893_D203769F X-CRM114-Status: GOOD ( 13.70 ) 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 .determine_rate is meant to replace .round_rate in CCF in the future. Switch over to .determine_rate now that clk_divider_ops has gained support for that. Cc: Marek Szyprowski Cc: Nicolas Saenz Julienne Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-rpi-kernel@lists.infradead.org Signed-off-by: Martin Blumenstingl Tested-by: Marek Szyprowski --- drivers/clk/bcm/clk-bcm2835.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c index 1ac803e14fa3..a254512965eb 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c @@ -805,11 +805,10 @@ static int bcm2835_pll_divider_is_on(struct clk_hw *hw) return !(cprman_read(cprman, data->a2w_reg) & A2W_PLL_CHANNEL_DISABLE); } -static long bcm2835_pll_divider_round_rate(struct clk_hw *hw, - unsigned long rate, - unsigned long *parent_rate) +static int bcm2835_pll_divider_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { - return clk_divider_ops.round_rate(hw, rate, parent_rate); + return clk_divider_ops.determine_rate(hw, req); } static unsigned long bcm2835_pll_divider_get_rate(struct clk_hw *hw, @@ -901,7 +900,7 @@ static const struct clk_ops bcm2835_pll_divider_clk_ops = { .unprepare = bcm2835_pll_divider_off, .recalc_rate = bcm2835_pll_divider_get_rate, .set_rate = bcm2835_pll_divider_set_rate, - .round_rate = bcm2835_pll_divider_round_rate, + .determine_rate = bcm2835_pll_divider_determine_rate, .debug_init = bcm2835_pll_divider_debug_init, };