diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2018-12-12 06:12:35 -0800 |
---|---|---|
committer | Andes <uboot@andestech.com> | 2018-12-18 09:56:27 +0800 |
commit | 3c276b27032f53bef478f9a2c05fd6923ad560bf (patch) | |
tree | 2c5c2de7b85fc972a1e66f0485337815fa3d3be1 /arch/riscv/cpu | |
parent | 39cad5bc0b36fca721416c28d1948c4805760f33 (diff) |
riscv: Remove non-DM version of print_cpuinfo()
With DM CPU driver, the non-DM version of print_cpuinfo() is no
longer needed.
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>
Diffstat (limited to 'arch/riscv/cpu')
-rw-r--r-- | arch/riscv/cpu/cpu.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c index 8286a0c959..d3c59da34b 100644 --- a/arch/riscv/cpu/cpu.c +++ b/arch/riscv/cpu/cpu.c @@ -14,48 +14,11 @@ */ phys_addr_t prior_stage_fdt_address __attribute__((section(".data"))); -enum { - ISA_INVALID = 0, - ISA_32BIT, - ISA_64BIT, - ISA_128BIT -}; - -static const char * const isa_bits[] = { - [ISA_INVALID] = NULL, - [ISA_32BIT] = "32", - [ISA_64BIT] = "64", - [ISA_128BIT] = "128" -}; - static inline bool supports_extension(char ext) { return csr_read(misa) & (1 << (ext - 'a')); } -int print_cpuinfo(void) -{ - char name[32]; - char *s = name; - int bit; - - s += sprintf(name, "rv"); - bit = csr_read(misa) >> (sizeof(long) * 8 - 2); - s += sprintf(s, isa_bits[bit]); - - supports_extension('i') ? *s++ = 'i' : 'r'; - supports_extension('m') ? *s++ = 'm' : 'i'; - supports_extension('a') ? *s++ = 'a' : 's'; - supports_extension('f') ? *s++ = 'f' : 'c'; - supports_extension('d') ? *s++ = 'd' : '-'; - supports_extension('c') ? *s++ = 'c' : 'v'; - *s++ = '\0'; - - printf("CPU: %s\n", name); - - return 0; -} - static int riscv_cpu_probe(void) { #ifdef CONFIG_CPU |