soc: Don't update CSR alignment when there is no CPU

The alignment specified by the standalone core config should
be honored.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Benjamin Herrenschmidt 2020-05-12 21:31:23 +10:00
parent f28f247130
commit ecbd40284a
1 changed files with 7 additions and 1 deletions

View File

@ -781,7 +781,13 @@ class SoC(Module):
for n, (origin, size) in enumerate(self.cpu.io_regions.items()):
self.bus.add_region("io{}".format(n), SoCIORegion(origin=origin, size=size, cached=False))
self.mem_map.update(self.cpu.mem_map) # FIXME
self.csr.update_alignment(self.cpu.data_width)
# We don't want the CSR alignemnt reduced from 64-bit to 32-bit on
# a standalone system with a 64-bit WB and no CPU.
# Should we instead only update alignment if the CPU is *bigger*
# than the CSR ?
if name != "None":
self.csr.update_alignment(self.cpu.data_width)
# Add Bus Masters/CSR/IRQs
if not isinstance(self.cpu, cpu.CPUNone):
if reset_address is None: