From: Thomas Koeller Date: Tue, 10 Aug 2010 12:56:44 +0000 (+0200) Subject: DM36x: Set OSCDIV divider X-Git-Tag: v0.5.0-rc1~454 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=14a25cd6de1fa7d72bae466375cdef3081f7f339;p=openocd DM36x: Set OSCDIV divider The ability to set up the OSCDIV divider was missing. Signed-off-by: Thomas Koeller --- diff --git a/tcl/target/davinci.cfg b/tcl/target/davinci.cfg index 11ae093f..6e9091e5 100644 --- a/tcl/target/davinci.cfg +++ b/tcl/target/davinci.cfg @@ -222,6 +222,13 @@ proc pll_v03_setup {pll_addr mult config} { } else { mww [expr $pll_addr + 0x0120] 0 } + if { [dict exists $config oscdiv] } { + set div [dict get $config oscdiv] + set div [expr 0x8000 | ($div - 1)] + mww [expr $pll_addr + 0x0124] $div + } else { + mww [expr $pll_addr + 0x0124] 0 + } if { [dict exists $config div4] } { set div [dict get $config div4] set div [expr 0x8000 | ($div - 1)]