diff options
author | Tzung-Bi Shih <tzungbi@chromium.org> | 2020-05-13 17:34:07 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-03 03:12:43 +0000 |
commit | 9cfae101b2e6959c5f32aee1293469e441c9413f (patch) | |
tree | 43413a49121edba49d459a75dd52e4ff4ad8d659 /chip/mt8192_scp | |
parent | 8fd3c3ef70dfd575fe91630a441a5364544dd239 (diff) | |
download | chrome-ec-9cfae101b2e6959c5f32aee1293469e441c9413f.tar.gz |
chip/mt8192_scp: add basic system settings
Settings include:
- default memmap
BRANCH=none
BUG=b:146213943
TEST=make BOARD=asurada_scp
Change-Id: I581a22527df579a815f895c6ba370e2e8bc0397d
Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2198819
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Diffstat (limited to 'chip/mt8192_scp')
-rw-r--r-- | chip/mt8192_scp/registers.h | 8 | ||||
-rw-r--r-- | chip/mt8192_scp/system.c | 32 |
2 files changed, 40 insertions, 0 deletions
diff --git a/chip/mt8192_scp/registers.h b/chip/mt8192_scp/registers.h index 9c27eb4f99..bcc4bb0eeb 100644 --- a/chip/mt8192_scp/registers.h +++ b/chip/mt8192_scp/registers.h @@ -13,4 +13,12 @@ #define DUMMY_GPIO_BANK 0 +#define SCP_REG_BASE 0x70000000 + +/* memory remap */ +#define SCP_R_REMAP_0X0123 REG32(SCP_REG_BASE + 0xA5060) +#define SCP_R_REMAP_0X4567 REG32(SCP_REG_BASE + 0xA5064) +#define SCP_R_REMAP_0X89AB REG32(SCP_REG_BASE + 0xA5068) +#define SCP_R_REMAP_0XCDEF REG32(SCP_REG_BASE + 0xA506C) + #endif /* __CROS_EC_REGISTERS_H */ diff --git a/chip/mt8192_scp/system.c b/chip/mt8192_scp/system.c index 044e6bc4e2..7a68209625 100644 --- a/chip/mt8192_scp/system.c +++ b/chip/mt8192_scp/system.c @@ -5,10 +5,42 @@ /* System : hardware specific implementation */ +#include "registers.h" #include "system.h" +static void scp_remap_init(void) +{ + /* + * external address SCP address + * + * 0x10000000 0x60000000 + * 0x20000000 0x70000000 + * 0x30000000 + * 0x40000000 + * 0x50000000 + * 0x60000000 0x10000000 + * 0x70000000 0xA0000000 + * 0x80000000 + * 0x90000000 0x80000000 + * 0xA0000000 0x90000000 + * 0xB0000000 + * 0xC0000000 0x80000000 + * 0xD0000000 0x20000000 + * 0xE0000000 0x30000000 + * 0xF0000000 0x50000000 + */ + SCP_R_REMAP_0X0123 = 0x00070600; + SCP_R_REMAP_0X4567 = 0x0A010000; + SCP_R_REMAP_0X89AB = 0x00090800; + SCP_R_REMAP_0XCDEF = 0x05030208; +} + void system_pre_init(void) { + scp_remap_init(); + /* Disable jump (it has only RW) and enable MPU. */ + /* TODO: implement MPU */ + system_disable_jump(); } void system_reset(int flags) |