All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/4] clock_imx8mq: Delete not used init_usb_clk()
@ 2020-01-23 13:20 Pedro Jardim
  2020-01-23 14:43 ` Anatolij Gustschin
  0 siblings, 1 reply; 9+ messages in thread
From: Pedro Jardim @ 2020-01-23 13:20 UTC (permalink / raw)
  To: u-boot

Function init_usb_clk() is not used anywhere, so it can simply be deleted.
This was detected by the following sparse warning:

arch/arm/mach-imx/imx8m/clock_imx8mq.c:377:6: warning: no previous prototype
 for ‘init_usb_clk’ [-Wmissing-prototypes]
 void init_usb_clk(void)
      ^~~~~~~~~~~~

Signed-off-by: Pedro Jardim <jardim.c.pedro@gmail.com>
---
Chages since v1:

- Fixed patch corruption
 arch/arm/mach-imx/imx8m/clock_imx8mq.c | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mq.c b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
index 878f2be166..663fe4d3ca 100644
--- a/arch/arm/mach-imx/imx8m/clock_imx8mq.c
+++ b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
@@ -374,28 +374,6 @@ void init_wdog_clk(void)
 	clock_enable(CCGR_WDOG3, 1);
 }
 
-void init_usb_clk(void)
-{
-	if (!is_usb_boot()) {
-		clock_enable(CCGR_USB_CTRL1, 0);
-		clock_enable(CCGR_USB_CTRL2, 0);
-		clock_enable(CCGR_USB_PHY1, 0);
-		clock_enable(CCGR_USB_PHY2, 0);
-		/* 500MHz */
-		clock_set_target_val(USB_BUS_CLK_ROOT, CLK_ROOT_ON |
-				     CLK_ROOT_SOURCE_SEL(1));
-		/* 100MHz */
-		clock_set_target_val(USB_CORE_REF_CLK_ROOT, CLK_ROOT_ON |
-				     CLK_ROOT_SOURCE_SEL(1));
-		/* 100MHz */
-		clock_set_target_val(USB_PHY_REF_CLK_ROOT, CLK_ROOT_ON |
-				     CLK_ROOT_SOURCE_SEL(1));
-		clock_enable(CCGR_USB_CTRL1, 1);
-		clock_enable(CCGR_USB_CTRL2, 1);
-		clock_enable(CCGR_USB_PHY1, 1);
-		clock_enable(CCGR_USB_PHY2, 1);
-	}
-}
 
 void init_nand_clk(void)
 {
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 1/4] clock_imx8mq: Delete not used init_usb_clk()
  2020-01-23 13:20 [PATCH v2 1/4] clock_imx8mq: Delete not used init_usb_clk() Pedro Jardim
@ 2020-01-23 14:43 ` Anatolij Gustschin
  2020-01-23 15:24   ` Fabio Estevam
  0 siblings, 1 reply; 9+ messages in thread
From: Anatolij Gustschin @ 2020-01-23 14:43 UTC (permalink / raw)
  To: u-boot

On Thu, 23 Jan 2020 10:20:14 -0300
Pedro Jardim jardim.c.pedro at gmail.com wrote:

> Function init_usb_clk() is not used anywhere, so it can simply be deleted.
> This was detected by the following sparse warning:
> 
> arch/arm/mach-imx/imx8m/clock_imx8mq.c:377:6: warning: no previous prototype
>  for ‘init_usb_clk’ [-Wmissing-prototypes]
>  void init_usb_clk(void)

Cc'ing Peng. Maybe this was in preparation for adding USB support ?

--
Anatolij

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/4] clock_imx8mq: Delete not used init_usb_clk()
  2020-01-23 14:43 ` Anatolij Gustschin
@ 2020-01-23 15:24   ` Fabio Estevam
  2020-01-27 13:16     ` Peng Fan
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2020-01-23 15:24 UTC (permalink / raw)
  To: u-boot

Hi Anatolij,

On Thu, Jan 23, 2020 at 11:43 AM Anatolij Gustschin <agust@denx.de> wrote:
>
> On Thu, 23 Jan 2020 10:20:14 -0300
> Pedro Jardim jardim.c.pedro at gmail.com wrote:
>
> > Function init_usb_clk() is not used anywhere, so it can simply be deleted.
> > This was detected by the following sparse warning:
> >
> > arch/arm/mach-imx/imx8m/clock_imx8mq.c:377:6: warning: no previous prototype
> >  for ‘init_usb_clk’ [-Wmissing-prototypes]
> >  void init_usb_clk(void)
>
> Cc'ing Peng. Maybe this was in preparation for adding USB support ?

Unfortunately i.MX8M USB support has been pending for a long time.

I prefer if we could get rid of this unused code and then bring this
back when USB support comes in.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/4] clock_imx8mq: Delete not used init_usb_clk()
  2020-01-23 15:24   ` Fabio Estevam
@ 2020-01-27 13:16     ` Peng Fan
  2020-02-03  8:47       ` Jon Nettleton
  2020-02-03 11:57       ` Lokesh Vutla
  0 siblings, 2 replies; 9+ messages in thread
From: Peng Fan @ 2020-01-27 13:16 UTC (permalink / raw)
  To: u-boot

> Subject: Re: [PATCH v2 1/4] clock_imx8mq: Delete not used init_usb_clk()
> 
> Hi Anatolij,
> 
> On Thu, Jan 23, 2020 at 11:43 AM Anatolij Gustschin <agust@denx.de> wrote:
> >
> > On Thu, 23 Jan 2020 10:20:14 -0300
> > Pedro Jardim jardim.c.pedro at gmail.com wrote:
> >
> > > Function init_usb_clk() is not used anywhere, so it can simply be deleted.
> > > This was detected by the following sparse warning:
> > >
> > > arch/arm/mach-imx/imx8m/clock_imx8mq.c:377:6: warning: no previous
> > > prototype  for ‘init_usb_clk’ [-Wmissing-prototypes]  void
> > > init_usb_clk(void)
> >
> > Cc'ing Peng. Maybe this was in preparation for adding USB support ?
> 
> Unfortunately i.MX8M USB support has been pending for a long time.
> 
> I prefer if we could get rid of this unused code and then bring this back when
> USB support comes in.

Not sure whether TI guys have done the cadence USB support.

Previously Sherry did some usb work, but TI guys take over that.

After the usb IP support ready, I or someone could start support usb for i.MX8MQ.

For now, the function could be dropped.

Thanks,
Peng.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/4] clock_imx8mq: Delete not used init_usb_clk()
  2020-01-27 13:16     ` Peng Fan
@ 2020-02-03  8:47       ` Jon Nettleton
  2020-02-05 21:04         ` Fabio Estevam
  2020-02-03 11:57       ` Lokesh Vutla
  1 sibling, 1 reply; 9+ messages in thread
From: Jon Nettleton @ 2020-02-03  8:47 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 27, 2020 at 2:16 PM Peng Fan <peng.fan@nxp.com> wrote:
>
> > Subject: Re: [PATCH v2 1/4] clock_imx8mq: Delete not used init_usb_clk()
> >
> > Hi Anatolij,
> >
> > On Thu, Jan 23, 2020 at 11:43 AM Anatolij Gustschin <agust@denx.de> wrote:
> > >
> > > On Thu, 23 Jan 2020 10:20:14 -0300
> > > Pedro Jardim jardim.c.pedro at gmail.com wrote:
> > >
> > > > Function init_usb_clk() is not used anywhere, so it can simply be deleted.
> > > > This was detected by the following sparse warning:
> > > >
> > > > arch/arm/mach-imx/imx8m/clock_imx8mq.c:377:6: warning: no previous
> > > > prototype  for ‘init_usb_clk’ [-Wmissing-prototypes]  void
> > > > init_usb_clk(void)
> > >
> > > Cc'ing Peng. Maybe this was in preparation for adding USB support ?
> >
> > Unfortunately i.MX8M USB support has been pending for a long time.
> >
> > I prefer if we could get rid of this unused code and then bring this back when
> > USB support comes in.
>
> Not sure whether TI guys have done the cadence USB support.
>
> Previously Sherry did some usb work, but TI guys take over that.
>
> After the usb IP support ready, I or someone could start support usb for i.MX8MQ.
>
> For now, the function could be dropped.
>
> Thanks,
> Peng.

I have a working port of the Linux usb phy driver for the iMX8MQ
already.  I think the only piece that is missing to use dwc3-generic
for iMX8MQ is the common clk driver.  Has anyone started work on this?

-Jon

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/4] clock_imx8mq: Delete not used init_usb_clk()
  2020-01-27 13:16     ` Peng Fan
  2020-02-03  8:47       ` Jon Nettleton
@ 2020-02-03 11:57       ` Lokesh Vutla
  2020-02-03 12:00         ` Peng Fan
  1 sibling, 1 reply; 9+ messages in thread
From: Lokesh Vutla @ 2020-02-03 11:57 UTC (permalink / raw)
  To: u-boot



On 27/01/20 6:46 PM, Peng Fan wrote:
>> Subject: Re: [PATCH v2 1/4] clock_imx8mq: Delete not used init_usb_clk()
>>
>> Hi Anatolij,
>>
>> On Thu, Jan 23, 2020 at 11:43 AM Anatolij Gustschin <agust@denx.de> wrote:
>>>
>>> On Thu, 23 Jan 2020 10:20:14 -0300
>>> Pedro Jardim jardim.c.pedro at gmail.com wrote:
>>>
>>>> Function init_usb_clk() is not used anywhere, so it can simply be deleted.
>>>> This was detected by the following sparse warning:
>>>>
>>>> arch/arm/mach-imx/imx8m/clock_imx8mq.c:377:6: warning: no previous
>>>> prototype  for ‘init_usb_clk’ [-Wmissing-prototypes]  void
>>>> init_usb_clk(void)
>>>
>>> Cc'ing Peng. Maybe this was in preparation for adding USB support ?
>>
>> Unfortunately i.MX8M USB support has been pending for a long time.
>>
>> I prefer if we could get rid of this unused code and then bring this back when
>> USB support comes in.
> 
> Not sure whether TI guys have done the cadence USB support.

I guess you are talking about Cadence USB3 driver. Marek already merged the
support. Please find the corresponding commits below:

f69257baa8 usb: composite: add BOS descriptor support to composite framework
d80effb184 usb: gadget: Add gadget_is_cdns3() macro
a9ca4193bd usb: cdns3: Add TI wrapper driver for CDNS USB3 controller
927c22b0da usb: cdns3: gadget: Implement udc_set_speed() callback
7e91f6ccdc usb: Add Cadence USB3 host and gadget driver
8d94e184ff usb: udc: Introduce ->udc_set_speed() method
77dcbdf3c1 usb: gadget: Add match_ep() op to usb_gadget_ops
c93e305af7 bitmaps: import for_each_set_bit() macro
c37f594280 list: import list_first_entry_or_null()

Thanks and regards,
Lokesh

> 
> Previously Sherry did some usb work, but TI guys take over that.
> 
> After the usb IP support ready, I or someone could start support usb for i.MX8MQ.
> 
> For now, the function could be dropped.
> 
> Thanks,
> Peng.
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/4] clock_imx8mq: Delete not used init_usb_clk()
  2020-02-03 11:57       ` Lokesh Vutla
@ 2020-02-03 12:00         ` Peng Fan
  0 siblings, 0 replies; 9+ messages in thread
From: Peng Fan @ 2020-02-03 12:00 UTC (permalink / raw)
  To: u-boot

> Subject: Re: [PATCH v2 1/4] clock_imx8mq: Delete not used init_usb_clk()
> 
> 
> 
> On 27/01/20 6:46 PM, Peng Fan wrote:
> >> Subject: Re: [PATCH v2 1/4] clock_imx8mq: Delete not used
> >> init_usb_clk()
> >>
> >> Hi Anatolij,
> >>
> >> On Thu, Jan 23, 2020 at 11:43 AM Anatolij Gustschin <agust@denx.de>
> wrote:
> >>>
> >>> On Thu, 23 Jan 2020 10:20:14 -0300
> >>> Pedro Jardim jardim.c.pedro at gmail.com wrote:
> >>>
> >>>> Function init_usb_clk() is not used anywhere, so it can simply be
> deleted.
> >>>> This was detected by the following sparse warning:
> >>>>
> >>>> arch/arm/mach-imx/imx8m/clock_imx8mq.c:377:6: warning: no
> previous
> >>>> prototype  for ‘init_usb_clk’ [-Wmissing-prototypes]  void
> >>>> init_usb_clk(void)
> >>>
> >>> Cc'ing Peng. Maybe this was in preparation for adding USB support ?
> >>
> >> Unfortunately i.MX8M USB support has been pending for a long time.
> >>
> >> I prefer if we could get rid of this unused code and then bring this
> >> back when USB support comes in.
> >
> > Not sure whether TI guys have done the cadence USB support.
> 
> I guess you are talking about Cadence USB3 driver. Marek already merged the
> support. Please find the corresponding commits below:
> 
> f69257baa8 usb: composite: add BOS descriptor support to composite
> framework
> d80effb184 usb: gadget: Add gadget_is_cdns3() macro a9ca4193bd usb:
> cdns3: Add TI wrapper driver for CDNS USB3 controller 927c22b0da usb:
> cdns3: gadget: Implement udc_set_speed() callback 7e91f6ccdc usb: Add
> Cadence USB3 host and gadget driver 8d94e184ff usb: udc: Introduce
> ->udc_set_speed() method
> 77dcbdf3c1 usb: gadget: Add match_ep() op to usb_gadget_ops
> c93e305af7 bitmaps: import for_each_set_bit() macro
> c37f594280 list: import list_first_entry_or_null()

Great.

Then I think better keep the function.

Thanks,
Peng.

> 
> Thanks and regards,
> Lokesh
> 
> >
> > Previously Sherry did some usb work, but TI guys take over that.
> >
> > After the usb IP support ready, I or someone could start support usb for
> i.MX8MQ.
> >
> > For now, the function could be dropped.
> >
> > Thanks,
> > Peng.
> >

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/4] clock_imx8mq: Delete not used init_usb_clk()
  2020-02-03  8:47       ` Jon Nettleton
@ 2020-02-05 21:04         ` Fabio Estevam
  2020-02-06  1:17           ` Peng Fan
  0 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2020-02-05 21:04 UTC (permalink / raw)
  To: u-boot

On Mon, Feb 3, 2020 at 5:48 AM Jon Nettleton <jon@solid-run.com> wrote:

> I have a working port of the Linux usb phy driver for the iMX8MQ
> already.  I think the only piece that is missing to use dwc3-generic
> for iMX8MQ is the common clk driver.  Has anyone started work on this?

Not that I am aware of.

Peng, do you know?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/4] clock_imx8mq: Delete not used init_usb_clk()
  2020-02-05 21:04         ` Fabio Estevam
@ 2020-02-06  1:17           ` Peng Fan
  0 siblings, 0 replies; 9+ messages in thread
From: Peng Fan @ 2020-02-06  1:17 UTC (permalink / raw)
  To: u-boot

> Subject: Re: [PATCH v2 1/4] clock_imx8mq: Delete not used init_usb_clk()
> 
> On Mon, Feb 3, 2020 at 5:48 AM Jon Nettleton <jon@solid-run.com> wrote:
> 
> > I have a working port of the Linux usb phy driver for the iMX8MQ
> > already.  I think the only piece that is missing to use dwc3-generic
> > for iMX8MQ is the common clk driver.  Has anyone started work on this?
> 
> Not that I am aware of.
> 
> Peng, do you know?

I have not start to do that.

Jon, great to know that you did that. Look forward your patches in community.

Thanks,
Peng.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-02-06  1:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-23 13:20 [PATCH v2 1/4] clock_imx8mq: Delete not used init_usb_clk() Pedro Jardim
2020-01-23 14:43 ` Anatolij Gustschin
2020-01-23 15:24   ` Fabio Estevam
2020-01-27 13:16     ` Peng Fan
2020-02-03  8:47       ` Jon Nettleton
2020-02-05 21:04         ` Fabio Estevam
2020-02-06  1:17           ` Peng Fan
2020-02-03 11:57       ` Lokesh Vutla
2020-02-03 12:00         ` Peng Fan

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.