Received: by 2002:a25:9388:0:0:0:0:0 with SMTP id a8csp8991038ybm; Fri, 7 Jun 2019 03:00:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyRNc02ERlLqALJPs5NdsN0xlcTMLImmpZ3/6hfeb3ZK2/czeUi20rfsoxT8KpL2LSXEB9c X-Received: by 2002:aa7:8145:: with SMTP id d5mr58638902pfn.11.1559901630863; Fri, 07 Jun 2019 03:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559901630; cv=none; d=google.com; s=arc-20160816; b=mvYZSGiIvH8pkGZyOFaPhnAYkPMA2F+zbtEY80MzJdn07nrOOlvBUkvdXw8sqQed0u 4Ap1oF57ufefgnlDoyQPzrfqANnMrV5XUUmogWn8wYhzL/Qrv+Btw1hTu+WNqnUhpJu2 z9t99JFSEmXkMcZf81PNJFBo5OgczGz5PeVoay8Kc4m0foUQNCLM8Y1DiwT9ls57io7r RgwauGRAP51b8q8VxjzO0pf6p9PFjvhcpIaBZtglUFMfxILCPy9piXKSa9IFh0Zpkg62 4sXij7jXucfQrEuNC1A8fKwK1ClxcCiPKptPlXrJQ3fwYbBtMtZClseAHLjhVWFj4IW4 fwpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=b7tgPnhsfu6ei2TpT+iOtZpveaTFh+ecUNDuZSeel3E=; b=ZTtPk1FJBCbkts7RrM2Yobr98O8k4YgYbeq+cH3C9RK89BpYv0VquTKbqmZUwyvNgu tfckziSTvq5/+vYpTmS+87YqIDIMqgTo0aSyctwYU59QYJNUfxnSAmWuE0JMnylhR1kk 3aoUMS42p6gUg5d2KtrKcv7SHAkt1e9rBwkRHNDLLKFyM99ZUZIohAiXwMkNvuPjatCd 1pk5AX9+DVJr5bt+idcICJDboM7Fb+RUMAyBEkmpvhhLhE6Fulz8+kQcbcmje+hkuszN Tg/7wsgKOF6lItzXIeCsHxgM+rm1GmEjRseSV5iyON/QApaHsuRD/Jg9cxLY/D1I2JXB nATg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=le3QyRV5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y15si1355212plr.73.2019.06.07.03.00.14; Fri, 07 Jun 2019 03:00:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=le3QyRV5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728068AbfFGJ1R (ORCPT + 99 others); Fri, 7 Jun 2019 05:27:17 -0400 Received: from mout.gmx.net ([212.227.17.20]:56323 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727813AbfFGJ1P (ORCPT ); Fri, 7 Jun 2019 05:27:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1559899609; bh=yn03fOF6r2SyvabnP4JYMrFm+Hg3kZ8i/XwXrvS283Q=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=le3QyRV5SCfUfnUTHDDx8KnwAJ1YcZZofGsaiENaa0S65QE9F4Df2PXJx195KBS1v KiLuApK3rCbGhgwoopsvnM49AmTGuemK/in+mjSTTdrzjcxxWW+JWquQhdeuWUCRRs QGUGSopxUBhdKOK9NdMaVD1vWXyVIuI2iwdARj4I= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.162] ([37.4.249.160]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MNO33-1hSrTs2XyT-006yzg; Fri, 07 Jun 2019 11:26:49 +0200 Subject: Re: [PATCH v2 2/7] clk: bcm283x: add driver interfacing with Raspberry Pi's firmware To: Nicolas Saenz Julienne , stefan.wahren@i2se.com, linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, f.fainelli@gmail.com, ptesarik@suse.com, sboyd@kernel.org, viresh.kumar@linaro.org, mturquette@baylibre.com, linux-pm@vger.kernel.org, rjw@rjwysocki.net, eric@anholt.net, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-clk@vger.kernel.org, mbrugger@suse.de, ssuloev@orpaltech.com References: <20190606142255.29454-1-nsaenzjulienne@suse.de> <20190606142255.29454-3-nsaenzjulienne@suse.de> From: Stefan Wahren Message-ID: <3c4c8b56-eb02-be6f-9b3a-a94a895f10f0@gmx.net> Date: Fri, 7 Jun 2019 11:26:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190606142255.29454-3-nsaenzjulienne@suse.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Provags-ID: V03:K1:9Gtr4vKtOR7f9jmvwWwAkSPUnTUPjTLfX0dp1Pf8fuXmf0dEfTv sYX87a56nfWjPnZ65c8C38ChUF4YP3EIs6NMJWI1eSMMZh7XsYSH5Zrh9pkcoVgo/nSAKHv l5il35Lc1dsKXeqt+WHXl2dsi6d412sVIr5FLEjxsqPIVcb6MWqj/gShhumCCM1Qa50r6E6 8ZUYczb/ER9H95lF0i7AQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:kybE1E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@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Nicolas, Am 06.06.19 um 16:22 schrieb Nicolas Saenz Julienne: > Raspberry Pi's firmware offers an interface though which update it's > clock's frequencies. This is specially useful in order to change the CPU > clock (pllb_arm) which is 'owned' by the firmware and we're unable to > scale using the register interface provided by clk-bcm2835. > > Signed-off-by: Nicolas Saenz Julienne > Acked-by: Eric Anholt > > --- > > Changes since v1: > - Use BIT() > - Add Kconfig entry, with compile test > - remove prepare/unprepare > - Fix uninitialized init.name in pllb registration > - Add MODULE_ALIAS() > - Use determine_rate() instead of round_rate() > - Add small introduction explaining need for driver > > drivers/clk/bcm/Kconfig | 7 + > drivers/clk/bcm/Makefile | 1 + > drivers/clk/bcm/clk-raspberrypi.c | 302 ++++++++++++++++++++++++++++++ > 3 files changed, 310 insertions(+) > create mode 100644 drivers/clk/bcm/clk-raspberrypi.c > > diff --git a/drivers/clk/bcm/Kconfig b/drivers/clk/bcm/Kconfig > index 29ee7b776cd4..a4a2775d65e1 100644 > --- a/drivers/clk/bcm/Kconfig > +++ b/drivers/clk/bcm/Kconfig > @@ -64,3 +64,10 @@ config CLK_BCM_SR > default ARCH_BCM_IPROC > help > Enable common clock framework support for the Broadcom Stingray SoC > + > +config CLK_RASPBERRYPI > + tristate "Raspberry Pi firmware based clock support" > + depends on RASPBERRYPI_FIRMWARE || (COMPILE_TEST && !RASPBERRYPI_FIRMW= ARE) > + help > + Enable common clock framework support for Raspberry Pi's firmware > + dependent clocks > diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile > index 002661d39128..eb7159099d82 100644 > --- a/drivers/clk/bcm/Makefile > +++ b/drivers/clk/bcm/Makefile > @@ -7,6 +7,7 @@ obj-$(CONFIG_CLK_BCM_KONA) +=3D clk-bcm21664.o > obj-$(CONFIG_COMMON_CLK_IPROC) +=3D clk-iproc-armpll.o clk-iproc-pll.o = clk-iproc-asiu.o > obj-$(CONFIG_ARCH_BCM2835) +=3D clk-bcm2835.o > obj-$(CONFIG_ARCH_BCM2835) +=3D clk-bcm2835-aux.o > +obj-$(CONFIG_CLK_RASPBERRYPI) +=3D clk-raspberrypi.o > obj-$(CONFIG_ARCH_BCM_53573) +=3D clk-bcm53573-ilp.o > obj-$(CONFIG_CLK_BCM_CYGNUS) +=3D clk-cygnus.o > obj-$(CONFIG_CLK_BCM_HR2) +=3D clk-hr2.o not your fault but you better rebase your next version on linux-next because Florian's latest patches ("clk: bcm: Make BCM2835 clock drivers selectable") collide with this patch. Checkpatch gives the following output about this patch: WARNING: 'harware' may be misspelled - perhaps 'hardware'? #58: FILE: drivers/clk/bcm/clk-raspberrypi.c:5: + * Even though clk-bcm2835 provides an interface to the harware registers for ERROR: code indent should use tabs where possible #197: FILE: drivers/clk/bcm/clk-raspberrypi.c:144: +^I^I^I^I=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 stru= ct clk_rate_request *req)$