nios2: Add CDX support

Add support for the CDX Code Density Extensions present in
Nios II R2 . This introduces new 16bit instruction set to
improve code density while retaining support for the 32bit
Nios II R2 instructions.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Ley Foon Tan <lftan@altera.com>
このコミットが含まれているのは:
Marek Vasut
2017-04-19 13:19:02 +02:00
committed by Ley Foon Tan
コミット edebea9877
4個のファイルの変更19行の追加2行の削除

ファイルの表示

@@ -68,6 +68,7 @@ void __init setup_cpuinfo(void)
cpuinfo.has_mul = of_property_read_bool(cpu, "altr,has-mul");
cpuinfo.has_mulx = of_property_read_bool(cpu, "altr,has-mulx");
cpuinfo.has_bmx = of_property_read_bool(cpu, "altr,has-bmx");
cpuinfo.has_cdx = of_property_read_bool(cpu, "altr,has-cdx");
cpuinfo.mmu = of_property_read_bool(cpu, "altr,has-mmu");
if (IS_ENABLED(CONFIG_NIOS2_HW_DIV_SUPPORT) && !cpuinfo.has_div)
@@ -82,6 +83,9 @@ void __init setup_cpuinfo(void)
if (IS_ENABLED(CONFIG_NIOS2_BMX_SUPPORT) && !cpuinfo.has_bmx)
err_cpu("BMX");
if (IS_ENABLED(CONFIG_NIOS2_CDX_SUPPORT) && !cpuinfo.has_cdx)
err_cpu("CDX");
cpuinfo.tlb_num_ways = fcpu(cpu, "altr,tlb-num-ways");
if (!cpuinfo.tlb_num_ways)
panic("altr,tlb-num-ways can't be 0. Please check your hardware "
@@ -148,11 +152,13 @@ static int show_cpuinfo(struct seq_file *m, void *v)
" MUL:\t\t%s\n"
" MULX:\t\t%s\n"
" DIV:\t\t%s\n"
" BMX:\t\t%s\n",
" BMX:\t\t%s\n"
" CDX:\t\t%s\n",
cpuinfo.has_mul ? "yes" : "no",
cpuinfo.has_mulx ? "yes" : "no",
cpuinfo.has_div ? "yes" : "no",
cpuinfo.has_bmx ? "yes" : "no");
cpuinfo.has_bmx ? "yes" : "no",
cpuinfo.has_cdx ? "yes" : "no");
seq_printf(m,
"Icache:\t\t%ukB, line length: %u\n",