This patch removes qspi_detected flag because if
a test has been failed then pytest framework will reset
board and continue with other test. In this case from
pytest point of view it already probed the device but
from device side it hasnt probed after reset. So removing
this flag allows device to probe the qspi for every test
and works even if one test failed in between.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
import test_net
-qspi_detected = False
page_size = 0
erase_size = 0
total_size = 0
# Find out qspi memory parameters
def qspi_pre_commands(u_boot_console):
- if qspi_detected:
- return
output = u_boot_console.run_command('sf probe')
if not "SF: Detected" in output:
total_size *= 1024 * 1024
print 'Total size is: ' + str(total_size) + " B"
- global qspi_detected
- qspi_detected = True
-
# Read the whole QSPI flash twice, random_size till full flash size, random till page size
@pytest.mark.buildconfigspec('cmd_bdi')
@pytest.mark.buildconfigspec('cmd_sf')