All of lore.kernel.org
 help / color / mirror / Atom feed
From: Allen Martin <amartin@nvidia.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/2] SPL: make jump_to_image_no_args a weak symbol
Date: Sat, 20 Oct 2012 00:08:22 -0700	[thread overview]
Message-ID: <1350716904-4592-1-git-send-email-amartin@nvidia.com> (raw)

Change jump_to_image_no_args() to a weak symbol to allow override by
SoC specific code.  This is required by tegra because the SPL runs on
a different CPU from the image it is loading, so tegra specific
initialization is required to start the host CPU.  Pass in spl_image
as a parameter for the same reason.

Signed-off-by: Allen Martin <amartin@nvidia.com>
---
 common/spl/spl.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 0d829c0..f068abd 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -113,13 +113,13 @@ void spl_parse_image_header(const struct image_header *header)
 	}
 }
 
-static void __noreturn jump_to_image_no_args(void)
+__weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
 {
 	typedef void __noreturn (*image_entry_noargs_t)(u32 *);
 	image_entry_noargs_t image_entry =
-			(image_entry_noargs_t) spl_image.entry_point;
+			(image_entry_noargs_t) spl_image->entry_point;
 
-	debug("image entry point: 0x%X\n", spl_image.entry_point);
+	debug("image entry point: 0x%X\n", spl_image->entry_point);
 	/* Pass the saved boot_params from rom code */
 #if defined(CONFIG_VIRTIO) || defined(CONFIG_ZEBU)
 	image_entry = (image_entry_noargs_t)0x80100000;
@@ -223,7 +223,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
 	default:
 		debug("Unsupported OS image.. Jumping nevertheless..\n");
 	}
-	jump_to_image_no_args();
+	jump_to_image_no_args(&spl_image);
 }
 
 /*
-- 
1.7.10.4

             reply	other threads:[~2012-10-20  7:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-20  7:08 Allen Martin [this message]
2012-10-20  7:08 ` [U-Boot] [PATCH v2 2/2] tegra: move to common SPL framework Allen Martin
2012-10-22 17:09   ` Stephen Warren
2012-10-22 22:45   ` Lucas Stach
2012-10-26 16:38   ` Simon Glass
2012-10-26 16:40     ` Stephen Warren
2012-10-26 16:45       ` Simon Glass
2012-10-21  3:03 ` [U-Boot] [PATCH v2 1/2] SPL: make jump_to_image_no_args a weak symbol Tom Rini
2012-10-26 16:39 ` Simon Glass

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=1350716904-4592-1-git-send-email-amartin@nvidia.com \
    --to=amartin@nvidia.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.