soc/software: Remove SoCController dependency for BIOS compilation.

This commit is contained in:
Florent Kermarrec 2021-04-07 10:45:43 +02:00
parent 02328e5236
commit e5e472d469
2 changed files with 5 additions and 1 deletions

View File

@ -786,7 +786,7 @@ class SoC(Module):
def check_bios_requirements(self):
# Check for required Peripherals.
for periph in ["ctrl", "timer0"]:
for periph in [ "timer0"]:
if periph not in self.csr.locs.keys():
self.logger.error("BIOS needs {} peripheral to be {}.".format(
colorer(periph),

View File

@ -39,6 +39,7 @@ static unsigned short seed_to_data_16(unsigned short seed, int random)
return random ? lfsr(16, seed) : seed + 1;
}
#ifdef CSR_CTRL_BASE
int memtest_access(unsigned int *addr)
{
volatile unsigned int *array = addr;
@ -59,6 +60,7 @@ int memtest_access(unsigned int *addr)
return 0;
}
#endif
int memtest_bus(unsigned int *addr, unsigned long size)
{
@ -283,8 +285,10 @@ int memtest(unsigned int *addr, unsigned long maxsize)
print_size(data_size);
printf(")...\n");
#ifdef CSR_CTRL_BASE
if (memtest_access(addr))
return 0;
#endif
bus_errors = memtest_bus(addr, bus_size);
addr_errors = memtest_addr(addr, addr_size, MEMTEST_ADDR_RANDOM);