Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1112620ybm; Tue, 21 May 2019 08:49:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZ3xi/0FNeSTqjedMNxdHqsRXZYmarlOy7SJmbpJwu24p/4WgDOe5Oz1k6JiLF7aZStD+b X-Received: by 2002:aa7:9104:: with SMTP id 4mr58034056pfh.66.1558453759979; Tue, 21 May 2019 08:49:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558453759; cv=none; d=google.com; s=arc-20160816; b=vSfEHOVF8/6qfx90WA5iJuG7zqRJXVY+eg5F2T6svDkEiQ51fwn1y4KobmqlUKDxUn VOne99ww734y7vLxkZJ6stZ3V449RBiiAf2dH1QFA9kGxszDiHtw8Bo+AoS0MHhhZEWd rfGULcsiQjyjz3yo1xi6t3POy2d5EItU6ag3vA03RTSOXd4T0w8S4DmIDFcwl4JOWtPo t4SddIJwNjQlmVIJlbKtbIqSwnK+x9dKOM0rz83IB8kpbWHQMH4Qej9iJc1xporMgHt8 Pgf+grQFaM4w3Y8hcgB596ez0ESnhSivN6yS7jHf1K6MHQPvgg4CxinmPsU6TDljCi9n OP8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=Lhi8l3NXDDfQhxJkRaBLv7Fx9krEL/JUmWYBMZriWwM=; b=w+q1Oi05tbnbogxOS53Nj2YS1E8V/5vZsztHX7EAq7JR5ip2iJS+OZE6CCMVhK4epD ZgkUUdt2rcR6YraIp1Gj7g22k63Naxe+fwsEjpRM+CUBnXWpGzbuZzuI4iBzJ7VDRUfX UZZprolvshNXcuHGrM6ktT7GjBMmRSGjk7IDD1tvnN5AkDcib5k+aeZpqP2Bs+ssqQOw D3MTBjGUXyLpa5RUFjlzdZ32Ji6M4ao+7sKKaOYEiaNjts+X6K9Qy9Zt1J5JuD07I2ks 3OVw6CBUCiZkrB14J0PZ2kwZb1eWEAjs7VHhOtUrH/61VcHWV/A2OfgeOyX4BYmA5EV/ PEAQ== ARC-Authentication-Results: i=1; mx.google.com; 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 d35si11633786pla.419.2019.05.21.08.49.05; Tue, 21 May 2019 08:49:19 -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; 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 S1728987AbfEUPrJ (ORCPT + 99 others); Tue, 21 May 2019 11:47:09 -0400 Received: from mx2.suse.de ([195.135.220.15]:42456 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728212AbfEUPrI (ORCPT ); Tue, 21 May 2019 11:47:08 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B497EAE1F; Tue, 21 May 2019 15:47:05 +0000 (UTC) Message-ID: Subject: Re: [RFC v2 3/5] clk: bcm2835: use firmware interface to update pllb From: Nicolas Saenz Julienne To: Stefan Wahren , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Eric Anholt Cc: linux-pm@vger.kernel.org, sboyd@kernel.org, viresh.kumar@linaro.org, mturquette@baylibre.com, ptesarik@suse.com, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, mbrugger@suse.de, linux-rpi-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, ssuloev@orpaltech.com Date: Tue, 21 May 2019 17:47:03 +0200 In-Reply-To: <6383b357-3f7e-f031-f59f-61c598e44763@i2se.com> References: <20190520104708.11980-1-nsaenzjulienne@suse.de> <20190520104708.11980-4-nsaenzjulienne@suse.de> <6383b357-3f7e-f031-f59f-61c598e44763@i2se.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-zPUlS9r+c6dQNQzC21+7" User-Agent: Evolution 3.32.2 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-zPUlS9r+c6dQNQzC21+7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Stefan, thanks for your comments! On Tue, 2019-05-21 at 14:40 +0200, Stefan Wahren wrote: > Hi Nicolas, >=20 > On 20.05.19 14:11, Stefan Wahren wrote: > > Hi Nicolas, > >=20 > > the following comments applies only in case Eric is fine with the whole > > approach. > >=20 > > On 20.05.19 12:47, Nicolas Saenz Julienne wrote: > > > Raspberry Pi's firmware, which runs in a dedicated processor, keeps > > maybe we should clarify that the firmware is running in the VPU > > > track of the board's temperature and voltage. It's resposible for > > > scaling the CPU frequency whenever it deems the device reached an uns= afe > > > state. On top of that the firmware provides an interface which allows > > > Linux to to query the clock's state or change it's frequency. > > I think this requires a separate update of the devicetree binding. > > > Being the sole user of the bcm2835 clock driver, this integrates the > > > firmware interface into the clock driver and adds a first user: the C= PU > > > pll, also known as 'pllb'. > > Please verify that the kernel still works (and this clock driver probe) > > under the following conditions: > >=20 > > - CONFIG_RASPBERRYPI_FIRMWARE=3Dn > > - CONFIG_RASPBERRYPI_FIRMWARE=3Dm > > - older DTBs without patch #1 > i thought about this and the case this driver would return > -EPROBE_DEFER. The clock driver is too essential for doing such a thing. > So i think the best solution would be to move these changes into a > separate driver which should be register by the clock driver (similiar > to vchiq). This also avoid the need of a new device tree binding. I understand your concerns. Wouldn't you prefer registering the device trough the device tree? I'd go w= ith the same approach as the firmware touchscreen driver, which is registered a= fter the firmware's probe trough dt's 'simple-bus'. That said, it's not a strong= ly held opinion, I'm happy with whatever solution as long as it works. I get from your comments that you'd like the register based version of 'pll= b' and 'pllb_arm' to be loaded if for some reason the firmware isn't available= . Is that right? The main problem I see with this is the duplication of 'pllb' a= nd 'pllb_arm'. Both drivers will create the same clock device through differen= t interfaces. Any suggestions on how to deal with that? If not I can simply remove 'pllb' and 'pllb_arm' from clk-bcm2835.c. Regards, Nicolas --=-zPUlS9r+c6dQNQzC21+7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAlzkHXcACgkQlfZmHno8 x/58Pwf+J/igXfZ06sc7Gr74B5NqVdWqbVe+23xD1sjLpwUKTfWtUJAnbRuk8LOt +XgjgwGqFMQHMRLpibxSSqUZrXT+TNh1SiicBzJ9KWNbz42xRcvek4A8sgBDTeUs l6EVVtCNw+g8nPnT95arGKZ3xEIVAGdsg8tASLoyqbcNOJNb8r2QoXmsdK5oGQ/C TsgPRiwPvc9TvvqDSkojXxMgEfxfh8pNcYTQ8KFs/HKFOrM+C7hny7s3q02r/xhA Clhqd5Ur2BlhxvgOflW5i9eMeugVL1+g7pZUplzddVC1JA4U3KMD+RVZxXKhzg2S srJIknJIKqm1VdajX7OLqqjUae1Dkw== =kanr -----END PGP SIGNATURE----- --=-zPUlS9r+c6dQNQzC21+7--