Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753410AbcDKKvY (ORCPT ); Mon, 11 Apr 2016 06:51:24 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:37088 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751230AbcDKKvW (ORCPT ); Mon, 11 Apr 2016 06:51:22 -0400 Subject: Re: [PATCH v3 06/16] ARM: davinci: da850: use clk->set_parent for async3 To: David Lechner References: <1458863503-31121-1-git-send-email-david@lechnology.com> <1458863503-31121-7-git-send-email-david@lechnology.com> CC: , , , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Kevin Hilman , Kishon Vijay Abraham I , Greg Kroah-Hartman , Alan Stern , Bin Liu , Lee Jones , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list , "moderated list:ARM PORT" , "open list:USB SUBSYSTEM" From: Sekhar Nori Message-ID: <570B813A.1030907@ti.com> Date: Mon, 11 Apr 2016 16:19:30 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1458863503-31121-7-git-send-email-david@lechnology.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1198 Lines: 35 On Friday 25 March 2016 05:21 AM, David Lechner wrote: > The da850 family of processors has an async3 clock domain that can be > muxed to either pll0_sysclk2 or pll1_sysclk2. Now that the davinci clocks > have a set_parent callback, we can use this to control the async3 mux > instead of a stand-alone function. > > This adds a new async3_clk and sets the appropriate child clocks. The > default is use to pll1_sysclk2 since it is not affected by processor > frequency scaling. > > Signed-off-by: David Lechner > +static int da850_async3_set_parent(struct clk *clk, struct clk *parent) > +{ > + u32 val; > + > + val = readl(DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG)); > + > + /* Set the Async3 clock domain mux based on the parent clock. */ > + if (parent == &pll0_sysclk2) > + val &= ~CFGCHIP3_ASYNC3_CLKSRC; > + else if (parent == &pll1_sysclk2) > + val |= CFGCHIP3_ASYNC3_CLKSRC; > + else { > + pr_err("Bad parent on async3 clock mux.\n"); > + return -EINVAL; > + } Since else has braces, need braces on all arm of the if-else construct. Applied this patch with this fixed locally. checkpatch complains about this too when --strict option is passed. Thanks, Sekhar