From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758037AbcJZIBM (ORCPT ); Wed, 26 Oct 2016 04:01:12 -0400 Received: from bear.ext.ti.com ([198.47.19.11]:34492 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752703AbcJZIBH (ORCPT ); Wed, 26 Oct 2016 04:01:07 -0400 Subject: Re: [PATCH v6 1/5] ARM: davinci: da8xx: add usb phy clocks To: David Lechner , Kevin Hilman , Rob Herring , Mark Rutland References: <1477451211-31979-1-git-send-email-david@lechnology.com> <1477451211-31979-2-git-send-email-david@lechnology.com> CC: Axel Haslam , Sergei Shtylyov , , , From: Sekhar Nori Message-ID: <6bcc1ac1-446c-6191-1c63-e37ccfaf9556@ti.com> Date: Wed, 26 Oct 2016 13:29:39 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <1477451211-31979-2-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 On Wednesday 26 October 2016 08:36 AM, David Lechner wrote: > Up to this point, the USB phy clock configuration was handled manually in > the board files and in the usb drivers. This adds proper clocks so that > the usb drivers can use clk_get and clk_enable and not have to worry about > the details. Also, the related code is removed from the board files and > replaced with the new clock registration functions. > > Signed-off-by: David Lechner > Signed-off-by: Axel Haslam > --- > > I have added "ARM: davinci: da8xx: Enable the usb20 "per" clk on phy_clk_enable" > from Axel Haslam to this patch. > > In the review of Axel's patch, Sekhar said: > >> We should not be using a NULL device pointer here. Can you pass the musb >> device pointer available in the same file? Also, da850_clks[] in da850.c >> needs to be fixed to add the matching device name. > > However, the musb device may not be registered. The usb20_clk can be used to > supply a 48MHz clock to USB 1.1 (ohci) without using the musb device. So, I am > inclined to leave this as NULL. But clock look-up has nothing to do with device being registered AFAICT. It is used to identify the clock consumer. Passing NULL there means the clock is not associated with any device. Which is not correct as we are specifically looking at MUSB module clock. Thanks, Sekhar From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sekhar Nori Subject: Re: [PATCH v6 1/5] ARM: davinci: da8xx: add usb phy clocks Date: Wed, 26 Oct 2016 13:29:39 +0530 Message-ID: <6bcc1ac1-446c-6191-1c63-e37ccfaf9556@ti.com> References: <1477451211-31979-1-git-send-email-david@lechnology.com> <1477451211-31979-2-git-send-email-david@lechnology.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1477451211-31979-2-git-send-email-david@lechnology.com> Sender: linux-kernel-owner@vger.kernel.org To: David Lechner , Kevin Hilman , Rob Herring , Mark Rutland Cc: Axel Haslam , Sergei Shtylyov , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org List-Id: devicetree@vger.kernel.org On Wednesday 26 October 2016 08:36 AM, David Lechner wrote: > Up to this point, the USB phy clock configuration was handled manually in > the board files and in the usb drivers. This adds proper clocks so that > the usb drivers can use clk_get and clk_enable and not have to worry about > the details. Also, the related code is removed from the board files and > replaced with the new clock registration functions. > > Signed-off-by: David Lechner > Signed-off-by: Axel Haslam > --- > > I have added "ARM: davinci: da8xx: Enable the usb20 "per" clk on phy_clk_enable" > from Axel Haslam to this patch. > > In the review of Axel's patch, Sekhar said: > >> We should not be using a NULL device pointer here. Can you pass the musb >> device pointer available in the same file? Also, da850_clks[] in da850.c >> needs to be fixed to add the matching device name. > > However, the musb device may not be registered. The usb20_clk can be used to > supply a 48MHz clock to USB 1.1 (ohci) without using the musb device. So, I am > inclined to leave this as NULL. But clock look-up has nothing to do with device being registered AFAICT. It is used to identify the clock consumer. Passing NULL there means the clock is not associated with any device. Which is not correct as we are specifically looking at MUSB module clock. Thanks, Sekhar From mboxrd@z Thu Jan 1 00:00:00 1970 From: nsekhar@ti.com (Sekhar Nori) Date: Wed, 26 Oct 2016 13:29:39 +0530 Subject: [PATCH v6 1/5] ARM: davinci: da8xx: add usb phy clocks In-Reply-To: <1477451211-31979-2-git-send-email-david@lechnology.com> References: <1477451211-31979-1-git-send-email-david@lechnology.com> <1477451211-31979-2-git-send-email-david@lechnology.com> Message-ID: <6bcc1ac1-446c-6191-1c63-e37ccfaf9556@ti.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wednesday 26 October 2016 08:36 AM, David Lechner wrote: > Up to this point, the USB phy clock configuration was handled manually in > the board files and in the usb drivers. This adds proper clocks so that > the usb drivers can use clk_get and clk_enable and not have to worry about > the details. Also, the related code is removed from the board files and > replaced with the new clock registration functions. > > Signed-off-by: David Lechner > Signed-off-by: Axel Haslam > --- > > I have added "ARM: davinci: da8xx: Enable the usb20 "per" clk on phy_clk_enable" > from Axel Haslam to this patch. > > In the review of Axel's patch, Sekhar said: > >> We should not be using a NULL device pointer here. Can you pass the musb >> device pointer available in the same file? Also, da850_clks[] in da850.c >> needs to be fixed to add the matching device name. > > However, the musb device may not be registered. The usb20_clk can be used to > supply a 48MHz clock to USB 1.1 (ohci) without using the musb device. So, I am > inclined to leave this as NULL. But clock look-up has nothing to do with device being registered AFAICT. It is used to identify the clock consumer. Passing NULL there means the clock is not associated with any device. Which is not correct as we are specifically looking at MUSB module clock. Thanks, Sekhar