diff options
author | Marek Vasut <marex@denx.de> | 2017-04-19 13:19:01 +0200 |
---|---|---|
committer | Ley Foon Tan <ley.foon.tan@intel.com> | 2017-05-08 16:59:19 +0800 |
commit | 23460839b983d5d8d47fe90f341599f66523dd81 (patch) | |
tree | 8e123c504595afe9e5463b9c88a35a7988f7d7ae /arch/nios2/kernel | |
parent | a89988a6e00c5a099ee23619cd91dc8dc7ec9328 (diff) | |
download | linux-23460839b983d5d8d47fe90f341599f66523dd81.tar.gz linux-23460839b983d5d8d47fe90f341599f66523dd81.tar.bz2 linux-23460839b983d5d8d47fe90f341599f66523dd81.zip |
nios2: Add BMX support
Add support for the BMX Bit Manipulation Extensions present in
Nios II R2 . This introduces three new instructions, EXTRACT,
INSERT and MERGE.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Ley Foon Tan <lftan@altera.com>
Diffstat (limited to 'arch/nios2/kernel')
-rw-r--r-- | arch/nios2/kernel/cpuinfo.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/nios2/kernel/cpuinfo.c b/arch/nios2/kernel/cpuinfo.c index b4a6242b0f1c..4c84fec34882 100644 --- a/arch/nios2/kernel/cpuinfo.c +++ b/arch/nios2/kernel/cpuinfo.c @@ -67,6 +67,7 @@ void __init setup_cpuinfo(void) cpuinfo.has_div = of_property_read_bool(cpu, "altr,has-div"); 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.mmu = of_property_read_bool(cpu, "altr,has-mmu"); if (IS_ENABLED(CONFIG_NIOS2_HW_DIV_SUPPORT) && !cpuinfo.has_div) @@ -78,6 +79,9 @@ void __init setup_cpuinfo(void) if (IS_ENABLED(CONFIG_NIOS2_HW_MULX_SUPPORT) && !cpuinfo.has_mulx) err_cpu("MULX"); + if (IS_ENABLED(CONFIG_NIOS2_BMX_SUPPORT) && !cpuinfo.has_bmx) + err_cpu("BMX"); + 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 " @@ -143,10 +147,12 @@ static int show_cpuinfo(struct seq_file *m, void *v) "HW:\n" " MUL:\t\t%s\n" " MULX:\t\t%s\n" - " DIV:\t\t%s\n", + " DIV:\t\t%s\n" + " BMX:\t\t%s\n", cpuinfo.has_mul ? "yes" : "no", cpuinfo.has_mulx ? "yes" : "no", - cpuinfo.has_div ? "yes" : "no"); + cpuinfo.has_div ? "yes" : "no", + cpuinfo.has_bmx ? "yes" : "no"); seq_printf(m, "Icache:\t\t%ukB, line length: %u\n", |