[PATCH v2 3/6] riscv: lib: introduce cache_init interface