From patchwork Tue Feb 11 11:37:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 319234 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 668772C007A for ; Tue, 11 Feb 2014 22:39:56 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751629AbaBKLjv (ORCPT ); Tue, 11 Feb 2014 06:39:51 -0500 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:50141 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751630AbaBKLjs (ORCPT ); Tue, 11 Feb 2014 06:39:48 -0500 Received: from e106331-lin.cambridge.arm.com (e106331-lin.cambridge.arm.com [10.1.205.154]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id s1BBbFkp008527; Tue, 11 Feb 2014 11:39:19 GMT From: Mark Rutland To: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, robh+dt@kernel.org, pawel.moll@arm.com, Mark Rutland , Grant Likely , Arnd Bergmann Subject: [PATCH 7/7] Documentation: devicetree: loosen primecell clock requirements Date: Tue, 11 Feb 2014 11:37:12 +0000 Message-Id: <1392118632-11312-8-git-send-email-mark.rutland@arm.com> X-Mailer: git-send-email 1.8.1.1 In-Reply-To: <1392118632-11312-1-git-send-email-mark.rutland@arm.com> References: <1392118632-11312-1-git-send-email-mark.rutland@arm.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The primecell binding requires the APB PCLK (named "apb_pclk") to be the first entry in the clocks list, yet existing drivers and dts files expect other clocks first, in clear violation of this requirement. Additionally, the code handling the apb_pclk always acquires the clock by name rather than index, making the requirement irrelevant. As there are no other implementations handling the primecell bindings, this patch loosens the requirements to an apb_pclk entry existing in the clocks list. This is compatible with existing software, and any new software handling the weaker requirements will be able to use existing dts. Any software relying on the original stricter requirements will be unable to use many existing dts, so the loosened requirement aids compatibility rather than hindering it. Signed-off-by: Mark Rutland Cc: Grant Likely Cc: Arnd Bergmann Cc: Rob Herring Cc: Pawel Moll --- Documentation/devicetree/bindings/arm/primecell.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/primecell.txt b/Documentation/devicetree/bindings/arm/primecell.txt index 0df6aca..0a66506 100644 --- a/Documentation/devicetree/bindings/arm/primecell.txt +++ b/Documentation/devicetree/bindings/arm/primecell.txt @@ -13,9 +13,10 @@ Required properties: Optional properties: - arm,primecell-periphid : Value to override the h/w value with -- clocks : From common clock binding. First clock is phandle to clock for apb - pclk. Additional clocks are optional and specific to those peripherals. -- clock-names : From common clock binding. Shall be "apb_pclk" for first clock. +- clocks : From common clock binding. One clock must be the apb pclk. + Additional clocks are optional and specific to those peripherals. +- clock-names : From common clock binding. Shall include "apb_pclk" for the apb + pclk. - dmas : From common DMA binding. If present, refers to one or more dma channels. - dma-names : From common DMA binding, needs to match the 'dmas' property. Devices with exactly one receive and transmit channel shall name @@ -31,8 +32,8 @@ serial@fff36000 { compatible = "arm,pl011", "arm,primecell"; arm,primecell-periphid = <0x00341011>; - clocks = <&pclk>; - clock-names = "apb_pclk"; + clocks = <&refclk>, <&pclk>; + clock-names = "uartclk", "apb_pclk"; dmas = <&dma-controller 4>, <&dma-controller 5>; dma-names = "rx", "tx";