Commit 3c276b27032f53bef478f9a2c05fd6923ad560bf

Authored by Bin Meng
Committed by Andes
1 parent 39cad5bc0b

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>

Showing 1 changed file with 0 additions and 37 deletions Side-by-side Diff

arch/riscv/cpu/cpu.c
... ... @@ -14,46 +14,9 @@
14 14 */
15 15 phys_addr_t prior_stage_fdt_address __attribute__((section(".data")));
16 16  
17   -enum {
18   - ISA_INVALID = 0,
19   - ISA_32BIT,
20   - ISA_64BIT,
21   - ISA_128BIT
22   -};
23   -
24   -static const char * const isa_bits[] = {
25   - [ISA_INVALID] = NULL,
26   - [ISA_32BIT] = "32",
27   - [ISA_64BIT] = "64",
28   - [ISA_128BIT] = "128"
29   -};
30   -
31 17 static inline bool supports_extension(char ext)
32 18 {
33 19 return csr_read(misa) & (1 << (ext - 'a'));
34   -}
35   -
36   -int print_cpuinfo(void)
37   -{
38   - char name[32];
39   - char *s = name;
40   - int bit;
41   -
42   - s += sprintf(name, "rv");
43   - bit = csr_read(misa) >> (sizeof(long) * 8 - 2);
44   - s += sprintf(s, isa_bits[bit]);
45   -
46   - supports_extension('i') ? *s++ = 'i' : 'r';
47   - supports_extension('m') ? *s++ = 'm' : 'i';
48   - supports_extension('a') ? *s++ = 'a' : 's';
49   - supports_extension('f') ? *s++ = 'f' : 'c';
50   - supports_extension('d') ? *s++ = 'd' : '-';
51   - supports_extension('c') ? *s++ = 'c' : 'v';
52   - *s++ = '\0';
53   -
54   - printf("CPU: %s\n", name);
55   -
56   - return 0;
57 20 }
58 21  
59 22 static int riscv_cpu_probe(void)