mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-30 01:48:50 +02:00
all devices / spiInterface / main: added method / infra to detect flash chip with --detect -f
This commit is contained in:
@@ -1152,6 +1152,21 @@ bool Xilinx::dumpFlash(uint32_t base_addr, uint32_t len)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Xilinx::detect_flash()
|
||||
{
|
||||
if (_flash_chips & PRIMARY_FLASH) {
|
||||
select_flash_chip(PRIMARY_FLASH);
|
||||
if (!SPIInterface::detect_flash())
|
||||
return false;
|
||||
}
|
||||
if (_flash_chips & SECONDARY_FLASH) {
|
||||
select_flash_chip(SECONDARY_FLASH);
|
||||
if (!SPIInterface::detect_flash())
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Xilinx::protect_flash(uint32_t len)
|
||||
{
|
||||
if (_flash_chips & PRIMARY_FLASH) {
|
||||
|
||||
Reference in New Issue
Block a user