core,xilinx,device: added option/methods to enable/disable quad mode on SPI Flash

This commit is contained in:
Gwenhael Goavec-Merou
2024-09-23 07:09:30 +02:00
parent 242357c46f
commit faa1fc76fc
6 changed files with 81 additions and 1 deletions
+15
View File
@@ -1197,6 +1197,21 @@ bool Xilinx::unprotect_flash()
return true;
}
bool Xilinx::set_quad_bit(bool set_quad)
{
if (_flash_chips & PRIMARY_FLASH) {
select_flash_chip(PRIMARY_FLASH);
if (!SPIInterface::set_quad_bit(set_quad))
return false;
}
if (_flash_chips & SECONDARY_FLASH) {
select_flash_chip(SECONDARY_FLASH);
if (!SPIInterface::set_quad_bit(set_quad))
return false;
}
return true;
}
bool Xilinx::bulk_erase_flash()
{
if (_flash_chips & PRIMARY_FLASH) {