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, and update the dm355evm code to
use that new name.
Fix two a 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.
Update dm355evm to tweak cosmetics, and permit use of RTCK.
Fix a bunch of goofy VIM modelines (sigh).
---
tcl/board/csb337.cfg | 2 +-
tcl/board/dm355evm.cfg | 11 ++++++-----
tcl/board/omap2420_h4.cfg | 2 +-
tcl/target/davinci.cfg | 16 ++++++++--------
tcl/target/icepick.cfg | 2 +-
tcl/target/omap2420.cfg | 2 +-
tcl/target/ti_dm365.cfg | 2 ++
tcl/target/ti_dm6446.cfg | 2 +-
8 files changed, 21 insertions(+), 18 deletions(-)
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, and update the dm355evm code to
use that new name.
Fix two a 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.
Update dm355evm to tweak cosmetics, and permit use of RTCK.
Fix a bunch of goofy VIM modelines (sigh).
---
tcl/board/csb337.cfg | 2 +-
tcl/board/dm355evm.cfg | 11 ++++++-----
tcl/board/omap2420_h4.cfg | 2 +-
tcl/target/davinci.cfg | 16 ++++++++--------
tcl/target/icepick.cfg | 2 +-
tcl/target/omap2420.cfg | 2 +-
tcl/target/ti_dm365.cfg | 2 ++
tcl/target/ti_dm6446.cfg | 2 +-
8 files changed, 21 insertions(+), 18 deletions(-)
--- a/tcl/board/csb337.cfg
+++ b/tcl/board/csb337.cfg
@@ -113,4 +113,4 @@ proc csb337_reset_init { } {
$_TARGETNAME configure -event reset-init {csb337_reset_init}
-# vim:syntax tcl
+# vim: set syntax=tcl :
--- a/tcl/board/dm355evm.cfg
+++ b/tcl/board/dm355evm.cfg
@@ -1,4 +1,3 @@
-#
# DM355 EVM board
# http://focus.ti.com/docs/toolsw/folders/print/tmdsevm355.html
# http://c6000.spectrumdigital.com/evmdm355/
@@ -22,7 +21,7 @@ proc dm355evm_init {} {
puts "Initialize DM355 EVM board"
# CLKIN = 24 MHz ... can't talk quickly to ARM yet
- jtag_khz 1500
+ jtag_rclk 1500
########################
# PLL1 = 432 MHz (/8, x144)
@@ -37,10 +36,10 @@ proc dm355evm_init {} {
set pll_divs [dict create]
dict set pll_divs div3 16
dict set pll_divs div4 8
- pll_setup $addr 144 $pll_divs
+ pll_v02_setup $addr 144 $pll_divs
# ARM is now running at 216 MHz, so JTAG can go faster
- jtag_khz 20000
+ jtag_rclk 20000
########################
# PLL2 = 342 MHz (/8, x114)
@@ -50,7 +49,7 @@ proc dm355evm_init {} {
set addr [dict get $dm355 pllc2]
set pll_divs [dict create]
dict set pll_divs prediv 8
- pll_setup $addr 114 $pll_divs
+ pll_v02_setup $addr 114 $pll_divs
########################
# PINMUX
@@ -117,3 +116,5 @@ nand device davinci 0 0x02004000 hwecc4
# FIXME
# - support writing UBL with its header (new layout only with new ROMs)
# - support writing ABL/U-Boot with its header (new layout)
+
+# vim: set syntax=tcl :
--- a/tcl/board/omap2420_h4.cfg
+++ b/tcl/board/omap2420_h4.cfg
@@ -11,4 +11,4 @@ reset_config trst_and_srst separate
flash bank cfi 0x04000000 0x02000000 2 2 $_TARGETNAME
flash bank cfi 0x06000000 0x02000000 2 2 $_TARGETNAME
-# vim:syntax tcl
+# vim: set syntax=tcl :
--- 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] } {
@@ -168,3 +166,5 @@ proc psc_go {} {
# wait for PTSTAT.go to clear (again ignoring DSP power domain)
while { [expr [mrw $ptstat_addr] & 0x01] != 0 } { sleep 1 }
}
+
+# vim: set syntax=tcl :
--- a/tcl/target/icepick.cfg
+++ b/tcl/target/icepick.cfg
@@ -20,4 +20,4 @@ proc icepick_c_tapenable {jrc port} {
runtest 10
}
-# vim:syntax tcl
+# vim: set syntax=tcl :
--- a/tcl/target/omap2420.cfg
+++ b/tcl/target/omap2420.cfg
@@ -58,4 +58,4 @@ $_TARGETNAME configure -work-area-backup
#etm config $_TARGETNAME 16 normal full etb
#etb config $_TARGETNAME $_CHIPNAME.etb
-# vim:syntax tcl
+# vim: set syntax=tcl :
--- a/tcl/target/ti_dm365.cfg
+++ b/tcl/target/ti_dm365.cfg
@@ -95,3 +95,5 @@ arm7_9 dcc_downloads enable
# trace setup
etm config $_TARGETNAME 16 normal full etb
etb config $_TARGETNAME $_CHIPNAME.etb
+
+# vim: set syntax=tcl :
--- a/tcl/target/ti_dm6446.cfg
+++ b/tcl/target/ti_dm6446.cfg
@@ -76,4 +76,4 @@ arm7_9 dcc_downloads enable
etm config $_TARGETNAME 16 normal full etb
etb config $_TARGETNAME $_CHIPNAME.etb
-# vim:syntax tcl
+# vim: set syntax=tcl :
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development