All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Retanubun <RichardRetanubun@RuggedCom.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2] PPC: Record uboot's relocated address in RAM and show in bdinfo.
Date: Mon, 18 Jan 2010 09:12:28 -0500	[thread overview]
Message-ID: <4B546C4C.9070603@RuggedCom.com> (raw)
In-Reply-To: <m23a23n14o.fsf@ohwell.denx.de>

 From c9b845a6dac24e74ab450aa0bac071b441d16ae9 Mon Sep 17 00:00:00 2001
From: Richard Retanubun <RichardRetanubun@RuggedCom.com>
Date: Fri, 15 Jan 2010 10:06:06 -0500
Subject: [PATCH] PPC: Record uboot's relocated address in RAM and show in bdinfo.

This patch uses gd->relocaddr variable to store uboot's relocated
address in RAM and shows it in bdinfo command.

This patch removes CONFIG_AMIGAONEG3SE style copying of the address
in board_init_f; it is moved to a common place in board_init_r.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
---
  common/cmd_bdinfo.c           |    1 +
  include/asm-ppc/global_data.h |    2 --
  lib_ppc/board.c               |    7 +++----
  3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/common/cmd_bdinfo.c b/common/cmd_bdinfo.c
index 11c1547..f8400bc 100644
--- a/common/cmd_bdinfo.c
+++ b/common/cmd_bdinfo.c
@@ -115,6 +115,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
  #endif
  	printf ("IP addr     = %pI4\n", &bd->bi_ip_addr);
  	printf ("baudrate    = %6ld bps\n", bd->bi_baudrate   );
+	print_num ("relocaddr", gd->relocaddr);
  	return 0;
  }

diff --git a/include/asm-ppc/global_data.h b/include/asm-ppc/global_data.h
index 3f11918..d3dd44e 100644
--- a/include/asm-ppc/global_data.h
+++ b/include/asm-ppc/global_data.h
@@ -152,9 +152,7 @@ typedef	struct	global_data {
      defined(CONFIG_SANDPOINT)
  	void *		console_addr;
  #endif
-#ifdef CONFIG_AMIGAONEG3SE
  	unsigned long	relocaddr;	/* Start address of U-Boot in RAM */
-#endif
  #if defined(CONFIG_LCD) || defined(CONFIG_VIDEO)
  	unsigned long	fb_base;	/* Base address of framebuffer memory	*/
  #endif
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index dd22f99..2e2872e 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -476,10 +476,6 @@ void board_init_f (ulong bootflag)

  	debug ("Reserving %ldk for U-Boot at: %08lx\n", len >> 10, addr);

-#ifdef CONFIG_AMIGAONEG3SE
-	gd->relocaddr = addr;
-#endif
-
  	/*
  	 * reserve memory for malloc() arena
  	 */
@@ -659,6 +655,9 @@ void board_init_r (gd_t *id, ulong dest_addr)

  	debug ("Now running in RAM - U-Boot at: %08lx\n", dest_addr);

+	/* Record uboot's address in RAM, useful for debugging. */
+	gd->relocaddr = dest_addr;
+
  	WATCHDOG_RESET ();

  	/*
--
1.6.5

  parent reply	other threads:[~2010-01-18 14:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-15 15:25 [U-Boot] [PATCH] PPC: Record uboot's relocated address in RAM and show in bdinfo Richard Retanubun
2010-01-15 16:13 ` Detlev Zundel
2010-01-15 16:57   ` Richard Retanubun
2010-01-18 10:44     ` Detlev Zundel
2010-01-18 10:50       ` Joakim Tjernlund
2010-01-18 14:12       ` Richard Retanubun [this message]
2010-01-19 14:28         ` [U-Boot] [PATCH V2] " Detlev Zundel
     [not found]           ` <4B55C9FF.7060000@RuggedCom.com>
     [not found]             ` <m2iqawg0fj.fsf@ohwell.denx.de>
2010-01-25 18:31               ` [U-Boot] [PATCH V3] " richardretanubun at ruggedcom.com
2010-02-02 17:38                 ` Detlev Zundel
2010-03-11 22:49                 ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B546C4C.9070603@RuggedCom.com \
    --to=richardretanubun@ruggedcom.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.