Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755520AbcCPSER (ORCPT ); Wed, 16 Mar 2016 14:04:17 -0400 Received: from mail-lf0-f47.google.com ([209.85.215.47]:35704 "EHLO mail-lf0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755231AbcCPSEP (ORCPT ); Wed, 16 Mar 2016 14:04:15 -0400 Subject: Re: [PATCH 2/5] ARM: davinci: da8xx: add usb phy clocks To: David Lechner , Sekhar Nori , Kevin Hilman , Alan Stern , Bin Liu , Petr Kulhavy References: <1458081473-8223-1-git-send-email-david@lechnology.com> <1458081473-8223-2-git-send-email-david@lechnology.com> <56E95128.5000607@cogentembedded.com> <56E99ECA.90400@lechnology.com> Cc: Russell King , Greg Kroah-Hartman , Felipe Balbi , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org From: Sergei Shtylyov Organization: Cogent Embedded Message-ID: <56E9A01B.3010503@cogentembedded.com> Date: Wed, 16 Mar 2016 21:04:11 +0300 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: <56E99ECA.90400@lechnology.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 890 Lines: 31 On 03/16/2016 08:58 PM, David Lechner wrote: >>> +static struct clk usb20_clk = { >>> + .name = "usb20", >>> + .parent = &pll0_sysclk2, >>> + .lpsc = DA8XX_LPSC1_USB20, >>> + .gpsc = 1, >>> +}; >> >> Why move it? > > For organization, to keep all of the USB clocks together. I can leave it alone > if that is preferred. I'd prefer to minimize the noise... >>> + >>> + /* Set the mux depending on the parent clock. */ >>> + if (clk->parent == &pll0_aux_clk) >>> + val |= CFGCHIP2_USB2PHYCLKMUX; >>> + else if (clk->parent == &usb_ref_clk) >>> + val &= ~CFGCHIP2_USB2PHYCLKMUX; >> >> Don't we have clk_set_parent()for that? > > Yes. clk_set_parent() is already called in a loop for all clocks elsewhere, so > not needed here. No, I mean why is not this implemented as a part of clk_set_parent()? MBR, Sergei