From patchwork Wed Aug 1 14:00:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10552365 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B0B5415E9 for ; Wed, 1 Aug 2018 14:01:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9BB302B66F for ; Wed, 1 Aug 2018 14:01:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9978C2B6A6; Wed, 1 Aug 2018 14:01:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 38AEA2B6F3 for ; Wed, 1 Aug 2018 14:01:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From: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=wjmkLJWN8qGvyBk3vMnBZU4IDZ3ynYAtkbMoVL8Y6nw=; b=X0E kFjXubPBNP0dZMBR4fyeXZRBlXuj1Ltqpcxa5waLyg+pySyNWavcKDfHSLREyaSIMX6iHbEBMAnaO YxNakJN0E/el7+gsiKA/H0q8YmrsLYjqssJrAvNDfbuJ/l8A89pejZGl724nx5uGb5r4DwmcZ5nyZ +MbU3ylUg2fcCp5+445IQOaWH0ICkppxdqH8bc79FzRlCQdUV2Yfm3ogLvttMXXfkbcdzb6v9LJbn U9eYMSvKJgYLuneKCu2gq7NHIh88FT+71F6UbKTl4Itge31SUXkULChc7JcQS7CZVYmY0nI2G0Lh3 ZBCRSbF+xYICFXxwt2sTuMYVQi9HCAA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fkrgk-0001ew-NK; Wed, 01 Aug 2018 14:01:18 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fkrgd-0001a9-1p for linux-amlogic@lists.infradead.org; Wed, 01 Aug 2018 14:01:17 +0000 Received: by mail-wm0-x241.google.com with SMTP id s12-v6so7150306wmc.0 for ; Wed, 01 Aug 2018 07:01:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=1lsCfr0edyBjI8ht68vB7dmpAPcMhqkE0gHFLeTnO2E=; b=LSA67vthX4SeWVm24dRTmxzTEz53TRcNXpbyG47LPXkaKUY15oIOOJ2GVnLubza6gL /2Uf92ONKZu3rkXtZ1IX+9T7dEkfk4pBX6na4kbCKT6Q75EdRMfvXLhbT2LG7g3UXfSs p/w3/IeMF1Z5M+pBidD21Hd3EdOANzNq0b+/e2+pWm82EZwmSGn4jNkgpQiNo6zDnzgP 85skuGyuMGTn1JeYIUGHDTaNkYbOBldkrciKEkXQxXy18aX5G84U3NZc5IKZVmpHYijk 4rSpS6DHqM25FZDJ2/olw9Q1raEQ6m46MVzkwqL838lI6zf1FBTVSeytKpgEBursH3hM DkMw== 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; bh=1lsCfr0edyBjI8ht68vB7dmpAPcMhqkE0gHFLeTnO2E=; b=gQfQ+i1pnK1d/zNfFVY5PCcfJg7duf/+YGWyduEWZ9fmC1LEH3fVa17rhUSxoJLKqA HihmIrTCSx8lMRPuFf+4EszoOvI7f0zHvJNErj5gp4V3Ae4AqLhaKt+oB6BKZO4qOIEU LdlRMlmzOkGUee+gWUTPWIAn54qR9AbBnFiEMfSx/qGCK8R9l96vkV7/AleurxHuEXkm 0BdujDvSW0p2Y6EvAT6NvkqP10K5cg6oUv/0qm3ch6xASagm7iI6gLj5h5/K6WxUQ526 HS2NOfmFEOPHPsBLwn7kmOKMxzAA7DV3RcwAJlnkVBs23cA0hsvH7ezccE0rvDgxMytq DLcQ== X-Gm-Message-State: AOUpUlE4P4UZNfVdPNWI2p/KK9ZZnz9f0By6axpTOvbSDEalU7+fqIU6 rhXNxjjsKfPh9OD35qaygYTibg== X-Google-Smtp-Source: AAOMgpfatLscTp2H244cvbtMfasiY6ZPJxOlUPS4U4ye8OFt5uat+GV0VoRf74vFfIzaYsEsgSqnxA== X-Received: by 2002:a1c:2d54:: with SMTP id t81-v6mr3063782wmt.31.1533132059560; Wed, 01 Aug 2018 07:00:59 -0700 (PDT) Received: from boomer.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id d42-v6sm2816309wma.0.2018.08.01.07.00.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Aug 2018 07:00:58 -0700 (PDT) From: Jerome Brunet To: Neil Armstrong Subject: [PATCH v2 0/4] clk: meson: clk-pll driver update Date: Wed, 1 Aug 2018 16:00:49 +0200 Message-Id: <20180801140053.25899-1-jbrunet@baylibre.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180801_070111_099820_DC191FED X-CRM114-Status: GOOD ( 11.23 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, Jerome Brunet MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patchset is yet another round of update to the amlogic pll driver. 1) Enable bit is added so we don't rely on the bootloader or the init value to enable to pll device. 2) Remove unnecessary CLK_GET_RATE_NOCACHE flags. 3) OD post dividers are removed from the pll driver. This simplify the driver and let us provide the clocks which exist between those dividers. Some device are actually using these clocks. 4) The rates hard coded in parameter tables are remove. Instead, we only rely on the parent rate and the parameters to calculate the output rate, which is a lot better. This series has been tested on the gxl libretech cc and axg s400. I did not test it on meson8b yet. Changes since v1: [0] - improve commit description of patch 1 - remove unnecessary CLK_GET_RATE_NOCACHE flags. - add missing CLK_SET_RATE_PARENT. [0]: https://lkml.kernel.org/r/20180717095617.12240-1-jbrunet@baylibre.com Jerome Brunet (4): clk: meson: clk-pll: add enable bit clk: meson: clk-pll: drop CLK_GET_RATE_NOCACHE where unnecessary clk: meson: clk-pll: remove od parameters clk: meson: clk-pll: drop hard-coded rates from pll tables drivers/clk/meson/axg.c | 326 +++++++++++++---------- drivers/clk/meson/axg.h | 8 +- drivers/clk/meson/clk-pll.c | 156 +++++++---- drivers/clk/meson/clkc.h | 16 +- drivers/clk/meson/gxbb.c | 518 ++++++++++++++++++------------------ drivers/clk/meson/gxbb.h | 10 +- drivers/clk/meson/meson8b.c | 173 ++++++------ drivers/clk/meson/meson8b.h | 5 +- 8 files changed, 665 insertions(+), 547 deletions(-) Reviewed-by: Martin Blumenstingl Tested-by: Martin Blumenstingl