Re: [PATCH 1/2] clk: at91: Added more information logging.

2018-04-08 Thread Alan Stern
On Sun, 8 Apr 2018, Marcin wrote:

> I noticed that when debugging some USB clocking issue that there weren't
> many ways to tell what the state of the USB clocking system was. This
> adds a few logging statements to see what the relevant code is trying to
> do.
> 
> Signed-off-by: Marcin Ziemianowicz 

It seems like you have added more debugging lines than necessary.

> --- a/drivers/usb/host/ohci-at91.c
> +++ b/drivers/usb/host/ohci-at91.c
> @@ -70,11 +70,12 @@ static const struct ohci_driver_overrides 
> ohci_at91_drv_overrides __initconst =
>  
>  /*-*/
>  
> -static void at91_start_clock(struct ohci_at91_priv *ohci_at91)
> +static void at91_start_clock(struct ohci_at91_priv *ohci_at91, struct device 
> *dev)
>  {
>   if (ohci_at91->clocked)
>   return;
>  
> + dev_dbg(dev, "Enabling hclk, iclk, and setting fclk to 48 Mhz\n");

Here you list all the clocks and give one frequency.

>   clk_set_rate(ohci_at91->fclk, 4800);
>   clk_prepare_enable(ohci_at91->hclk);
>   clk_prepare_enable(ohci_at91->iclk);

> @@ -104,12 +106,19 @@ static void at91_start_hc(struct platform_device *pdev)
>   /*
>* Start the USB clocks.
>*/
> - at91_start_clock(ohci_at91);
> + at91_start_clock(ohci_at91, >dev);
>  
>   /*
>* The USB host controller must remain in reset.
>*/
>   writel(0, >control);
> +
> + /*
> +  * Say what the clocks are set to.
> +  */
> + dev_dbg(>dev, "hclk set to: %lu hz\n", 
> clk_get_rate(ohci_at91->hclk));
> + dev_dbg(>dev, "iclk set to: %lu hz\n", 
> clk_get_rate(ohci_at91->iclk));
> + dev_dbg(>dev, "fclk set to: %lu hz\n", 
> clk_get_rate(ohci_at91->fclk));

Here you list all the clocks a second time and give all the 
frequencies.

>  }
>  
>  static void at91_stop_hc(struct platform_device *pdev)

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] clk: at91: Added more information logging.

2018-04-08 Thread Marcin Ziemianowicz
On Sun, Apr 08, 2018 at 11:54:49AM +0200, Greg Kroah-Hartman wrote:
> On Sun, Apr 08, 2018 at 05:43:30AM -0400, Marcin wrote:
> > I noticed that when debugging some USB clocking issue that there weren't
> > many ways to tell what the state of the USB clocking system was. This
> > adds a few logging statements to see what the relevant code is trying to
> > do.
> > 
> > Signed-off-by: Marcin Ziemianowicz 
> 
> Your "From:" line doesn't match this name :(

Ah drat, I knew I did something wrong. You suggested in IRC that I wait a day
for others to reply, so after that I will attempt to version my patchset.

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] clk: at91: Added more information logging.

2018-04-08 Thread Greg Kroah-Hartman
On Sun, Apr 08, 2018 at 05:43:30AM -0400, Marcin wrote:
> I noticed that when debugging some USB clocking issue that there weren't
> many ways to tell what the state of the USB clocking system was. This
> adds a few logging statements to see what the relevant code is trying to
> do.
> 
> Signed-off-by: Marcin Ziemianowicz 

Your "From:" line doesn't match this name :(
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html