summaryrefslogtreecommitdiff
path: root/tcl/target
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-07-02 04:55:35 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-07-02 04:55:35 +0000
commit6d08c1800c7d313c3e6be9fe2c7124df02749665 (patch)
tree1b6ec574d2329d376eab61a4674a194e206815ca /tcl/target
parentb3e6cb6d564f722f95a341f9b6661fc3ed44f969 (diff)
downloadopenocd+libswd-6d08c1800c7d313c3e6be9fe2c7124df02749665.tar.gz
openocd+libswd-6d08c1800c7d313c3e6be9fe2c7124df02749665.tar.bz2
openocd+libswd-6d08c1800c7d313c3e6be9fe2c7124df02749665.tar.xz
openocd+libswd-6d08c1800c7d313c3e6be9fe2c7124df02749665.zip
David Brownell <david-b@pacbell.net>:
Prepare the DaVinci PLL code to support the version 0x0E module used in newer chips (e.g. dm365): rename the original code so it's specific to version 0x02 PLL modules, and update the dm355evm code to use that new name. Fix two minor bugs in that version 2 code: sysclk3 setup used the sysclk2 divider address (affecting video processing on dm355, no worry for now) and sysclk2 setup had a syntax error. Also minor fixups to dm355evm, mostly to permit use of RTCK. git-svn-id: svn://svn.berlios.de/openocd/trunk@2447 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'tcl/target')
-rw-r--r--tcl/target/davinci.cfg14
1 files changed, 6 insertions, 8 deletions
diff --git a/tcl/target/davinci.cfg b/tcl/target/davinci.cfg
index 0a3da27d..07a26b21 100644
--- a/tcl/target/davinci.cfg
+++ b/tcl/target/davinci.cfg
@@ -31,12 +31,10 @@ proc mmw {reg setbits clearbits} {
# For PLLs that don't have a given register (e.g. plldiv8), or where a
# given divider is non-programmable, caller provides *NO* config mapping.
#
-# REVISIT there are minor differences between the PLL controllers.
-# Handle those; maybe check the ID register. This version behaves
-# for at least the dm355. On dm6446 and dm357 the PLLRST polarity
-# is different. On dm365 there are more changes.
-#
-proc pll_setup {pll_addr mult config} {
+
+# PLL version 0x02: tested on dm355
+# REVISIT: On dm6446 and dm357 the PLLRST polarity is different.
+proc pll_v02_setup {pll_addr mult config} {
set pll_ctrl_addr [expr $pll_addr + 0x100]
set pll_ctrl [mrw $pll_ctrl_addr]
@@ -98,7 +96,7 @@ proc pll_setup {pll_addr mult config} {
set go 1
}
if { [dict exists $config div2] } {
- 1et div [dict get $config div2]
+ set div [dict get $config div2]
set div [expr 0x8000 | ($div - 1)]
mww [expr $pll_addr + 0x011c] $div
set go 1
@@ -106,7 +104,7 @@ proc pll_setup {pll_addr mult config} {
if { [dict exists $config div3] } {
set div [dict get $config div3]
set div [expr 0x8000 | ($div - 1)]
- mww [expr $pll_addr + 0x011c] $div
+ mww [expr $pll_addr + 0x0120] $div
set go 1
}
if { [dict exists $config div4] } {