target/arm_adi_v5: simplify TI BE 32 quirk workaround
commit5039848424f818241a8d256b7e49f6c3152c4dc6
authorTomas Vanek <vanekt@fbl.cz>
Sun, 2 Apr 2023 16:27:17 +0000 (2 18:27 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 6 Jan 2024 13:55:17 +0000 (6 13:55 +0000)
tree13ea36b22ca01ba5cbcc5d7924d2ebc715640f5f
parenta77d280bd07b355b5ec981a91eefa88695081bf1
target/arm_adi_v5: simplify TI BE 32 quirk workaround

Introduce ti_be_lane_xor for byte lane correction
and use common code for both quirk and regular conversion.
The same lane correction takes place in both mem_ap_read/write()
- it was obfuscated in original code with different bitwise and arithmetic
operations.

Change-Id: I6a30672b908770323d30813a714e06ab8695fe26
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7574
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
src/target/arm_adi_v5.c