Received: by 10.213.65.68 with SMTP id h4csp1639018imn; Sun, 8 Apr 2018 08:08:42 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+UGqL4tgyyr0PNBMrERmxDhkFCO2Me6d5ghSLLnOQoplQce4P6e52HpLIAeXEsNLZF1IJv X-Received: by 10.98.178.207 with SMTP id z76mr26535056pfl.37.1523200122481; Sun, 08 Apr 2018 08:08:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523200122; cv=none; d=google.com; s=arc-20160816; b=PsvppPGSiuPNVlj9L7YWQaPOBBgKi8sj3tUty4/RtGSNBDHUdV1fd/+qOKZkJik2L6 P2Y44PuFgfEfd4x38w7G1qvkjGgNZPGvpdpo1Ya0TlJ+OJH4/xUArD4rRrUIuyg8Jow0 +be1MqHi+WUpm2zLYtAlhVrJ4PCGXFrJl3Zbcv+K4ICfglXc4anrZjagkzXCBCOs7ZE6 9R9r9pR6gQiFphi207Jexfo5LS3cxjwRe6f+6jibMotGpvFkJpanyAMSA5q7t6CIUyDV 3KdErpIy6te5+9AZZJ8b1m3YlqsR2gLS0GZE436QOgg3tRMng3OkyDl1ZiouufuLbCbe buDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date:arc-authentication-results; bh=fnLCwObun6DMdH4cpcacUU6NlVr0DMsYdJjn9E6+CH4=; b=wCD74WJjGq1knhD5ZkeDAcd5gTEmG/i/hvWwVDsohNooap5GTn+rX6KsA2CsHJ7q/h fnjglkYTbOIksM6vroudRIqCkdWqHA9YWkiLJyVk9Y28BFpWoP9o4lqvoSNq31TctZXs F3Mle9a1VZjZ0sL/Fhbn7KdTKgJUNxz2803OSGwO2wonTTuJ20FhUy4Dw8jHOB58Z9ht 0R53BvWGSyCIi9ByaZ7vu3KVJW41SNyeR+h5dORQBDBtRLi7SGdS4+wLosmEwrfkN5Z9 9AzhFzbhvlJ/qxycIHFhH4bWPtcrc1ZWxnKUUCirz2vvCJ5DOrl1yQtR8WgsslyFgXav BSmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a21si7231296pgw.467.2018.04.08.08.07.55; Sun, 08 Apr 2018 08:08:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752200AbeDHOnY (ORCPT + 99 others); Sun, 8 Apr 2018 10:43:24 -0400 Received: from netrider.rowland.org ([192.131.102.5]:39807 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751458AbeDHOnW (ORCPT ); Sun, 8 Apr 2018 10:43:22 -0400 Received: (qmail 20683 invoked by uid 500); 8 Apr 2018 10:43:21 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 8 Apr 2018 10:43:21 -0400 Date: Sun, 8 Apr 2018 10:43:21 -0400 (EDT) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: Marcin cc: Boris Brezillon , Nicolas Ferre , Alexandre Belloni , Michael Turquette , Stephen Boyd , Greg Kroah-Hartman , , , , Subject: Re: [PATCH 1/2] clk: at91: Added more information logging. In-Reply-To: <20180408094330.GA51669@hak8or> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, 48000000); > 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, &pdev->dev); > > /* > * The USB host controller must remain in reset. > */ > writel(0, ®s->control); > + > + /* > + * Say what the clocks are set to. > + */ > + dev_dbg(&pdev->dev, "hclk set to: %lu hz\n", clk_get_rate(ohci_at91->hclk)); > + dev_dbg(&pdev->dev, "iclk set to: %lu hz\n", clk_get_rate(ohci_at91->iclk)); > + dev_dbg(&pdev->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