diff options
author | Thomas Koeller <thomas.koeller@baslerweb.com> | 2010-08-10 14:56:44 +0200 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2010-08-12 08:59:04 +0200 |
commit | 14a25cd6de1fa7d72bae466375cdef3081f7f339 (patch) | |
tree | e3b2897d8334d12ce6d8c827a2b89cefc02ea30c /tcl | |
parent | 4ed89e4e42e1f2f62fdf6d0c660b2ea64479d136 (diff) | |
download | openocd_libswd-14a25cd6de1fa7d72bae466375cdef3081f7f339.tar.gz openocd_libswd-14a25cd6de1fa7d72bae466375cdef3081f7f339.tar.bz2 openocd_libswd-14a25cd6de1fa7d72bae466375cdef3081f7f339.tar.xz openocd_libswd-14a25cd6de1fa7d72bae466375cdef3081f7f339.zip |
DM36x: Set OSCDIV divider
The ability to set up the OSCDIV divider was missing.
Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
Diffstat (limited to 'tcl')
-rw-r--r-- | tcl/target/davinci.cfg | 7 |
1 files changed, 7 insertions, 0 deletions
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)] |