diff mbox series

[2/7] m68k: Rename icache_invalid to invalidate_icache_all

Message ID 20240619212759.3456158-2-trini@konsulko.com
State Accepted
Commit 8f25b150651d45f3fe75ea19195fc6cc8169d0d2
Delegated to: Tom Rini
Headers show
Series [1/7] m68k: Implement a default flush_dcache_all | expand

Commit Message

Tom Rini June 19, 2024, 9:27 p.m. UTC
The implementation of icache_invalid appears to be doing what other
architectures call invalidate_icache_all so rename to match.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
Huan Wang <alison.wang@nxp.com>
Angelo Dureghello <angelo@kernel-space.org>
---
 arch/m68k/include/asm/cache.h | 1 -
 arch/m68k/lib/cache.c         | 6 +++---
 drivers/net/mcffec.c          | 5 +++--
 3 files changed, 6 insertions(+), 6 deletions(-)

Comments

Ilias Apalodimas June 20, 2024, 5:47 a.m. UTC | #1
On Thu, 20 Jun 2024 at 00:28, Tom Rini <trini@konsulko.com> wrote:
>
> The implementation of icache_invalid appears to be doing what other
> architectures call invalidate_icache_all so rename to match.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
> Huan Wang <alison.wang@nxp.com>
> Angelo Dureghello <angelo@kernel-space.org>
> ---
>  arch/m68k/include/asm/cache.h | 1 -
>  arch/m68k/lib/cache.c         | 6 +++---
>  drivers/net/mcffec.c          | 5 +++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/m68k/include/asm/cache.h b/arch/m68k/include/asm/cache.h
> index 6ef7f7be1af8..aa8d2edb40ba 100644
> --- a/arch/m68k/include/asm/cache.h
> +++ b/arch/m68k/include/asm/cache.h
> @@ -185,7 +185,6 @@
>
>  #ifndef __ASSEMBLY__           /* put C only stuff in this section */
>
> -void icache_invalid(void);
>  void dcache_invalid(void);
>
>  #endif
> diff --git a/arch/m68k/lib/cache.c b/arch/m68k/lib/cache.c
> index dab834c1cbd8..370ad40f1423 100644
> --- a/arch/m68k/lib/cache.c
> +++ b/arch/m68k/lib/cache.c
> @@ -29,7 +29,7 @@ int dcache_status(void)
>
>  void icache_enable(void)
>  {
> -       icache_invalid();
> +       invalidate_icache_all();
>
>         *cf_icache_status = 1;
>
> @@ -53,7 +53,7 @@ void icache_disable(void)
>         u32 temp = 0;
>
>         *cf_icache_status = 0;
> -       icache_invalid();
> +       invalidate_icache_all();
>
>  #if defined(CONFIG_CF_V4) || defined(CFG_CF_V4E)
>         __asm__ __volatile__("movec %0, %%acr2"::"r"(temp));
> @@ -68,7 +68,7 @@ void icache_disable(void)
>  #endif
>  }
>
> -void icache_invalid(void)
> +void invalidate_icache_all(void)
>  {
>         u32 temp;
>
> diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
> index 04b711e4f650..7e53492733ed 100644
> --- a/drivers/net/mcffec.c
> +++ b/drivers/net/mcffec.c
> @@ -11,6 +11,7 @@
>   */
>
>  #include <config.h>
> +#include <cpu_func.h>
>  #include <env.h>
>  #include <hang.h>
>  #include <malloc.h>
> @@ -399,7 +400,7 @@ static int mcffec_send(struct udevice *dev, void *packet, int length)
>  #endif
>
>  #ifdef CONFIG_SYS_UNIFY_CACHE
> -       icache_invalid();
> +       invalidate_icache_all();
>  #endif
>
>         j = 0;
> @@ -433,7 +434,7 @@ static int mcffec_recv(struct udevice *dev, int flags, uchar **packetp)
>
>         for (;;) {
>  #ifdef CONFIG_SYS_UNIFY_CACHE
> -               icache_invalid();
> +               invalidate_icache_all();
>  #endif
>                 /* If nothing received - leave for() loop */
>                 if (info->rxbd[info->rx_idx].cbd_sc & BD_ENET_RX_EMPTY)
> --
> 2.34.1
>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff mbox series

Patch

diff --git a/arch/m68k/include/asm/cache.h b/arch/m68k/include/asm/cache.h
index 6ef7f7be1af8..aa8d2edb40ba 100644
--- a/arch/m68k/include/asm/cache.h
+++ b/arch/m68k/include/asm/cache.h
@@ -185,7 +185,6 @@ 
 
 #ifndef __ASSEMBLY__		/* put C only stuff in this section */
 
-void icache_invalid(void);
 void dcache_invalid(void);
 
 #endif
diff --git a/arch/m68k/lib/cache.c b/arch/m68k/lib/cache.c
index dab834c1cbd8..370ad40f1423 100644
--- a/arch/m68k/lib/cache.c
+++ b/arch/m68k/lib/cache.c
@@ -29,7 +29,7 @@  int dcache_status(void)
 
 void icache_enable(void)
 {
-	icache_invalid();
+	invalidate_icache_all();
 
 	*cf_icache_status = 1;
 
@@ -53,7 +53,7 @@  void icache_disable(void)
 	u32 temp = 0;
 
 	*cf_icache_status = 0;
-	icache_invalid();
+	invalidate_icache_all();
 
 #if defined(CONFIG_CF_V4) || defined(CFG_CF_V4E)
 	__asm__ __volatile__("movec %0, %%acr2"::"r"(temp));
@@ -68,7 +68,7 @@  void icache_disable(void)
 #endif
 }
 
-void icache_invalid(void)
+void invalidate_icache_all(void)
 {
 	u32 temp;
 
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index 04b711e4f650..7e53492733ed 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -11,6 +11,7 @@ 
  */
 
 #include <config.h>
+#include <cpu_func.h>
 #include <env.h>
 #include <hang.h>
 #include <malloc.h>
@@ -399,7 +400,7 @@  static int mcffec_send(struct udevice *dev, void *packet, int length)
 #endif
 
 #ifdef CONFIG_SYS_UNIFY_CACHE
-	icache_invalid();
+	invalidate_icache_all();
 #endif
 
 	j = 0;
@@ -433,7 +434,7 @@  static int mcffec_recv(struct udevice *dev, int flags, uchar **packetp)
 
 	for (;;) {
 #ifdef CONFIG_SYS_UNIFY_CACHE
-		icache_invalid();
+		invalidate_icache_all();
 #endif
 		/* If nothing received - leave for() loop */
 		if (info->rxbd[info->rx_idx].cbd_sc & BD_ENET_RX_EMPTY)