public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] Blackfin: implement go/boote wrappers
@ 2008-04-19  5:45 Mike Frysinger
  2008-04-20 23:38 ` Wolfgang Denk
  0 siblings, 1 reply; 19+ messages in thread
From: Mike Frysinger @ 2008-04-19  5:45 UTC (permalink / raw)
  To: u-boot

Override the default go/boote handlers as we want to disable both data and
instruction cache before executing external programs (since Blackfin cache
handling requires a software handler in U-Boot which may be overwritten).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 lib_blackfin/Makefile            |    2 +-
 lib_blackfin/{bootm.c => boot.c} |   20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletions(-)
 rename lib_blackfin/{bootm.c => boot.c} (80%)

diff --git a/lib_blackfin/Makefile b/lib_blackfin/Makefile
index 3617104..879c37f 100644
--- a/lib_blackfin/Makefile
+++ b/lib_blackfin/Makefile
@@ -37,7 +37,7 @@ SOBJS-y	+= memmove.o
 SOBJS-y	+= memset.o
 
 COBJS-y	+= board.o
-COBJS-y	+= bootm.o
+COBJS-y	+= boot.o
 COBJS-y	+= cache.o
 COBJS-y	+= muldi3.o
 COBJS-y	+= post.o
diff --git a/lib_blackfin/bootm.c b/lib_blackfin/boot.c
similarity index 80%
rename from lib_blackfin/bootm.c
rename to lib_blackfin/boot.c
index ef4b112..5ea4afb 100644
--- a/lib_blackfin/bootm.c
+++ b/lib_blackfin/boot.c
@@ -77,3 +77,23 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
 	if (images->autostart)
 		do_reset (cmdtp, flag, argc, argv);
 }
+
+unsigned long do_go_exec(ulong (*entry)(int, char *[]), int argc, char *argv[])
+{
+	int d = dcache_status();
+	int i = icache_status();
+
+	dcache_disable();
+	icache_disable();
+
+	int ret = entry(argc, argv);
+
+	if (d) dcache_enable();
+	if (i) icache_enable();
+
+	return ret;
+}
+unsigned long do_bootelf_exec(ulong (*entry)(int, char *[]), int argc, char *argv[])
+{
+	return do_go_exec(entry, argc, argv);
+}
-- 
1.5.5

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

end of thread, other threads:[~2008-04-21 23:08 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-19  5:45 [U-Boot-Users] [PATCH] Blackfin: implement go/boote wrappers Mike Frysinger
2008-04-20 23:38 ` Wolfgang Denk
2008-04-21  0:31   ` Mike Frysinger
2008-04-21  5:00     ` Wolfgang Denk
2008-04-21  5:25       ` Mike Frysinger
2008-04-21  7:26         ` Wolfgang Denk
2008-04-21  7:49           ` Mike Frysinger
2008-04-21  9:03             ` Wolfgang Denk
2008-04-21  9:41               ` Mike Frysinger
2008-04-21 10:07                 ` Wolfgang Denk
2008-04-21 10:35                   ` Mike Frysinger
2008-04-21 10:59                     ` Mike Frysinger
2008-04-21 12:14                       ` Wolfgang Denk
2008-04-21 12:13                     ` Wolfgang Denk
2008-04-21 18:44                       ` Mike Frysinger
2008-04-21 19:45                         ` Wolfgang Denk
2008-04-21 20:58                           ` Mike Frysinger
2008-04-21 22:19                             ` Wolfgang Denk
2008-04-21 23:08                               ` Mike Frysinger

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