mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 04:46:01 +01:00
microblaze: cache: improve icache Kconfig options
Replace CONFIG_ICACHE with a Kconfig option more limited in scope - XILINX_MICROBLAZE0_USE_WIC. It should be enabled if the processor supports the "wic" (Write to Instruction Cache) instruction. It will be used to guard "wic" invocations in microblaze cache code. Signed-off-by: Ovidiu Panait <ovpanait@gmail.com> Link: https://lore.kernel.org/r/20220531181435.3473549-6-ovpanait@gmail.com Signed-off-by: Michal Simek <michal.simek@amd.com>
This commit is contained in:
parent
ef0a592ae8
commit
8daf89678e
@ -39,10 +39,6 @@ config TARGET_MICROBLAZE_GENERIC
|
|||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
config ICACHE
|
|
||||||
bool "Enable icache support"
|
|
||||||
default y
|
|
||||||
|
|
||||||
source "board/xilinx/Kconfig"
|
source "board/xilinx/Kconfig"
|
||||||
source "board/xilinx/microblaze-generic/Kconfig"
|
source "board/xilinx/microblaze-generic/Kconfig"
|
||||||
|
|
||||||
|
@ -58,14 +58,14 @@ void flush_cache(ulong addr, ulong size)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < size; i += 4) {
|
for (i = 0; i < size; i += 4) {
|
||||||
asm volatile (
|
if (CONFIG_IS_ENABLED(XILINX_MICROBLAZE0_USE_WIC)) {
|
||||||
#ifdef CONFIG_ICACHE
|
asm volatile (
|
||||||
"wic %0, r0;"
|
"wic %0, r0;"
|
||||||
#endif
|
|
||||||
"nop;"
|
"nop;"
|
||||||
:
|
:
|
||||||
: "r" (addr + i)
|
: "r" (addr + i)
|
||||||
: "memory");
|
: "memory");
|
||||||
|
}
|
||||||
|
|
||||||
if (CONFIG_IS_ENABLED(XILINX_MICROBLAZE0_USE_WDC)) {
|
if (CONFIG_IS_ENABLED(XILINX_MICROBLAZE0_USE_WDC)) {
|
||||||
asm volatile (
|
asm volatile (
|
||||||
|
@ -74,4 +74,15 @@ config SPL_XILINX_MICROBLAZE0_USE_WDC
|
|||||||
bool
|
bool
|
||||||
default XILINX_MICROBLAZE0_USE_WDC
|
default XILINX_MICROBLAZE0_USE_WDC
|
||||||
|
|
||||||
|
config XILINX_MICROBLAZE0_USE_WIC
|
||||||
|
bool "MicroBlaze wic instruction support"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Enable this option if the MicroBlaze processor is configured with
|
||||||
|
support for the "wic" (Write to Instruction Cache) instruction.
|
||||||
|
|
||||||
|
config SPL_XILINX_MICROBLAZE0_USE_WIC
|
||||||
|
bool
|
||||||
|
default XILINX_MICROBLAZE0_USE_WIC
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user