ARM: at91/PMC: use at91_usb_rate() for UTMI PLL
authorNicolas Ferre <nicolas.ferre@atmel.com>
Mon, 24 Jun 2013 16:09:25 +0000 (18:09 +0200)
committerNicolas Ferre <nicolas.ferre@atmel.com>
Wed, 26 Jun 2013 13:24:11 +0000 (15:24 +0200)
We are using this function, now that we have introduced
the support for UTMI clock for computing the USB host rate.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Tested-by: Bo Shen <voice.shen@atmel.com>
arch/arm/mach-at91/clock.c

index 661111fd76ac33619ecc50357d883767359e9350..6b2630a92f71723644ff7c7242cf6579aa7f4802 100644 (file)
@@ -742,8 +742,7 @@ static void __init at91_upll_usbfs_clock_init(unsigned long main_clock)
        /* Now set uhpck values */
        uhpck.parent = &utmi_clk;
        uhpck.pmc_mask = AT91SAM926x_PMC_UHP;
-       uhpck.rate_hz = utmi_clk.rate_hz;
-       uhpck.rate_hz /= 1 + ((at91_pmc_read(AT91_PMC_USB) & AT91_PMC_OHCIUSBDIV) >> 8);
+       uhpck.rate_hz = at91_usb_rate(&utmi_clk, utmi_clk.rate_hz, usbr);
 }
 
 static int __init at91_pmc_init(unsigned long main_clock)