Lines Matching refs:cpuinfo
17 struct cpuinfo cpuinfo; variable
46 cpuinfo.cpu_clock_freq = fcpu(cpu, "clock-frequency"); in setup_cpuinfo()
50 strlcpy(cpuinfo.cpu_impl, str, sizeof(cpuinfo.cpu_impl)); in setup_cpuinfo()
52 strcpy(cpuinfo.cpu_impl, "<unknown>"); in setup_cpuinfo()
54 cpuinfo.has_div = of_property_read_bool(cpu, "altr,has-div"); in setup_cpuinfo()
55 cpuinfo.has_mul = of_property_read_bool(cpu, "altr,has-mul"); in setup_cpuinfo()
56 cpuinfo.has_mulx = of_property_read_bool(cpu, "altr,has-mulx"); in setup_cpuinfo()
57 cpuinfo.has_bmx = of_property_read_bool(cpu, "altr,has-bmx"); in setup_cpuinfo()
58 cpuinfo.has_cdx = of_property_read_bool(cpu, "altr,has-cdx"); in setup_cpuinfo()
59 cpuinfo.mmu = of_property_read_bool(cpu, "altr,has-mmu"); in setup_cpuinfo()
61 if (IS_ENABLED(CONFIG_NIOS2_HW_DIV_SUPPORT) && !cpuinfo.has_div) in setup_cpuinfo()
64 if (IS_ENABLED(CONFIG_NIOS2_HW_MUL_SUPPORT) && !cpuinfo.has_mul) in setup_cpuinfo()
67 if (IS_ENABLED(CONFIG_NIOS2_HW_MULX_SUPPORT) && !cpuinfo.has_mulx) in setup_cpuinfo()
70 if (IS_ENABLED(CONFIG_NIOS2_BMX_SUPPORT) && !cpuinfo.has_bmx) in setup_cpuinfo()
73 if (IS_ENABLED(CONFIG_NIOS2_CDX_SUPPORT) && !cpuinfo.has_cdx) in setup_cpuinfo()
76 cpuinfo.tlb_num_ways = fcpu(cpu, "altr,tlb-num-ways"); in setup_cpuinfo()
77 if (!cpuinfo.tlb_num_ways) in setup_cpuinfo()
80 cpuinfo.icache_line_size = fcpu(cpu, "icache-line-size"); in setup_cpuinfo()
81 cpuinfo.icache_size = fcpu(cpu, "icache-size"); in setup_cpuinfo()
82 if (CONFIG_NIOS2_ICACHE_SIZE != cpuinfo.icache_size) in setup_cpuinfo()
86 CONFIG_NIOS2_ICACHE_SIZE, cpuinfo.icache_size); in setup_cpuinfo()
88 cpuinfo.dcache_line_size = fcpu(cpu, "dcache-line-size"); in setup_cpuinfo()
89 if (CONFIG_NIOS2_DCACHE_LINE_SIZE != cpuinfo.dcache_line_size) in setup_cpuinfo()
93 CONFIG_NIOS2_DCACHE_LINE_SIZE, cpuinfo.dcache_line_size); in setup_cpuinfo()
94 cpuinfo.dcache_size = fcpu(cpu, "dcache-size"); in setup_cpuinfo()
95 if (CONFIG_NIOS2_DCACHE_SIZE != cpuinfo.dcache_size) in setup_cpuinfo()
99 CONFIG_NIOS2_DCACHE_SIZE, cpuinfo.dcache_size); in setup_cpuinfo()
101 cpuinfo.tlb_pid_num_bits = fcpu(cpu, "altr,pid-num-bits"); in setup_cpuinfo()
102 cpuinfo.tlb_num_ways_log2 = ilog2(cpuinfo.tlb_num_ways); in setup_cpuinfo()
103 cpuinfo.tlb_num_entries = fcpu(cpu, "altr,tlb-num-entries"); in setup_cpuinfo()
104 cpuinfo.tlb_num_lines = cpuinfo.tlb_num_entries / cpuinfo.tlb_num_ways; in setup_cpuinfo()
105 cpuinfo.tlb_ptr_sz = fcpu(cpu, "altr,tlb-ptr-sz"); in setup_cpuinfo()
107 cpuinfo.reset_addr = fcpu(cpu, "altr,reset-addr"); in setup_cpuinfo()
108 cpuinfo.exception_addr = fcpu(cpu, "altr,exception-addr"); in setup_cpuinfo()
109 cpuinfo.fast_tlb_miss_exc_addr = fcpu(cpu, "altr,fast-tlb-miss-addr"); in setup_cpuinfo()
121 const u32 clockfreq = cpuinfo.cpu_clock_freq; in show_cpuinfo()
131 cpuinfo.cpu_impl, in show_cpuinfo()
133 cpuinfo.mmu ? "present" : "none", in show_cpuinfo()
146 cpuinfo.has_mul ? "yes" : "no", in show_cpuinfo()
147 cpuinfo.has_mulx ? "yes" : "no", in show_cpuinfo()
148 cpuinfo.has_div ? "yes" : "no", in show_cpuinfo()
149 cpuinfo.has_bmx ? "yes" : "no", in show_cpuinfo()
150 cpuinfo.has_cdx ? "yes" : "no"); in show_cpuinfo()
154 cpuinfo.icache_size >> 10, in show_cpuinfo()
155 cpuinfo.icache_line_size); in show_cpuinfo()
159 cpuinfo.dcache_size >> 10, in show_cpuinfo()
160 cpuinfo.dcache_line_size); in show_cpuinfo()
164 cpuinfo.tlb_num_ways, in show_cpuinfo()
165 cpuinfo.tlb_num_entries, in show_cpuinfo()
166 cpuinfo.tlb_pid_num_bits); in show_cpuinfo()