public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 1/3] ARM: cache: add an empty stub function for invalidate/flush dcache
@ 2015-06-05  7:47 Josh Wu
  2015-06-05  7:47 ` [U-Boot] [PATCH v2 2/3] m68k: cache: add an empty stub functions " Josh Wu
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Josh Wu @ 2015-06-05  7:47 UTC (permalink / raw)
  To: u-boot

Since some driver like ohci, lcd used dcache functions. But some ARM
cpu don't implement the invalidate_dcache_range()/flush_dcache_range()
functions.

To avoid compiling errors this patch adds an weak empty stub function
for all ARM cpu.

And each cpu can implement its own implementation. If not implemented
by default it will use an empty function.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
---

Changes in v2: new added

 arch/arm/lib/cache.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
index 74cfde6..bc48f53 100644
--- a/arch/arm/lib/cache.c
+++ b/arch/arm/lib/cache.c
@@ -53,6 +53,15 @@ __weak void enable_caches(void)
 	puts("WARNING: Caches not enabled\n");
 }
 
+__weak void invalidate_dcache_range(unsigned long start, unsigned long stop)
+{
+	/* An empty stub, real implementation should be in platform code */
+}
+__weak void flush_dcache_range(unsigned long start, unsigned long stop)
+{
+	/* An empty stub, real implementation should be in platform code */
+}
+
 #ifdef CONFIG_SYS_NONCACHED_MEMORY
 /*
  * Reserve one MMU section worth of address space below the malloc() area that
-- 
1.9.1

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

end of thread, other threads:[~2015-09-12 13:17 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-05  7:47 [U-Boot] [PATCH v2 1/3] ARM: cache: add an empty stub function for invalidate/flush dcache Josh Wu
2015-06-05  7:47 ` [U-Boot] [PATCH v2 2/3] m68k: cache: add an empty stub functions " Josh Wu
2015-06-05 21:29   ` Angelo Dureghello
2015-06-05  7:47 ` [U-Boot] [PATCH v2 3/3] usb: ohci: enable cache support Josh Wu
2015-06-05 13:18 ` [U-Boot] [PATCH v2 1/3] ARM: cache: add an empty stub function for invalidate/flush dcache Marek Vasut
2015-06-08  2:05   ` Josh Wu
2015-06-08  8:26     ` Marek Vasut
2015-06-08  9:15       ` Josh Wu
2015-06-08 13:20       ` Tom Rini
2015-06-09  3:54         ` Josh Wu
2015-06-09 13:11           ` Tom Rini
2015-06-10  9:49             ` Josh Wu
2015-06-10  9:58               ` Marek Vasut
2015-06-11  5:03                 ` Josh Wu
2015-06-10 18:20               ` Tom Rini
2015-06-11  5:21 ` [U-Boot] [resend][PATCH 0/2] ARM: cache: clean up the code to drop the empty stub functions Josh Wu
2015-06-11  5:21   ` [U-Boot] [PATCH 1/2] ARM: cache: drop the empty dcache functions as we have it in lib/cache.c Josh Wu
2015-09-12  9:14     ` Albert ARIBAUD
2015-09-12 13:17       ` Tom Rini
2015-06-11  5:21   ` [U-Boot] [PATCH 2/2] ARM: cache: implement a default flush_cache() function Josh Wu
2015-07-01  2:01   ` [U-Boot] [resend][PATCH 0/2] ARM: cache: clean up the code to drop the empty stub functions Josh Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox