riscv: Use STRINGIFY for CSR helpers
We usually want to be able to access CSR using:
1. the explicit name of the register:
csr_read(mstatus);
2. the numeric equivalent of the register:
csr_read(0xB00);
3. the numeric equivalent of the register using some defines:
#define REG 0xB00
csr_read(REG)
Currently Zephyr only allows the first two cases, throwing an error when
trying to use the case 3.
Fix this and support all the cases by forcing the CSR helpers to use the
STRINGIFY() macro.
Signed-off-by:
Carlo Caione <ccaione@baylibre.com>
Loading
Please sign in to comment