Patchwork [U-Boot] cmd_cache: use cache/invalidate functions available in common.h

login
register
mail settings
Submitter Stefan Kristiansson
Date Nov. 1, 2011, 4:21 a.m.
Message ID <1320121272-17613-1-git-send-email-stefan.kristiansson@saunalahti.fi>
Download mbox | patch
Permalink /patch/123019/
State Accepted
Commit 23498935faa59922c90f636e1ce8364510803819
Headers show

Comments

Stefan Kristiansson - Nov. 1, 2011, 4:21 a.m.
flush_dcache()/flush_icache() aren't defined in common.h,
flush_dcache_all()/invalidate_icache_all() however are.

Let the icache and dcache commands use those instead.

Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
---
 common/cmd_cache.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
Mike Frysinger - Nov. 1, 2011, 3:17 p.m.
i think the ppc guys might need to rename some of their funcs, and it seems 
like boards/drivers that use these are ppc-only, so there probably won't be 
any tree breakage ...

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
Wolfgang Denk - March 6, 2012, 9:13 p.m.
Dear Stefan Kristiansson,

In message <1320121272-17613-1-git-send-email-stefan.kristiansson@saunalahti.fi> you wrote:
> flush_dcache()/flush_icache() aren't defined in common.h,
> flush_dcache_all()/invalidate_icache_all() however are.
> 
> Let the icache and dcache commands use those instead.
> 
> Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
> ---
>  common/cmd_cache.c |   16 ++++++++--------
>  1 files changed, 8 insertions(+), 8 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/common/cmd_cache.c b/common/cmd_cache.c
index 9778d3b..360136c 100644
--- a/common/cmd_cache.c
+++ b/common/cmd_cache.c
@@ -30,10 +30,10 @@ 
 
 static int parse_argv(const char *);
 
-void __weak flush_icache(void)
+void __weak invalidate_icache_all(void)
 {
-	/* please define arch specific flush_icache */
-	puts("No arch specific flush_icache available!\n");
+	/* please define arch specific invalidate_icache_all */
+	puts("No arch specific invalidate_icache_all available!\n");
 }
 
 int do_icache ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
@@ -45,7 +45,7 @@  int do_icache ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 			break;
 		case 1:	icache_enable ();
 			break;
-		case 2: flush_icache();
+		case 2: invalidate_icache_all();
 			break;
 		}
 		/* FALL TROUGH */
@@ -59,10 +59,10 @@  int do_icache ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-void __weak flush_dcache(void)
+void __weak flush_dcache_all(void)
 {
-	puts("No arch specific flush_dcache available!\n");
-	/* please define arch specific flush_dcache */
+	puts("No arch specific flush_dcache_all available!\n");
+	/* please define arch specific flush_dcache_all */
 }
 
 int do_dcache ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
@@ -74,7 +74,7 @@  int do_dcache ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 			break;
 		case 1:	dcache_enable ();
 			break;
-		case 2: flush_dcache();
+		case 2: flush_dcache_all();
 			break;
 		}
 		/* FALL TROUGH */