PERFORCE change 92031 for review

Warner Losh imp at FreeBSD.org
Sun Feb 19 00:03:10 PST 2006


http://perforce.freebsd.org/chv.cgi?CH=92031

Change 92031 by imp at imp_plunger on 2006/02/19 08:02:58

	More constants.

Affected files ...

.. //depot/projects/arm/src/sys/arm/at91/at91_pmc.c#6 edit
.. //depot/projects/arm/src/sys/arm/at91/at91_pmcreg.h#3 edit

Differences ...

==== //depot/projects/arm/src/sys/arm/at91/at91_pmc.c#6 (text+ko) ====

@@ -196,10 +196,9 @@
 at91_pmc_pll_calc(uint32_t main_freq, uint32_t out_freq)
 {
         uint32_t i, div = 0, mul = 0, diff = 1 << 30;
-        unsigned ret = (out_freq > 155000000) ? 0xbe00 : 0x3e00; 
+        unsigned ret = (out_freq > PMC_PLL_FAST_THRESH) ? 0xbe00 : 0x3e00; 
 
-        /* PLL output max 240 MHz (or 180 MHz per errata) */
-        if (out_freq > 240000000)
+        if (out_freq > PMC_PLL_MAX_OUT_FREQ)
                 goto fail;
 
         for (i = 1; i < 256; i++) {

==== //depot/projects/arm/src/sys/arm/at91/at91_pmcreg.h#3 (text+ko) ====

@@ -104,9 +104,17 @@
 #define PMC_PLL_MIN_IN_FREQ	100000
 #define PMC_PLL_MAX_IN_FREQ	32000000
 
+/*
+ * PLL Max output frequency is 240MHz.  The errata says 180MHz is the max
+ * for some revisions of this part.  Be more permissive and optimistic.
+ */
+#define PMC_PLL_MAX_OUT_FREQ	240000000
+
 #define PMC_PLL_MULT_MIN	2
 #define PMC_PLL_MULT_MAX	2048
 
 #define PMC_PLL_SHIFT_TOL	5	/* Allow errors 1 part in 32 */
 
+#define PMC_PLL_FAST_THRESH	155000000
+
 #endif /* ARM_AT91_AT91_PMCREG_H */


More information about the p4-projects mailing list