forked from M-Labs/artiq
1
0
Fork 0

generate MAILBOX_BASE with SoC and use it in runtime

to avoid possible future mismatches between SoC/runtime, constants that can be easily generated from SoC should be defined this way.
This commit is contained in:
Florent Kermarrec 2015-04-15 09:55:24 +02:00 committed by Sebastien Bourdeauducq
parent 30dffb6644
commit fd2def4951
2 changed files with 3 additions and 1 deletions

View File

@ -2,10 +2,11 @@
#include <system.h> #include <system.h>
#include <spr-defs.h> #include <spr-defs.h>
#include <hw/common.h> #include <hw/common.h>
#include <generated/mem.h>
#include "mailbox.h" #include "mailbox.h"
#define KERNELCPU_MAILBOX MMPTR(0xf0000000) #define KERNELCPU_MAILBOX MMPTR(MAILBOX_BASE)
static unsigned int last_transmission; static unsigned int last_transmission;

View File

@ -125,6 +125,7 @@ class AMP(_Peripherals):
self.submodules.mailbox = amp.Mailbox() self.submodules.mailbox = amp.Mailbox()
self.add_wb_slave(mem_decoder(self.mem_map["mailbox"]), self.mailbox.i1) self.add_wb_slave(mem_decoder(self.mem_map["mailbox"]), self.mailbox.i1)
self.kernel_cpu.add_wb_slave(mem_decoder(self.mem_map["mailbox"]), self.mailbox.i2) self.kernel_cpu.add_wb_slave(mem_decoder(self.mem_map["mailbox"]), self.mailbox.i2)
self.add_memory_region("mailbox", self.mem_map["mailbox"] + 0x80000000, 4)
rtio_csrs = self.rtio.get_kernel_csrs() rtio_csrs = self.rtio.get_kernel_csrs()
self.submodules.rtiowb = wbgen.Bank(rtio_csrs) self.submodules.rtiowb = wbgen.Bank(rtio_csrs)