All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Lechner <david@lechnology.com>
To: Sekhar Nori <nsekhar@ti.com>, Kevin Hilman <khilman@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>
Cc: Axel Haslam <ahaslam@baylibre.com>,
	Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 1/5] ARM: davinci: da8xx: add usb phy clocks
Date: Wed, 26 Oct 2016 11:37:04 -0500	[thread overview]
Message-ID: <0302c410-4b05-3a5b-3801-5ab73089a9e2@lechnology.com> (raw)
In-Reply-To: <6bcc1ac1-446c-6191-1c63-e37ccfaf9556@ti.com>

On 10/26/2016 02:59 AM, Sekhar Nori wrote:
> 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 <david@lechnology.com>
>> Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
>> ---
>>
>> 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
>

FWIW, clk_get() uses dev_name() to get the device name, which will 
return NULL until after the platform device is registered.

I can add the device references anyway. However, this is complicated by 
the fact that the musb platform device declaration is inside of an #if 
IS_ENABLED(CONFIG_USB_MUSB_HDRC). I can either remove the #if or add 
more #if's. Do you have a preference on this?

WARNING: multiple messages have this Message-ID (diff)
From: David Lechner <david-nq/r/kbU++upp/zk7JDF2g@public.gmane.org>
To: Sekhar Nori <nsekhar-l0cyMroinI0@public.gmane.org>,
	Kevin Hilman <khilman-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
Cc: Axel Haslam <ahaslam-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
	Sergei Shtylyov
	<sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v6 1/5] ARM: davinci: da8xx: add usb phy clocks
Date: Wed, 26 Oct 2016 11:37:04 -0500	[thread overview]
Message-ID: <0302c410-4b05-3a5b-3801-5ab73089a9e2@lechnology.com> (raw)
In-Reply-To: <6bcc1ac1-446c-6191-1c63-e37ccfaf9556-l0cyMroinI0@public.gmane.org>

On 10/26/2016 02:59 AM, Sekhar Nori wrote:
> 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 <david-nq/r/kbU++upp/zk7JDF2g@public.gmane.org>
>> Signed-off-by: Axel Haslam <ahaslam-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
>> ---
>>
>> 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
>

FWIW, clk_get() uses dev_name() to get the device name, which will 
return NULL until after the platform device is registered.

I can add the device references anyway. However, this is complicated by 
the fact that the musb platform device declaration is inside of an #if 
IS_ENABLED(CONFIG_USB_MUSB_HDRC). I can either remove the #if or add 
more #if's. Do you have a preference on this?
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: david@lechnology.com (David Lechner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 1/5] ARM: davinci: da8xx: add usb phy clocks
Date: Wed, 26 Oct 2016 11:37:04 -0500	[thread overview]
Message-ID: <0302c410-4b05-3a5b-3801-5ab73089a9e2@lechnology.com> (raw)
In-Reply-To: <6bcc1ac1-446c-6191-1c63-e37ccfaf9556@ti.com>

On 10/26/2016 02:59 AM, Sekhar Nori wrote:
> 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 <david@lechnology.com>
>> Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
>> ---
>>
>> 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
>

FWIW, clk_get() uses dev_name() to get the device name, which will 
return NULL until after the platform device is registered.

I can add the device references anyway. However, this is complicated by 
the fact that the musb platform device declaration is inside of an #if 
IS_ENABLED(CONFIG_USB_MUSB_HDRC). I can either remove the #if or add 
more #if's. Do you have a preference on this?

  reply	other threads:[~2016-10-26 16:37 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26  3:06 [PATCH v6 0/5] da8xx USB PHY platform devices and clocks David Lechner
2016-10-26  3:06 ` David Lechner
2016-10-26  3:06 ` David Lechner
2016-10-26  3:06 ` [PATCH v6 1/5] ARM: davinci: da8xx: add usb phy clocks David Lechner
2016-10-26  3:06   ` David Lechner
2016-10-26  7:59   ` Sekhar Nori
2016-10-26  7:59     ` Sekhar Nori
2016-10-26  7:59     ` Sekhar Nori
2016-10-26 16:37     ` David Lechner [this message]
2016-10-26 16:37       ` David Lechner
2016-10-26 16:37       ` David Lechner
2016-10-26 17:13       ` Sekhar Nori
2016-10-26 17:13         ` Sekhar Nori
2016-10-26 17:13         ` Sekhar Nori
2016-10-26  9:24   ` Sekhar Nori
2016-10-26  9:24     ` Sekhar Nori
2016-10-26  9:24     ` Sekhar Nori
2016-10-26  3:06 ` [PATCH v6 2/5] ARM: davinci: da8xx: Add CFGCHIP syscon platform declaration David Lechner
2016-10-26  3:06   ` David Lechner
2016-10-26  9:58   ` Sekhar Nori
2016-10-26  9:58     ` Sekhar Nori
2016-10-26  9:58     ` Sekhar Nori
2016-10-26  3:06 ` [PATCH v6 3/5] ARM: davinci: da8xx: Add USB PHY " David Lechner
2016-10-26  3:06   ` David Lechner
2016-10-26  3:06 ` [PATCH v6 4/5] ARM: DTS: da850: Add cfgchip syscon node David Lechner
2016-10-26  3:06   ` David Lechner
2016-10-26  3:06   ` David Lechner
2016-10-26 10:19   ` Sekhar Nori
2016-10-26 10:19     ` Sekhar Nori
2016-10-26 10:19     ` Sekhar Nori
2016-10-26 16:08   ` David Lechner
2016-10-26 16:08     ` David Lechner
2016-10-26 16:08     ` David Lechner
2016-10-28  8:21     ` Sekhar Nori
2016-10-28  8:21       ` Sekhar Nori
2016-10-28  8:21       ` Sekhar Nori
2016-10-28 17:08       ` Kevin Hilman
2016-10-28 17:08         ` Kevin Hilman
2016-10-28 17:08         ` Kevin Hilman
2016-10-28 17:24         ` David Lechner
2016-10-28 17:24           ` David Lechner
2016-10-28 17:24           ` David Lechner
2016-10-28 20:53           ` Kevin Hilman
2016-10-28 20:53             ` Kevin Hilman
2016-10-26  3:06 ` [PATCH v6 5/5] ARM: DTS: da850: Add usb phy node David Lechner
2016-10-26  3:06   ` David Lechner
2016-10-26 10:26   ` Sekhar Nori
2016-10-26 10:26     ` Sekhar Nori
2016-10-26 10:26     ` Sekhar Nori
2016-10-27 15:55     ` David Lechner
2016-10-27 15:55       ` David Lechner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0302c410-4b05-3a5b-3801-5ab73089a9e2@lechnology.com \
    --to=david@lechnology.com \
    --cc=ahaslam@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=khilman@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=nsekhar@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.