Skip to content

Commit

Permalink
platform: Enable U-Mode access by update spmpcfg0 and spmpaddr0
Browse files Browse the repository at this point in the history
Signed-off-by: Huaqi Fang <578567190@qq.com>
  • Loading branch information
fanghuaqi committed Oct 10, 2020
1 parent 4378320 commit 1d28050
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions platform/nuclei/ux600/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ static int ux600_early_init(bool cold_boot)
regval = readl((void *)(UX600_GPIO_ADDR + UX600_GPIO_IOF_EN_OFS)) |
UX600_GPIO_IOF_UART0_MASK;
writel(regval, (void *)(UX600_GPIO_ADDR + UX600_GPIO_IOF_EN_OFS));

return 0;
}

Expand All @@ -136,6 +137,10 @@ static int ux600_final_init(bool cold_boot)
fdt = sbi_scratch_thishart_arg1_ptr();
ux600_modify_dt(fdt);

// Enable U-Mode to access all regions by setting spmpcfg0 and spmpaddr0
csr_write(0x1a0, 0x1f);
csr_write(0x1b0, 0xffffffff);

return 0;
}

Expand Down

0 comments on commit 1d28050

Please sign in to comment.