This is an automated email from Gerrit.

Thomas Schmid ([email protected]) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/1765

-- gerrit

commit fb0f8243a72356087fa40ce0a8ce8ba0889dffd8
Author: Thomas Schmid <[email protected]>
Date:   Thu Oct 24 09:32:35 2013 -0600

    sam4s flash: fix PLLA frequency calculation if diva > 1
    
    The code didn't address the case where diva is bigger than 1.
    
    Change-Id: I15d8c47aa7b5cf80df1f29e067f30575f5d60a90
    Signed-off-by: Thomas Schmid <[email protected]>

diff --git a/src/flash/nor/at91sam4.c b/src/flash/nor/at91sam4.c
index 2615c3d..6c8b71e 100644
--- a/src/flash/nor/at91sam4.c
+++ b/src/flash/nor/at91sam4.c
@@ -1246,8 +1246,8 @@ static void sam4_explain_ckgr_plla(struct sam4_chip 
*pChip)
                LOG_USER("\tPLLA Freq: (Disabled,mula = 0)");
        else if (diva == 0)
                LOG_USER("\tPLLA Freq: (Disabled,diva = 0)");
-       else if (diva == 1) {
-               pChip->cfg.plla_freq = (pChip->cfg.mainosc_freq * (mula + 1));
+       else if (diva >= 1) {
+               pChip->cfg.plla_freq = (pChip->cfg.mainosc_freq * (mula + 1) / 
diva);
                LOG_USER("\tPLLA Freq: %3.03f MHz",
                        _tomhz(pChip->cfg.plla_freq));
        }

-- 

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to