From patchwork Mon Jan 19 23:29:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_Bie=C3=9Fmann?= X-Patchwork-Id: 430742 X-Patchwork-Delegate: andreas.biessmann@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 58614140161 for ; Tue, 20 Jan 2015 10:29:47 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6AE924B668; Tue, 20 Jan 2015 00:29:43 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FgdXUWKvdPFI; Tue, 20 Jan 2015 00:29:43 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CF7244B61F; Tue, 20 Jan 2015 00:29:41 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 06D524B615 for ; Tue, 20 Jan 2015 00:29:35 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Wgq4G7-xHekn for ; Tue, 20 Jan 2015 00:29:34 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by theia.denx.de (Postfix) with ESMTPS id C63CC4B64D for ; Tue, 20 Jan 2015 00:29:31 +0100 (CET) Received: by mail-wg0-f42.google.com with SMTP id k14so34285253wgh.1 for ; Mon, 19 Jan 2015 15:29:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=DrqmXo6WkrbgjQrITycWRmh1lCm4E0TCfdGtbu77Nvc=; b=KqojeUzvIJsWfB/ZA+uKTnBBT8jeHJmVteRPkEAh8d2jBqfVEw/oUzIbZXXHckOlDH 6SKDmsirICsIlelhlf7p4/B0p+VZxCehW0ryJvg39hvWO9TPzHxB/e8T4XO2wlkVTBct E6MMCmfl7e3bWMGTB2qPHkjrQ4SKjgGrbRZXbZ2+GwWdO/szjxElvn/1UaZPY8fjrGKQ Ze7V8KPViHHBKJsp6ypChFcywOq49jHFsxR+2x0dZoo99cJt1njn9fimPeOXC7xsyReP 5zCA+mUsJt9TpBG0sDd/bKYmqtQE6hSHgVgAEwrFomaH422NmVcBCC+KqkCfI9cp0df4 rwCQ== X-Received: by 10.194.185.68 with SMTP id fa4mr57673461wjc.111.1421710171591; Mon, 19 Jan 2015 15:29:31 -0800 (PST) Received: from localhost (dockstar.er.biessmann.org. [2a01:198:47b:1::10]) by mx.google.com with ESMTPSA id v6sm776585wix.20.2015.01.19.15.29.30 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 19 Jan 2015 15:29:31 -0800 (PST) From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= To: U-Boot List Date: Tue, 20 Jan 2015 00:29:05 +0100 Message-Id: <1421710147-5550-4-git-send-email-andreas.devel@googlemail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1421710147-5550-1-git-send-email-andreas.devel@googlemail.com> References: <1421710147-5550-1-git-send-email-andreas.devel@googlemail.com> MIME-Version: 1.0 Cc: Thierry Reding , Jeroen Hofstee , Stefan Roese , Alexey Brodkin , Ian Campbell Subject: [U-Boot] [RFC PATCH 3/5] common/board_r: manual relocation for cmd table X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This is required for architectures still need manual relocation like avr32, mk68 and others. Signed-off-by: Andreas Bießmann Reviewed-by: Simon Glass Tested-by: Michal Simek --- common/board_r.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/board_r.c b/common/board_r.c index a301cc2..e712902 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -294,6 +294,15 @@ static int initr_announce(void) return 0; } +#ifdef CONFIG_NEEDS_MANUAL_RELOC +static int initr_manual_reloc_cmdtable(void) +{ + fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd), + ll_entry_count(cmd_tbl_t, cmd)); + return 0; +} +#endif + #if !defined(CONFIG_SYS_NO_FLASH) static int initr_flash(void) { @@ -718,6 +727,9 @@ init_fnc_t init_sequence_r[] = { initr_serial, initr_announce, INIT_FUNC_WATCHDOG_RESET +#ifdef CONFIG_NEEDS_MANUAL_RELOC + initr_manual_reloc_cmdtable, +#endif #ifdef CONFIG_PPC initr_trap, #endif