From a759f1e0db7be05ab562e060cf024af262920426 Mon Sep 17 00:00:00 2001 From: Allen Martin Date: Fri, 19 Oct 2012 21:08:22 +0000 Subject: SPL: make jump_to_image_no_args a weak symbol 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: Tom Rini Acked-by: Simon Glass Tested-by: Simon Glass Signed-off-by: Tom Warren --- common/spl/spl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'common') diff --git a/common/spl/spl.c b/common/spl/spl.c index 0d829c0f12..f068abd8f8 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); } /* -- cgit v1.2.1 From 0f8998022294ea744b5e2db0faacb96cddba2018 Mon Sep 17 00:00:00 2001 From: Allen Martin Date: Thu, 25 Oct 2012 13:30:14 +0000 Subject: serial: remove calls to serial_assign() Remove calls to serial_assign() that are failing now that it returns a proper error code. This calls were not actually doing anything because they passed the name of a stdio_dev when a serial_device name is exptectd. Signed-off-by: Allen Martin Acked-by: Joe Hershberger Acked-by: Marek Vasut Acked-by: Simon Glass Tested-by: Simon Glass Tested-by: Stephen Warren Signed-off-by: Tom Warren --- common/cmd_nvedit.c | 3 --- common/iomux.c | 10 ---------- 2 files changed, 13 deletions(-) (limited to 'common') diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index 1f9c674260..68c38f4e5c 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -238,9 +238,6 @@ int env_check_apply(const char *name, const char *oldval, /* Try assigning specified device */ if (console_assign(console, newval) < 0) return 1; - - if (serial_assign(newval) < 0) - return 1; #endif /* CONFIG_CONSOLE_MUX */ } diff --git a/common/iomux.c b/common/iomux.c index dbc231250c..6a757041f6 100644 --- a/common/iomux.c +++ b/common/iomux.c @@ -135,16 +135,6 @@ int iomux_doenv(const int console, const char *arg) */ if (console_assign(console, start[j]) < 0) continue; - /* - * This was taken from common/cmd_nvedit.c. - * This will never work because serial_assign() returns - * 1 upon error, not -1. - * This would almost always return an error anyway because - * serial_assign() expects the name of a serial device, like - * serial_smc, but the user generally only wants to set serial. - */ - if (serial_assign(start[j]) < 0) - continue; cons_set[cs_idx++] = dev; } free(console_args); -- cgit v1.2.1