From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5C67FC3DA7A for ; Thu, 5 Jan 2023 15:35:11 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3E48D855CB; Thu, 5 Jan 2023 16:34:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="g89lo4S/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 50761855D2; Thu, 5 Jan 2023 16:34:46 +0100 (CET) Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A087A855C9 for ; Thu, 5 Jan 2023 16:34:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=macroalpha82@gmail.com Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-1442977d77dso43298597fac.6 for ; Thu, 05 Jan 2023 07:34:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/dCkJ0s3Ft55+fK19M9BMXO04Inp7kg2/zPKfOlJDQ8=; b=g89lo4S/YvNeA6V8gt23cvfEbLhssMNAfzKOhWCAyX8WLSMimSJ+iElUQbt6xm0APF 6BVN/VKh1iuss0poE2ZdXBh2T3v5NXvsNwZEoJ1Z4V5kYiSClVCmppoYk215vtgyrAVy 7HPPs0GGd6A/6KrE1GNEvxWEog1fOpvLP5adxSd2qlwBFae6syXDcCxDEMN1qForK+o7 MJVJE3m978HZ6sn4bYlX0HPUHKooRJ+rl773MAJWiyfykHhPQN0IWwNes1eSViLutc/+ wf+bhIk8joiFbeVijpGtOMThdji/D+Y3jGGMuMSZ+OtEas51o5os6QJkkxskdMgI1aSo 1T1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/dCkJ0s3Ft55+fK19M9BMXO04Inp7kg2/zPKfOlJDQ8=; b=E7lLtx3wZxoVkOBQYAnCDkMSoeigDWsRts9sncqWvqCh+1S1KsATl/3C9JWGIdngyK JL/FRvlBWvAla/WEykUIMPLbB25zROX0xIA5BYBBvcf5y+7oGOMbAI6Dc7LXpI5QeGj0 tTHUYC1NECPqKCaRALD2NyeGckIGookutaHzwztuD0urk52LpriuWNurHHoOJKX6pzze pGsOMXOjW9zQlzloAWu4/Uxfs7/3Xo/FwBvLf8hLz98J9FcNQu803SfDNzmyGPQYpFdX jxFwgzg7OJBxqxo8Ea8Xdq/5JWiOnzNRx7+c231rYcPa5QLa1/zbNw9RWuWDhm0+HsDI V2zQ== X-Gm-Message-State: AFqh2ko7CwxhRhSUUq/dXkyG7OOr6SIyOxsHzY5bAXk09Z/cU/TWGBL5 Db7s+TsPD7/vlN4YSNpkD2RnWvSwZAw= X-Google-Smtp-Source: AMrXdXtI4Ybi9Yp9h2dsSkvss/GUKD7aqrbdmetGD/m4h1QcGA5QUFeJB3LvQADknL6D83jiUCXtQA== X-Received: by 2002:a05:6870:d92:b0:154:988a:d32d with SMTP id mj18-20020a0568700d9200b00154988ad32dmr77949oab.27.1672932881196; Thu, 05 Jan 2023 07:34:41 -0800 (PST) Received: from localhost.localdomain (76-244-6-13.lightspeed.rcsntx.sbcglobal.net. [76.244.6.13]) by smtp.gmail.com with ESMTPSA id l39-20020a05687106a700b0014fb4bdc746sm15453963oao.8.2023.01.05.07.34.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 07:34:40 -0800 (PST) From: Chris Morgan To: u-boot@lists.denx.de Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, kever.yang@rock-chips.com, chenjh@rock-chips.com, pgwipeout@gmail.com, heiko.stuebner@theobroma-systems.com, Chris Morgan Subject: [PATCH 3/5] rockchip: rk3568: add boot device detection Date: Thu, 5 Jan 2023 09:34:26 -0600 Message-Id: <20230105153428.392250-4-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230105153428.392250-1-macroalpha82@gmail.com> References: <20230105153428.392250-1-macroalpha82@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: Chris Morgan Enable spl to detect which device it was booted from. Adapted from Peter Geis's work located here: https://gitlab.com/pgwipeout/u-boot-quartz64/-/commit/3a10fb6bfbbaa747b425233b1fc08cd008084281 Signed-off-by: Chris Morgan --- arch/arm/mach-rockchip/rk3568/rk3568.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/mach-rockchip/rk3568/rk3568.c b/arch/arm/mach-rockchip/rk3568/rk3568.c index 22eeb77d41..a2d59abc26 100644 --- a/arch/arm/mach-rockchip/rk3568/rk3568.c +++ b/arch/arm/mach-rockchip/rk3568/rk3568.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -70,6 +71,12 @@ static struct mm_region rk3568_mem_map[] = { } }; +const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = { + [BROM_BOOTSOURCE_EMMC] = "/sdhci@fe310000", + [BROM_BOOTSOURCE_SPINOR] = "/spi@fe300000/flash@0", + [BROM_BOOTSOURCE_SD] = "/mmc@fe2b0000", +}; + struct mm_region *mem_map = rk3568_mem_map; void board_debug_uart_init(void) -- 2.34.1