From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Fri, 26 Oct 2012 09:39:33 -0700 Subject: [U-Boot] [PATCH v2 1/2] SPL: make jump_to_image_no_args a weak symbol In-Reply-To: <1350716904-4592-1-git-send-email-amartin@nvidia.com> References: <1350716904-4592-1-git-send-email-amartin@nvidia.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, Oct 20, 2012 at 12:08 AM, Allen Martin wrote: > 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 Acked-by: Simon Glass Tested-by: Simon Glass > --- > 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 > > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot