From: OpenOCD-Gerrit <ope...@us...> - 2021-04-25 22:05:42
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 6f1252373ba3ff584011ad9568da117ce7ecdc35 (commit) via df443551a8d4cf74cea695ebf16b05db684f3d4e (commit) from 642cdae32167df80d4dc757f0da5f204e0298088 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6f1252373ba3ff584011ad9568da117ce7ecdc35 Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 15:58:22 2021 +0200 tcl/at91/sam9_smc: fix syntax errors This file has been added to OpenOCD 0.5.0 in 2011, before gerrit gets in use, with commit ba71e8c521a7 ("at91: add chip register definition and generic init support"). The only procedure in the file has never been referenced in any other part of OpenOCD. This procedure has syntax errors while uses its argument 'cs' and several unmatched parenthesis, which clearly highlights that it has never been used so far. Gerrit does not report any patch aimed at fixing it. Even if the file seems unused and could be removed, let's fix it in the hope it could get used. While there, remove some useless parenthesis and format it using the new simplified syntax required by jimtcl 0.81. Change-Id: Ied26456262e7b99de37667a8ce418f4f12e237bd Signed-off-by: Antonio Borneo <bor...@gm...> Fixes: ba71e8c521a7 ("at91: add chip register definition and generic init support") Reviewed-on: http://openocd.zylin.com/6157 Tested-by: jenkins Reviewed-by: Oleksij Rempel <li...@re...> diff --git a/tcl/chip/atmel/at91/sam9_smc.cfg b/tcl/chip/atmel/at91/sam9_smc.cfg index db943cb24..0628d4d18 100644 --- a/tcl/chip/atmel/at91/sam9_smc.cfg +++ b/tcl/chip/atmel/at91/sam9_smc.cfg @@ -26,30 +26,30 @@ # tdf_cycles proc sam9_smc_config { cs smc_config } { ;# Setup Register for CS n - set AT91_SMC_SETUP [expr ($::AT91_SMC + 0x00 + ((cs)*0x10))] - set val [expr ($smc_config(nwe_setup) << 0)] - set val [expr ($val | $smc_config(ncs_write_setup) << 8] - set val [expr ($val | $smc_config(nrd_setup)) << 16] - set val [expr ($val | $smc_config(ncs_read_setup) << 24] + set AT91_SMC_SETUP [expr {$::AT91_SMC + 0x00 + $cs * 0x10}] + set val [expr {$smc_config(nwe_setup) << 0}] + set val [expr {$val | $smc_config(ncs_write_setup) << 8}] + set val [expr {$val | $smc_config(nrd_setup)) << 16}] + set val [expr {$val | $smc_config(ncs_read_setup) << 24}] mww $AT91_SMC_SETUP $val ;# Pulse Register for CS n - set AT91_SMC_PULSE [expr ($::AT91_SMC + 0x04 + ((cs)*0x10))] - set val [expr ($smc_config(nwe_pulse) << 0)] - set val [expr ($val | $smc_config(ncs_write_pulse) << 8] - set val [expr ($val | $smc_config(nrd_pulse) << 16] - set val [expr ($val | $smc_config(ncs_read_pulse) << 24] + set AT91_SMC_PULSE [expr {$::AT91_SMC + 0x04 + $cs * 0x10}] + set val [expr {$smc_config(nwe_pulse) << 0}] + set val [expr {$val | $smc_config(ncs_write_pulse) << 8}] + set val [expr {$val | $smc_config(nrd_pulse) << 16}] + set val [expr {$val | $smc_config(ncs_read_pulse) << 24}] mww $AT91_SMC_PULSE $val ;# Cycle Register for CS n - set AT91_SMC_CYCLE [expr ($::AT91_SMC + 0x08 + ((cs)*0x10))] - set val [expr ($smc_config(write_cycle) << 0)] - set val [expr ($val | $smc_config(read_cycle) << 16] + set AT91_SMC_CYCLE [expr {$::AT91_SMC + 0x08 + $cs * 0x10}] + set val [expr {$smc_config(write_cycle) << 0}] + set val [expr {$val | $smc_config(read_cycle) << 16}] mww $AT91_SMC_CYCLE $val ;# Mode Register for CS n - set AT91_SMC_MODE [expr ($::AT91_SMC + 0x0c + ((cs)*0x10))] - set val [expr ($smc_config(mode) << 0)] - set val [expr ($val | $smc_config(tdf_cycles) << 16] + set AT91_SMC_MODE [expr {$::AT91_SMC + 0x0c + $cs * 0x10}] + set val [expr {$smc_config(mode) << 0}] + set val [expr {$val | $smc_config(tdf_cycles) << 16}] mww $AT91_SMC_MODE $val } commit df443551a8d4cf74cea695ebf16b05db684f3d4e Author: Antonio Borneo <bor...@gm...> Date: Sat Apr 10 15:31:39 2021 +0200 board: imx53: fix l2 cache initialization Both http://openocd.zylin.com/542/ and http://openocd.zylin.com/543/ introduce the same typo in the bitfield for initializing the l2 cache of imx53. One year later, http://openocd.zylin.com/1461/ copy-pastes the same typo. The comment above the code show that it's really an error and not the expected behaviour. Fix the typo replacing the incorrect comparison '<' with a left shift. Change-Id: I43725731a2228e28a676215f76936fa289d9395e Signed-off-by: Antonio Borneo <bor...@gm...> Fixes: e3b327343394 ("cfg: add imx53loco board config") Fixes: 108a458ab888 ("cfg: add icnova_imx53_sodimm board config") Fixes: e608ced33001 ("ftdi/board: Add support for DENX M53EVK") Reviewed-on: http://openocd.zylin.com/6156 Tested-by: jenkins Reviewed-by: Adrian M Negreanu <adr...@nx...> Reviewed-by: Oleksij Rempel <li...@re...> diff --git a/tcl/board/icnova_imx53_sodimm.cfg b/tcl/board/icnova_imx53_sodimm.cfg index dce9c470e..af9818814 100644 --- a/tcl/board/icnova_imx53_sodimm.cfg +++ b/tcl/board/icnova_imx53_sodimm.cfg @@ -79,7 +79,7 @@ proc init_l2cc { } { ; #orr r0, r0, #(1 << 22) /* disable write allocate */ ; #mcr 15, 1, r0, c9, c0, 2 - arm mcr 15 1 9 0 2 [expr 0xC4 | (1<<24) | (1<<23) | (1<22)] + arm mcr 15 1 9 0 2 [expr 0xC4 | (1<<24) | (1<<23) | (1<<22)] } diff --git a/tcl/board/imx53-m53evk.cfg b/tcl/board/imx53-m53evk.cfg index baeb3cd9d..b529c4940 100644 --- a/tcl/board/imx53-m53evk.cfg +++ b/tcl/board/imx53-m53evk.cfg @@ -75,7 +75,7 @@ proc init_l2cc { } { ; #orr r0, r0, #(1 << 22) /* disable write allocate */ ; #mcr 15, 1, r0, c9, c0, 2 - arm mcr 15 1 9 0 2 [expr 0xC4 | (1<<24) | (1<<23) | (1<22)] + arm mcr 15 1 9 0 2 [expr 0xC4 | (1<<24) | (1<<23) | (1<<22)] } diff --git a/tcl/board/imx53loco.cfg b/tcl/board/imx53loco.cfg index 18caca574..91c260138 100644 --- a/tcl/board/imx53loco.cfg +++ b/tcl/board/imx53loco.cfg @@ -80,7 +80,7 @@ proc init_l2cc { } { ; #orr r0, r0, #(1 << 22) /* disable write allocate */ ; #mcr 15, 1, r0, c9, c0, 2 - arm mcr 15 1 9 0 2 [expr 0xC4 | (1<<24) | (1<<23) | (1<22)] + arm mcr 15 1 9 0 2 [expr 0xC4 | (1<<24) | (1<<23) | (1<<22)] } ----------------------------------------------------------------------- Summary of changes: tcl/board/icnova_imx53_sodimm.cfg | 2 +- tcl/board/imx53-m53evk.cfg | 2 +- tcl/board/imx53loco.cfg | 2 +- tcl/chip/atmel/at91/sam9_smc.cfg | 32 ++++++++++++++++---------------- 4 files changed, 19 insertions(+), 19 deletions(-) hooks/post-receive -- Main OpenOCD repository |