riscv: Update supports_extension() to use desc from cpu driver
authorBin Meng <bmeng.cn@gmail.com>
Wed, 12 Dec 2018 14:12:38 +0000 (06:12 -0800)
committerAndes <uboot@andestech.com>
Tue, 18 Dec 2018 01:56:27 +0000 (09:56 +0800)
commitaef59e5cc450f403478f799bbb0f0647ff28a3c3
treea8dd18c0e493e9614a4e7331dd832d945ad963de
parent3967156464282df161f5e4be40999dae47adf799
riscv: Update supports_extension() to use desc from cpu driver

This updates supports_extension() implementation to use the desc
string from the cpu driver whenever possible, which avoids the
reading of misa CSR for S-mode U-Boot.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Anup Patel <anup@brainfault.org>
arch/riscv/cpu/cpu.c