11 #include <linux/kernel.h>
13 #include <linux/string.h>
14 #include <asm/cpuinfo.h>
17 static const char family_string[] = CONFIG_XILINX_MICROBLAZE0_FAMILY;
18 static const char cpu_ver_string[] = CONFIG_XILINX_MICROBLAZE0_HW_VER;
20 #define err_printk(x) \
21 early_printk("ERROR: Microblaze " x "-different for kernel and DTS\n");
32 if (CONFIG_XILINX_MICROBLAZE0_USE_BARREL)
34 if (CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR)
36 if (CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR)
38 if (CONFIG_XILINX_MICROBLAZE0_USE_DIV)
43 ci->
use_mult = fcpu(cpu,
"xlnx,use-hw-mul");
44 if (ci->
use_mult != CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL)
51 ci->
use_fpu = fcpu(cpu,
"xlnx,use-fpu");
52 if (ci->
use_fpu != CONFIG_XILINX_MICROBLAZE0_USE_FPU)
59 (fcpu(cpu,
"xlnx,unaligned-exceptions") ?
61 (fcpu(cpu,
"xlnx,ill-opcode-exception") ?
63 (fcpu(cpu,
"xlnx,iopb-bus-exception") ?
65 (fcpu(cpu,
"xlnx,dopb-bus-exception") ?
67 (fcpu(cpu,
"xlnx,div-zero-exception") ?
77 if (fcpu(cpu,
"xlnx,icache-use-fsl"))
91 if (fcpu(cpu,
"xlnx,dcache-use-fsl"))
99 ci->
dcache_wb = fcpu(cpu,
"xlnx,dcache-use-writeback");
101 ci->
use_dopb = fcpu(cpu,
"xlnx,d-opb");
102 ci->
use_iopb = fcpu(cpu,
"xlnx,i-opb");
103 ci->
use_dlmb = fcpu(cpu,
"xlnx,d-lmb");
104 ci->
use_ilmb = fcpu(cpu,
"xlnx,i-lmb");
106 ci->
num_fsl = fcpu(cpu,
"xlnx,fsl-links");
107 ci->
irq_edge = fcpu(cpu,
"xlnx,interrupt-is-edge");
111 ci->
hw_debug = fcpu(cpu,
"xlnx,debug-enabled");
112 ci->
num_pc_brk = fcpu(cpu,
"xlnx,number-of-pc-brk");
113 ci->
num_rd_brk = fcpu(cpu,
"xlnx,number-of-rd-addr-brk");
114 ci->
num_wr_brk = fcpu(cpu,
"xlnx,number-of-wr-addr-brk");
118 ci->
pvr_user1 = fcpu(cpu,
"xlnx,pvr-user1");
119 ci->
pvr_user2 = fcpu(cpu,
"xlnx,pvr-user2");
121 ci->
mmu = fcpu(cpu,
"xlnx,use-mmu");
122 ci->
mmu_privins = fcpu(cpu,
"xlnx,mmu-privileged-instr");
123 ci->
endian = fcpu(cpu,
"xlnx,endianness");