Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752418AbcD3J2a (ORCPT ); Sat, 30 Apr 2016 05:28:30 -0400 Received: from 212-186-180-163.dynamic.surfer.at ([212.186.180.163]:52725 "EHLO cgate.sperl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752301AbcD3J22 convert rfc822-to-8bit (ORCPT ); Sat, 30 Apr 2016 05:28:28 -0400 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: [PATCH 2/2] clk: bcm2835: Skip PLLC clocks when deciding on a new clock parent From: Martin Sperl In-Reply-To: <1461699585-6649-2-git-send-email-eric@anholt.net> Date: Sat, 30 Apr 2016 11:28:25 +0200 Cc: Michael Turquette , Stephen Boyd , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Stephen Warren , Lee Jones Content-Transfer-Encoding: 8BIT Message-Id: References: <1461699585-6649-1-git-send-email-eric@anholt.net> <1461699585-6649-2-git-send-email-eric@anholt.net> To: Eric Anholt X-Mailer: Apple Mail (2.2104) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1324 Lines: 34 > On 26.04.2016, at 21:39, Eric Anholt wrote: > > If the firmware had set up a clock to source from PLLC, go along with > it. But if we're looking for a new parent, we don't want to switch it > to PLLC because the firmware will force PLLC (and thus the AXI bus > clock) to different frequencies during over-temp/under-voltage, > without notification to Linux. > > On my system, this moves the Linux-enabled HDMI state machine and DSI1 > escape clock over to plld_per from pllc_per. EMMC still ends up on > pllc_per, because the firmware had set it up to use that. > > Signed-off-by: Eric Anholt > Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks") > — I guess this patch looks to me as if it is a policy inside the kernel, which is AFAIK frowned upon. I am looking into making "assigned-clock-parents” inside the dt work with the driver. Could look something like this: i2s: i2s@7e203000 { assigned-clock-parents = <&cprman BCM2835_PLLD_PER>, <&clk_osc>; assigned-clocks = <&cprman BCM2835_CLOCK_PCM>, <&cprman BCM2835_CLOCK_PCM>; }; (not sure if that works really - the same clock in assigned-clocks looks suspicious) This would move the policy out of the kernel into the device-tree, which - i guess is a better solution. Martin