flash/nor/stm32l4: Fix stm32l4_probe()
authorMarc Schink <dev@zapb.de>
Mon, 21 Jun 2021 14:18:38 +0000 (16:18 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sun, 27 Jun 2021 13:57:16 +0000 (14:57 +0100)
commit94ba5219ede27d6193ebac15af0468de60c9bfca
tree709245a2bec8eade797642146554194bfe4c9a16
parent0478a93ed52fd8ddc0f68434cb2f05f22cbcad70
flash/nor/stm32l4: Fix stm32l4_probe()

The current implementation fails due to the assert() statements in
get_stm32l4_rev_str() and get_stm32l4_bank_type_str(). Rearrange the
code in order to fix the problem.

Change-Id: If19c648dec8ddd3ef2fb801150114104b34c3bf2
Signed-off-by: Marc Schink <dev@zapb.de>
Fixes: 64c2e03b23 ("flash/nor: improved API of flash_driver.info & fixed buffer overruns")
Reviewed-on: http://openocd.zylin.com/6326
Tested-by: jenkins
Reviewed-by: Jan Matyas <matyas@codasip.com>
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
src/flash/nor/stm32l4x.c