Rick Chen <[email protected]> 於 2019年7月18日 週四 上午11:25寫道: > > > > From: Bin Meng [mailto:[email protected]] > > > Sent: Thursday, July 11, 2019 2:43 PM > > > To: Rick Jian-Zhi Chen(陳建志); Anup Patel; Lukas Auer; U-Boot Mailing List > > > Subject: [PATCH 2/2] riscv: Access CSRs using CSR numbers > > > > > > We should prefer accessing CSRs using their CSR numbers > > > because: > > > 1. It compiles fine with older toolchains. > > > 2. We can use latest CSR names in #define macro names of CSR > > > numbers as-per RISC-V spec. > > > 3. We can access newly added CSRs even if toolchain does not > > > recognize newly added CSRs by name. > > > > > > This commit is inspired from Linux kernel commit a3182c91ef4e > > > ("RISC-V: Access CSRs using CSR numbers"). > > > > > > Signed-off-by: Bin Meng <[email protected]> > > > --- > > > > > > arch/riscv/cpu/cpu.c | 9 +- > > > arch/riscv/cpu/start.S | 3 +- > > > arch/riscv/include/asm/csr.h | 12 ++ > > > arch/riscv/include/asm/encoding.h | 238 > > > +------------------------------------- > > > 4 files changed, 19 insertions(+), 243 deletions(-) > > >
Applied to u-boot-riscv/master, thanks! Rick _______________________________________________ U-Boot mailing list [email protected] https://lists.denx.de/listinfo/u-boot

