From patchwork Mon Jul 22 11:59:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kever Yang X-Patchwork-Id: 1134979 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=rock-chips.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="RvtaN4+Z"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45slFq1cmJz9sLt for ; Tue, 23 Jul 2019 01:02:23 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id E9916C21FD3; Mon, 22 Jul 2019 15:02:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 95000C21FA4; Mon, 22 Jul 2019 12:06:44 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E98F8C21FA4; Mon, 22 Jul 2019 12:06:43 +0000 (UTC) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by lists.denx.de (Postfix) with ESMTPS id 967C9C21DA2 for ; Mon, 22 Jul 2019 12:01:02 +0000 (UTC) Received: by mail-pl1-f196.google.com with SMTP id 4so12149412pld.10 for ; Mon, 22 Jul 2019 05:01:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=nZDZTU7kjp/6dVaGyG3t6OX5cMmGqm78d8KPDobDPQs=; b=RvtaN4+ZLbDwyFxCCs6FI1Tpctcc5wDNoQal4N3BnJC8rpDJSBx9/U2P/gbDH2phjO of7uBW92A+fWtVaBIwgNjVJ16aDX7yrxjzj16JrDaSQWTAuZGn0s1ycXpfSqI9nFHDYr 1MEqRYJkGhlx1zbc5c9kSjHJZeCFdPD6y/MMTINjwpZRlPwrycXQ7ANXauaorq7vktv9 yhJluTwhjOl8eJexVCQ28wWWUNVXp8v9lHDkmy24q2IOAi+yp+pl44b9izcP1nsZB5H+ zPImvyduYL5GR9ZwUfHyii+fUDh6gBXDmdp2khtu5DxVFH14muYV5aKjF46DHa0RQG8o c7dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=nZDZTU7kjp/6dVaGyG3t6OX5cMmGqm78d8KPDobDPQs=; b=jMQKMQ3HNYFqR/6UuwZFGI7s2wlnWRGFxTZWYnlvc0u8/SHl4Y9UyQAlmJhJ5LpzaI qscuzhWGaPAVclmNfSFs/360Sp3jqO4TSbRs/IwGTOYvHDbL6uEu4hxthLPbdz7jiR5s 7GORd2xYBhbjlq/qRJ7fIBBAFdPXoccr0/xGZJecL1Vh6GAS9FbcdEyGGih00hum2emo TgAPuFwTSvHcX50njg5NP8ID6x2IFzbA4KK/le2zA0nxk9vBvgPTVC88PuOCcUblVJdT mjuxuXkaPAXkECn7nWUWqxET54CH4s+Zz05MC3K9rCXJzHdBnVNexkp/6WF/tjO5yp2y g9HQ== X-Gm-Message-State: APjAAAXP+oLzCFnwKrvdK2k8OTWKy1J4eh4waHP6+VohxFm4+adIt2oP 3keWrwSugbbpNtFKPWRsS2aEkjmP X-Google-Smtp-Source: APXvYqzXTxaK+sVN7hRQ2ArJ+2P8bSy9t+x5i4oMl7GIPMQHIEdBwHlEidlurH+Dch3QS/1RMDqAdA== X-Received: by 2002:a17:902:aa83:: with SMTP id d3mr73075787plr.74.1563796861230; Mon, 22 Jul 2019 05:01:01 -0700 (PDT) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id u134sm37621218pfc.19.2019.07.22.05.00.59 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 22 Jul 2019 05:01:00 -0700 (PDT) From: Kever Yang To: u-boot@lists.denx.de Date: Mon, 22 Jul 2019 19:59:40 +0800 Message-Id: <20190722115942.24962-34-kever.yang@rock-chips.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190722115942.24962-1-kever.yang@rock-chips.com> References: <20190722115942.24962-1-kever.yang@rock-chips.com> Subject: [U-Boot] [PATCH 33/35] rockchip: rk3399: move boot_devices into soc file X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" Move boot_devices definition into rk3399.c, so that we can share the common code for board_spl_was_booted_from(). Signed-off-by: Kever Yang --- arch/arm/mach-rockchip/rk3399-board-spl.c | 6 +----- arch/arm/mach-rockchip/rk3399/rk3399.c | 7 +++++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-rockchip/rk3399-board-spl.c b/arch/arm/mach-rockchip/rk3399-board-spl.c index 81a99f8e40..e6325274c3 100644 --- a/arch/arm/mach-rockchip/rk3399-board-spl.c +++ b/arch/arm/mach-rockchip/rk3399-board-spl.c @@ -23,11 +23,7 @@ void board_return_to_bootrom(void) back_to_bootrom(BROM_BOOT_NEXTSTAGE); } -static const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = { - [BROM_BOOTSOURCE_EMMC] = "/sdhci@fe330000", - [BROM_BOOTSOURCE_SPINOR] = "/spi@ff1d0000", - [BROM_BOOTSOURCE_SD] = "/dwmmc@fe320000", -}; +__weak const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {}; const char *board_spl_was_booted_from(void) { diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c index 3f414f1ca5..bca1871b9a 100644 --- a/arch/arm/mach-rockchip/rk3399/rk3399.c +++ b/arch/arm/mach-rockchip/rk3399/rk3399.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -20,6 +21,12 @@ DECLARE_GLOBAL_DATA_PTR; #define GRF_EMMCCORE_CON11 0xff77f02c #define GRF_BASE 0xff770000 +const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = { + [BROM_BOOTSOURCE_EMMC] = "/sdhci@fe330000", + [BROM_BOOTSOURCE_SPINOR] = "/spi@ff1d0000", + [BROM_BOOTSOURCE_SD] = "/dwmmc@fe320000", +}; + static struct mm_region rk3399_mem_map[] = { { .virt = 0x0UL,