linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Dinh.Nguyen@freescale.com (Dinh Nguyen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv1 2.6.34-rc6 1/3] mxc: gadget: remove 60mhz clock requirement for freescale mx51 usb core
Date: Wed,  5 May 2010 17:56:09 -0500	[thread overview]
Message-ID: <1273100171-3235-2-git-send-email-Dinh.Nguyen@freescale.com> (raw)
In-Reply-To: <1273100171-3235-1-git-send-email-Dinh.Nguyen@freescale.com>

for mx51, usb core is clocked from sources that are not 60mhz.

Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
---
 drivers/usb/gadget/fsl_mx3_udc.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/gadget/fsl_mx3_udc.c b/drivers/usb/gadget/fsl_mx3_udc.c
index 20a802e..d0b8bde 100644
--- a/drivers/usb/gadget/fsl_mx3_udc.c
+++ b/drivers/usb/gadget/fsl_mx3_udc.c
@@ -50,12 +50,14 @@ int fsl_udc_clk_init(struct platform_device *pdev)
 		goto egusb;
 	}
 
-	freq = clk_get_rate(mxc_usb_clk);
-	if (pdata->phy_mode != FSL_USB2_PHY_ULPI &&
-	    (freq < 59999000 || freq > 60001000)) {
-		dev_err(&pdev->dev, "USB_CLK=%lu, should be 60MHz\n", freq);
-		ret = -EINVAL;
-		goto eclkrate;
+	if (!cpu_is_mx51()) {
+		freq = clk_get_rate(mxc_usb_clk);
+		if (pdata->phy_mode != FSL_USB2_PHY_ULPI &&
+		    (freq < 59999000 || freq > 60001000)) {
+			dev_err(&pdev->dev, "USB_CLK=%lu, should be 60MHz\n", freq);
+			ret = -EINVAL;
+			goto eclkrate;
+		}
 	}
 
 	ret = clk_enable(mxc_usb_clk);
-- 
1.6.0.4

  reply	other threads:[~2010-05-05 22:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-05 22:56 PATCHv1 2.6.34-rc6 0/3-Enable usb gadget on freescale mx51 babbage hw Dinh Nguyen
2010-05-05 22:56 ` Dinh Nguyen [this message]
2010-05-05 22:56   ` [PATCHv1 2.6.34-rc6 2/3] mx5: change usb clock source from pll3 to pll2 Dinh Nguyen
2010-05-05 22:56     ` [PATCHv1 2.6.34-rc6 3/3] mx5: enable usb gadget for freescale mx51 babbage board Dinh Nguyen
2010-05-06  7:27       ` Sascha Hauer
2010-05-06  7:14     ` [PATCHv1 2.6.34-rc6 2/3] mx5: change usb clock source from pll3 to pll2 Sascha Hauer
2010-05-06 18:33   ` [PATCHv1 2.6.34-rc6 1/3] mxc: gadget: remove 60mhz clock requirement for freescale mx51 usb core Fabio Estevam

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=1273100171-3235-2-git-send-email-Dinh.Nguyen@freescale.com \
    --to=dinh.nguyen@freescale.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).