From d01f0f1063c8ba0e8f3e925eac0561bf5385c490 Mon Sep 17 00:00:00 2001 From: Denis Bodor Date: Sat, 2 May 2026 12:01:18 +0200 Subject: [PATCH] fix BPI flash selection (on ypcb003381p1 board) --- src/xilinx.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/xilinx.cpp b/src/xilinx.cpp index 78573bb..0a79730 100644 --- a/src/xilinx.cpp +++ b/src/xilinx.cpp @@ -1277,6 +1277,18 @@ bool Xilinx::dumpFlash(uint32_t base_addr, uint32_t len) bool Xilinx::detect_flash() { + if (_is_bpi_board) { + if (!_bpi_flash) { + if (!load_bpi_bridge()) + return false; + } + if (!_bpi_flash->detect()) { + printError("BPI flash detection failed"); + return false; + } + return post_flash_access(); + } + if (_flash_chips & PRIMARY_FLASH) { select_flash_chip(PRIMARY_FLASH); if (!FlashInterface::detect_flash())