From patchwork Sat Feb 18 18:46:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Stuebner X-Patchwork-Id: 729745 X-Patchwork-Delegate: sjg@chromium.org 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 3vRcBT2ByFz9s8D for ; Mon, 20 Feb 2017 19:25:05 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 99594B39FA; Mon, 20 Feb 2017 09:21:33 +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 dgNKAONdh9I8; Mon, 20 Feb 2017 09:21:33 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EDE60B3893; Mon, 20 Feb 2017 09:18:04 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 047C74A068 for ; Sat, 18 Feb 2017 19:48:27 +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 TZ2JJV0vFHUm for ; Sat, 18 Feb 2017 19:48:26 +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 gloria.sntech.de (gloria.sntech.de [95.129.55.99]) by theia.denx.de (Postfix) with ESMTPS id CD2BD4A026 for ; Sat, 18 Feb 2017 19:48:26 +0100 (CET) Received: from [88.128.80.43] (helo=phil.lufthansa-flynet.com) by gloria.sntech.de with esmtpsa (TLS1.1:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1cfA3U-0004qF-8s; Sat, 18 Feb 2017 19:48:26 +0100 From: Heiko Stuebner To: sjg@chromium.org Date: Sat, 18 Feb 2017 19:46:26 +0100 Message-Id: <20170218184640.30635-7-heiko@sntech.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170218184640.30635-1-heiko@sntech.de> References: <20170218184640.30635-1-heiko@sntech.de> Cc: romain.perier@collabora.com, u-boot@lists.denx.de Subject: [U-Boot] [PATCH v4 06/20] rockchip: Move bootrom-related declarations to a header X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" So far spl-boards have declared the back_to_brom() function as simple extern in the files themself. That doesn't scale well if every boards defines this on its own. Therefore move the declarations to a bootrom header. Signed-off-by: Heiko Stuebner Tested-by: Kever Yang --- arch/arm/include/asm/arch-rockchip/bootrom.h | 22 ++++++++++++++++++++++ arch/arm/mach-rockchip/rk3036-board-spl.c | 3 +-- arch/arm/mach-rockchip/rk3288-board-spl.c | 3 ++- 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 arch/arm/include/asm/arch-rockchip/bootrom.h diff --git a/arch/arm/include/asm/arch-rockchip/bootrom.h b/arch/arm/include/asm/arch-rockchip/bootrom.h new file mode 100644 index 0000000000..79fb1a07ac --- /dev/null +++ b/arch/arm/include/asm/arch-rockchip/bootrom.h @@ -0,0 +1,22 @@ +/* + * (C) Copyright 2017 Heiko Stuebner + * + * SPDX-License-Identifier: GPL-2.0 + */ + +#ifndef _ASM_ARCH_BOOTROM_H +#define _ASM_ARCH_BOOTROM_H + +/* + * Saved Stack pointer address. + * Access might be needed in some special cases. + */ +extern u32 SAVE_SP_ADDR; + +/* + * Hand control back to the bootrom to load another + * boot stage. + */ +extern void back_to_bootrom(void); + +#endif diff --git a/arch/arm/mach-rockchip/rk3036-board-spl.c b/arch/arm/mach-rockchip/rk3036-board-spl.c index 801548109b..0522d65467 100644 --- a/arch/arm/mach-rockchip/rk3036-board-spl.c +++ b/arch/arm/mach-rockchip/rk3036-board-spl.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -20,8 +21,6 @@ static struct rk3036_grf * const grf = (void *)GRF_BASE; #define DEBUG_UART_BASE 0x20068000 -extern void back_to_bootrom(void); - void board_init_f(ulong dummy) { #ifdef EARLY_DEBUG diff --git a/arch/arm/mach-rockchip/rk3288-board-spl.c b/arch/arm/mach-rockchip/rk3288-board-spl.c index 930939ad24..e51e19bb2d 100644 --- a/arch/arm/mach-rockchip/rk3288-board-spl.c +++ b/arch/arm/mach-rockchip/rk3288-board-spl.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -155,7 +156,7 @@ static int configure_emmc(struct udevice *pinctrl) return 0; } #endif -extern void back_to_bootrom(void); + void board_init_f(ulong dummy) { struct udevice *pinctrl;