mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-30 09:59:03 +02:00
Efinix: do not allow untested detect_flash() non-SoJ path until someone tries it out for sure
This commit is contained in:
+13
-3
@@ -234,10 +234,20 @@ bool Efinix::detect_flash()
|
||||
return SPIInterface::detect_flash();
|
||||
}
|
||||
|
||||
uint32_t timeout = 1000;
|
||||
#if 0
|
||||
/* Untested logic in SPI path -- if you test this, and it works,
|
||||
* uncomment it and submit a PR! */
|
||||
_spi->gpio_clear(_rst_pin);
|
||||
|
||||
return reinterpret_cast<SPIInterface *>(_spi)->detect_flash();
|
||||
bool rv = reinterpret_cast<SPIInterface *>(_spi)->detect_flash();
|
||||
|
||||
reset();
|
||||
|
||||
return rv;
|
||||
#else
|
||||
printError("detect flash not supported");
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Efinix::dumpFlash(uint32_t base_addr, uint32_t len)
|
||||
@@ -263,7 +273,7 @@ bool Efinix::dumpFlash(uint32_t base_addr, uint32_t len)
|
||||
return false;
|
||||
}
|
||||
|
||||
/* release SPI access */
|
||||
/* release SPI access. XXX later: refactor to use reset() and make sure the behavior is the same */
|
||||
_spi->gpio_set(_rst_pin | _oe_pin);
|
||||
usleep(12000);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user