diff mbox

[U-Boot,10/18] common: Move LCD and video memory reservation together

Message ID 1452011474-15207-11-git-send-email-sjg@chromium.org
State Accepted
Commit 8703ef3fdbfda239bcc67818e9b0f6ddaa7f6ad4
Delegated to: Anatolij Gustschin
Headers show

Commit Message

Simon Glass Jan. 5, 2016, 4:31 p.m. UTC
These two functions are conceptually the same. Move them together in the
pre-relocation init.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 common/board_f.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

Comments

Anatolij Gustschin Jan. 17, 2016, 11:37 p.m. UTC | #1
On Tue,  5 Jan 2016 09:31:06 -0700
Simon Glass <sjg@chromium.org> wrote:

> These two functions are conceptually the same. Move them together in the
> pre-relocation init.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
>  common/board_f.c | 28 ++++++++++++++--------------
>  1 file changed, 14 insertions(+), 14 deletions(-)

Acked-by: Anatolij Gustschin <agust@denx.de>

--
Anatolij
diff mbox

Patch

diff --git a/common/board_f.c b/common/board_f.c
index 8094ac4..068db0d 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -451,22 +451,10 @@  static int reserve_lcd(void)
 }
 #endif /* CONFIG_LCD */
 
-static int reserve_trace(void)
-{
-#ifdef CONFIG_TRACE
-	gd->relocaddr -= CONFIG_TRACE_BUFFER_SIZE;
-	gd->trace_buff = map_sysmem(gd->relocaddr, CONFIG_TRACE_BUFFER_SIZE);
-	debug("Reserving %dk for trace data at: %08lx\n",
-	      CONFIG_TRACE_BUFFER_SIZE >> 10, gd->relocaddr);
-#endif
-
-	return 0;
-}
-
 #if defined(CONFIG_VIDEO) && (!defined(CONFIG_PPC) || defined(CONFIG_8xx)) && \
 		!defined(CONFIG_ARM) && !defined(CONFIG_X86) && \
 		!defined(CONFIG_BLACKFIN) && !defined(CONFIG_M68K)
-static int reserve_video(void)
+static int reserve_legacy_video(void)
 {
 	/* reserve memory for video display (always full pages) */
 	gd->relocaddr = video_setmem(gd->relocaddr);
@@ -476,6 +464,18 @@  static int reserve_video(void)
 }
 #endif
 
+static int reserve_trace(void)
+{
+#ifdef CONFIG_TRACE
+	gd->relocaddr -= CONFIG_TRACE_BUFFER_SIZE;
+	gd->trace_buff = map_sysmem(gd->relocaddr, CONFIG_TRACE_BUFFER_SIZE);
+	debug("Reserving %dk for trace data at: %08lx\n",
+	      CONFIG_TRACE_BUFFER_SIZE >> 10, gd->relocaddr);
+#endif
+
+	return 0;
+}
+
 static int reserve_uboot(void)
 {
 	/*
@@ -960,13 +960,13 @@  static init_fnc_t init_sequence_f[] = {
 #ifdef CONFIG_LCD
 	reserve_lcd,
 #endif
-	reserve_trace,
 	/* TODO: Why the dependency on CONFIG_8xx? */
 #if defined(CONFIG_VIDEO) && (!defined(CONFIG_PPC) || defined(CONFIG_8xx)) && \
 		!defined(CONFIG_ARM) && !defined(CONFIG_X86) && \
 		!defined(CONFIG_BLACKFIN) && !defined(CONFIG_M68K)
 	reserve_video,
 #endif
+	reserve_trace,
 #if !defined(CONFIG_BLACKFIN)
 	reserve_uboot,
 #endif