From ac551e3492fe7bf9b4e087f8ee454108c5098c6d Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Tue, 24 May 2016 11:45:11 +0200 Subject: [PATCH] microblaze: Move MSR instruction selection to Kconfig Select MSR instructions via Kconfig instead of xparameters.h. Signed-off-by: Michal Simek --- arch/microblaze/include/asm/asm.h | 2 +- board/xilinx/microblaze-generic/Kconfig | 4 ++++ board/xilinx/microblaze-generic/xparameters.h | 1 - configs/microblaze-generic_defconfig | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/microblaze/include/asm/asm.h b/arch/microblaze/include/asm/asm.h index 11f3dd0f0e..94f0562759 100644 --- a/arch/microblaze/include/asm/asm.h +++ b/arch/microblaze/include/asm/asm.h @@ -50,7 +50,7 @@ #define NOP __asm__ __volatile__ ("nop"); /* use machine status registe USE_MSR_REG */ -#if XILINX_USE_MSR_INSTR == 1 +#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR == 1 #define MSRSET(val) \ __asm__ __volatile__ ("msrset r0," #val ); diff --git a/board/xilinx/microblaze-generic/Kconfig b/board/xilinx/microblaze-generic/Kconfig index c8b11ca82e..02ac65c1d3 100644 --- a/board/xilinx/microblaze-generic/Kconfig +++ b/board/xilinx/microblaze-generic/Kconfig @@ -9,6 +9,10 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "microblaze-generic" +config XILINX_MICROBLAZE0_USE_MSR_INSTR + int "USE_MSR_INSTR range (0:1)" + default 0 + config XILINX_MICROBLAZE0_USE_PCMP_INSTR int "USE_PCMP_INSTR range (0:1)" default 0 diff --git a/board/xilinx/microblaze-generic/xparameters.h b/board/xilinx/microblaze-generic/xparameters.h index dc5645bd14..ee7d0875d2 100644 --- a/board/xilinx/microblaze-generic/xparameters.h +++ b/board/xilinx/microblaze-generic/xparameters.h @@ -14,7 +14,6 @@ #define XILINX_BOARD_NAME microblaze-generic /* Microblaze is microblaze_0 */ -#define XILINX_USE_MSR_INSTR 1 #define XILINX_FSL_NUMBER 3 /* GPIO is LEDs_4Bit*/ diff --git a/configs/microblaze-generic_defconfig b/configs/microblaze-generic_defconfig index 7e53b5e450..2ef713fee3 100644 --- a/configs/microblaze-generic_defconfig +++ b/configs/microblaze-generic_defconfig @@ -2,6 +2,7 @@ CONFIG_MICROBLAZE=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_DM=y CONFIG_TARGET_MICROBLAZE_GENERIC=y +CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1 CONFIG_XILINX_MICROBLAZE0_USE_DIV=1 CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=1 -- 2.25.1