target/adi_v5_swd: update cached value on write to DP_SELECT
authorAntonio Borneo <borneo.antonio@gmail.com>
Thu, 28 Feb 2019 10:31:11 +0000 (11:31 +0100)
committerTomas Vanek <vanekt@fbl.cz>
Thu, 14 Mar 2019 13:50:49 +0000 (13:50 +0000)
commit420a692e0fae34a59eb3c33932362812e33f5583
tree35d4656729dcef72d8f096e105e7a1437d823cdb
parent380502d82074b799f10d9671c4fe0fe24eb93023
target/adi_v5_swd: update cached value on write to DP_SELECT

When the register DP_SELECT is written directly, e.g. with command
<dap> dpreg 8 <value>
the cached value in OpenOCD is not completely updated with the new
value, thus creating issues in the following AP and DP read/write
that rely on the cached value.

Update the cached value while writing to DP_SELECT.

Change-Id: I8221b10cd6fc1fbe73e6b834b68820b43480e1a2
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4979
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/target/adi_v5_swd.c