firmware: Use CSR_<FOO> instead of <foo> for csr*

Some older toolchains may not have all the csr's defined. Update all
the csr functions to use the CSR_ #define values instead of the
toolchain defined values.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
Atish Patra
2019-02-13 11:03:53 -08:00
committed by Anup Patel
parent 28d1dd2430
commit 35e617385f
2 changed files with 20 additions and 19 deletions

View File

@@ -7,6 +7,7 @@
* Anup Patel <anup.patel@wdc.com>
*/
#include <sbi/riscv_encoding.h>
#define __ASM_STR(x) x
#if __riscv_xlen == 64
@@ -48,12 +49,12 @@ _bss_zero:
_start_warm:
/* Disable and clear all interrupts */
csrw sie, zero
csrw sip, zero
csrw CSR_SIE, zero
csrw CSR_SIP, zero
/* Setup exception vectors */
la a3, _start_hang
csrw stvec, a3
csrw CSR_STVEC, a3
/* Setup stack */
la a3, _payload_end