From 768c6efcceb2eb13f4634cbeef02c1691c68da6f Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Tue, 30 Jul 2024 08:50:34 +0200 Subject: [PATCH] gowin: added detect_flash/erase_flash for gw2a FPGAs --- src/gowin.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gowin.hpp b/src/gowin.hpp index 67154a77b..6abb38209 100644 --- a/src/gowin.hpp +++ b/src/gowin.hpp @@ -30,9 +30,9 @@ class Gowin: public Device, SPIInterface { /* spi interface */ bool detect_flash() override { - if (is_gw5a) + if (is_gw5a || is_gw2a) return SPIInterface::detect_flash(); - printError("protect flash not supported"); return false;} + printError("detect flash not supported"); return false;} bool protect_flash(uint32_t len) override { (void) len; printError("protect flash not supported"); return false;} @@ -41,7 +41,7 @@ class Gowin: public Device, SPIInterface { return SPIInterface::unprotect_flash(); printError("unprotect flash not supported"); return false;} bool bulk_erase_flash() override { - if (is_gw5a) + if (is_gw5a || is_gw2a) return SPIInterface::bulk_erase_flash(); printError("bulk erase flash not supported"); return false;} bool dumpFlash(uint32_t base_addr, uint32_t len) override;