All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: ax25: cache: Remove SPL_RISCV_MMODE config check
@ 2020-03-14  8:46 Pragnesh Patel
  2020-03-14  9:11 ` Bin Meng
  0 siblings, 1 reply; 3+ messages in thread
From: Pragnesh Patel @ 2020-03-14  8:46 UTC (permalink / raw)
  To: u-boot

CONFIG_IS_ENABLED(FOO) will check FOO config option for U-boot proper,
SPL and TPL, so remove unnecessary CONFIG_IS_ENABLED()

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
---
 arch/riscv/cpu/ax25/cache.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/riscv/cpu/ax25/cache.c b/arch/riscv/cpu/ax25/cache.c
index 9f424198b4..9df629d23c 100644
--- a/arch/riscv/cpu/ax25/cache.c
+++ b/arch/riscv/cpu/ax25/cache.c
@@ -12,7 +12,7 @@
 #include <asm/csr.h>
 
 #ifdef CONFIG_RISCV_NDS_CACHE
-#if CONFIG_IS_ENABLED(RISCV_MMODE) || CONFIG_IS_ENABLED(SPL_RISCV_MMODE)
+#if CONFIG_IS_ENABLED(RISCV_MMODE)
 /* mcctlcommand */
 #define CCTL_REG_MCCTLCOMMAND_NUM	0x7cc
 
@@ -47,7 +47,7 @@ void flush_dcache_all(void)
 {
 #if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
 #ifdef CONFIG_RISCV_NDS_CACHE
-#if CONFIG_IS_ENABLED(RISCV_MMODE) || CONFIG_IS_ENABLED(SPL_RISCV_MMODE)
+#if CONFIG_IS_ENABLED(RISCV_MMODE)
 	csr_write(CCTL_REG_MCCTLCOMMAND_NUM, CCTL_L1D_WBINVAL_ALL);
 #endif
 #endif
@@ -68,7 +68,7 @@ void icache_enable(void)
 {
 #if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
 #ifdef CONFIG_RISCV_NDS_CACHE
-#if CONFIG_IS_ENABLED(RISCV_MMODE) || CONFIG_IS_ENABLED(SPL_RISCV_MMODE)
+#if CONFIG_IS_ENABLED(RISCV_MMODE)
 	asm volatile (
 		"csrr t1, mcache_ctl\n\t"
 		"ori t0, t1, 0x1\n\t"
@@ -83,7 +83,7 @@ void icache_disable(void)
 {
 #if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
 #ifdef CONFIG_RISCV_NDS_CACHE
-#if CONFIG_IS_ENABLED(RISCV_MMODE) || CONFIG_IS_ENABLED(SPL_RISCV_MMODE)
+#if CONFIG_IS_ENABLED(RISCV_MMODE)
 	asm volatile (
 		"fence.i\n\t"
 		"csrr t1, mcache_ctl\n\t"
@@ -99,7 +99,7 @@ void dcache_enable(void)
 {
 #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
 #ifdef CONFIG_RISCV_NDS_CACHE
-#if CONFIG_IS_ENABLED(RISCV_MMODE) || CONFIG_IS_ENABLED(SPL_RISCV_MMODE)
+#if CONFIG_IS_ENABLED(RISCV_MMODE)
 	asm volatile (
 		"csrr t1, mcache_ctl\n\t"
 		"ori t0, t1, 0x2\n\t"
@@ -117,7 +117,7 @@ void dcache_disable(void)
 {
 #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
 #ifdef CONFIG_RISCV_NDS_CACHE
-#if CONFIG_IS_ENABLED(RISCV_MMODE) || CONFIG_IS_ENABLED(SPL_RISCV_MMODE)
+#if CONFIG_IS_ENABLED(RISCV_MMODE)
 	csr_write(CCTL_REG_MCCTLCOMMAND_NUM, CCTL_L1D_WBINVAL_ALL);
 	asm volatile (
 		"csrr t1, mcache_ctl\n\t"
@@ -137,7 +137,7 @@ int icache_status(void)
 	int ret = 0;
 
 #ifdef CONFIG_RISCV_NDS_CACHE
-#if CONFIG_IS_ENABLED(RISCV_MMODE) || CONFIG_IS_ENABLED(SPL_RISCV_MMODE)
+#if CONFIG_IS_ENABLED(RISCV_MMODE)
 	asm volatile (
 		"csrr t1, mcache_ctl\n\t"
 		"andi	%0, t1, 0x01\n\t"
@@ -156,7 +156,7 @@ int dcache_status(void)
 	int ret = 0;
 
 #ifdef CONFIG_RISCV_NDS_CACHE
-#if CONFIG_IS_ENABLED(RISCV_MMODE) || CONFIG_IS_ENABLED(SPL_RISCV_MMODE)
+#if CONFIG_IS_ENABLED(RISCV_MMODE)
 	asm volatile (
 		"csrr t1, mcache_ctl\n\t"
 		"andi	%0, t1, 0x02\n\t"
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] riscv: ax25: cache: Remove SPL_RISCV_MMODE config check
  2020-03-14  8:46 [PATCH] riscv: ax25: cache: Remove SPL_RISCV_MMODE config check Pragnesh Patel
@ 2020-03-14  9:11 ` Bin Meng
  2020-03-14 10:47   ` Pragnesh Patel
  0 siblings, 1 reply; 3+ messages in thread
From: Bin Meng @ 2020-03-14  9:11 UTC (permalink / raw)
  To: u-boot

On Sat, Mar 14, 2020 at 4:48 PM Pragnesh Patel
<pragnesh.patel@sifive.com> wrote:
>
> CONFIG_IS_ENABLED(FOO) will check FOO config option for U-boot proper,

nits: U-Boot

> SPL and TPL, so remove unnecessary CONFIG_IS_ENABLED()
>
> Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
> ---
>  arch/riscv/cpu/ax25/cache.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] riscv: ax25: cache: Remove SPL_RISCV_MMODE config check
  2020-03-14  9:11 ` Bin Meng
@ 2020-03-14 10:47   ` Pragnesh Patel
  0 siblings, 0 replies; 3+ messages in thread
From: Pragnesh Patel @ 2020-03-14 10:47 UTC (permalink / raw)
  To: u-boot

Hi,

>-----Original Message-----
>From: Bin Meng <bmeng.cn@gmail.com>
>Sent: 14 March 2020 14:41
>To: Pragnesh Patel <pragnesh.patel@sifive.com>
>Cc: U-Boot Mailing List <u-boot@lists.denx.de>; Atish Patra
><atish.patra@wdc.com>; Palmer Dabbelt <palmerdabbelt@google.com>; Paul
>Walmsley <paul.walmsley@sifive.com>; Rick Chen <rick@andestech.com>;
>Simon Glass <sjg@chromium.org>; Alexey Brodkin
><abrodkin@synopsys.com>; Trevor Woerner <trevor@toganlabs.com>
>Subject: Re: [PATCH] riscv: ax25: cache: Remove SPL_RISCV_MMODE config
>check
>
>On Sat, Mar 14, 2020 at 4:48 PM Pragnesh Patel <pragnesh.patel@sifive.com>
>wrote:
>>
>> CONFIG_IS_ENABLED(FOO) will check FOO config option for U-boot proper,
>
>nits: U-Boot

Will update in v2.

>
>> SPL and TPL, so remove unnecessary CONFIG_IS_ENABLED()
>>
>> Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
>> ---
>>  arch/riscv/cpu/ax25/cache.c | 16 ++++++++--------
>>  1 file changed, 8 insertions(+), 8 deletions(-)
>>
>
>Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-14 10:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-14  8:46 [PATCH] riscv: ax25: cache: Remove SPL_RISCV_MMODE config check Pragnesh Patel
2020-03-14  9:11 ` Bin Meng
2020-03-14 10:47   ` Pragnesh Patel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.