flash/nor/nrf5: drop nrf5_get_probed_chip_if_halted()
commit2db325f5395fa24aefbf137584e5fdeedf390e97
authorTomas Vanek <vanekt@fbl.cz>
Sun, 21 Jan 2024 17:14:14 +0000 (21 18:14 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 9 Mar 2024 11:02:02 +0000 (9 11:02 +0000)
tree1de8923005e7fa05bd9db983e5833dc3d87ad95e
parent42e4f26a3da8203d8f28c3edc490968273b1d904
flash/nor/nrf5: drop nrf5_get_probed_chip_if_halted()

nrf5_get_probed_chip_if_halted() was somewhat bizarre
combination of functions:
- test if the target is halted is appropriate for flash
  erase/write only, certainly not for getting chip info
- getting chip pointer takes place more frequently
  and using one temporary variable for dereference
  makes no harm
- probing chip is useless at all as the flash
  infrastructure always calls auto_probe() before
  entering a flash operation

Replace the function by ordinary and readable code.

Change-Id: Ic31f4e33d8b7b36687be3f40bfd0fe913d17b75f
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8107
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
src/flash/nor/nrf5.c