From: openocd-gerrit <ope...@us...> - 2025-04-25 09:36:27
|
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 22dfd0efaddaa70baf9e65aff661554c4497909a (commit) from 69ee4457864af2657ce1b634887b26b838fc916f (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 22dfd0efaddaa70baf9e65aff661554c4497909a Author: Tomas Vanek <va...@fb...> Date: Tue Aug 13 16:23:20 2024 +0200 tcl/target/rp2350: workarounds for ROM API issues A0 chip: remove pad isolation A2 chip: instead of reset init fixes we will fix the flash driver with the following patch by Luke Wren: 8729: flash/nor/rp2xxx: fix flash operation after halt in RISC-V bootsel https://review.openocd.org/c/openocd/+/8729 I don't have A1 version to test. Signed-off-by: Tomas Vanek <va...@fb...> Change-Id: I9e9fab04ead929fe6e0a17c6c2f32a6f02e9beb9 Reviewed-on: https://review.openocd.org/c/openocd/+/8450 Tested-by: jenkins diff --git a/tcl/target/rp2350.cfg b/tcl/target/rp2350.cfg index 775561f06..d2465bd2f 100644 --- a/tcl/target/rp2350.cfg +++ b/tcl/target/rp2350.cfg @@ -94,8 +94,7 @@ if { [info exists _TARGETNAME_RV0] } { target create $_TARGETNAME_RV0 riscv -dap $_CHIPNAME.dap -ap-num 0xa000 -coreid 0 $_TARGETNAME_RV0 riscv set_enable_virt2phys off - # Workaround for stray IO_QSPI: GPIO_QSPI_SD1_CTRL: INOVER bit in RISC-V BOOTSEL - $_TARGETNAME_RV0 configure -event reset-init { mww 0x4003002c 0 } + $_TARGETNAME_RV0 configure -event reset-init "_rv_reset_init" if { [info exists _TARGETNAME_CM0] } { # just for setting after init when the event become-available is not fired @@ -204,3 +203,22 @@ if { $_RESCUE } { init rescue_reset } + +proc _rv_reset_init { } { + set chip_id [format 0x%08x [read_memory 0x40000000 32 1]] + + # Version related workarounds + switch $chip_id { + 0x00004927 { # A0 + # remove IO_QSPI isolation + mww 0x40030014 0 + mww 0x4003001c 0 + mww 0x40030024 0 + mww 0x4003002c 0 + mww 0x40030034 0 + mww 0x4003003c 0 + } + } + + rp2xxx rom_api_call FC +} ----------------------------------------------------------------------- Summary of changes: tcl/target/rp2350.cfg | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) hooks/post-receive -- Main OpenOCD repository |