Message ID | 98ffa6310bb99c2d645cc66525dcc5fcb2509af9.1656489154.git.jerome.forissier@linaro.org |
---|---|
State | Changes Requested |
Delegated to: | Kever Yang |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=kCqnOUd3; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LXv7g5wbJz9sG2 for <incoming@patchwork.ozlabs.org>; Wed, 29 Jun 2022 18:02:07 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AEB4B820E2; Wed, 29 Jun 2022 10:01:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="kCqnOUd3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CE012843F9; Wed, 29 Jun 2022 10:01:50 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (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 CB6B8838BB for <u-boot@lists.denx.de>; Wed, 29 Jun 2022 10:01:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jerome.forissier@linaro.org Received: by mail-wr1-x436.google.com with SMTP id d17so15499767wrc.10 for <u-boot@lists.denx.de>; Wed, 29 Jun 2022 01:01:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KSYeWNVs339wEvpzrBxtuqQpN6urXTPTi38qoybTmr4=; b=kCqnOUd3hCwpzIWwR7UtVDQToI5+Mg9m3A8xK0TpNr8LEc8a5WYyCCKp5Oh6dbEgTj YC6sQ/F7ZryfVvWBczxLTPTamEy1AV5tyThwTwE7rPqVuzcI+Fv0wuHDaf7bWOx5vboN jFFlw1GLDOPFkTjB+AHg0RMuvK8iD0rahJQ7tqXePKD5ZBNQdsBo7AC/M5TYQwP38Qaa q3voZOYR95UlnEPjRrMCLwDOz1Tt/jj/bVZ/Tra6fEPi3QkaVG3ZNrerJ0YhlFl5h6/M fI9chHOy4dG5t8tiHSrZOYw6KTzR6P/Bze0Bqy2RKVpZrqDGJ/AtFiHzr6jhqmIPTHFs CvpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KSYeWNVs339wEvpzrBxtuqQpN6urXTPTi38qoybTmr4=; b=uVK+ZESYdyMSiP2maQKYNgtHDq2MT9+MBDhOmHIi1HUYgOv32UPSIXE68vnqjXVqCf y1wG9kwzeKvqnuPw1mlhV/GzqvvxOg+8osWzvtUHJ+EPMy03sprKKuUD7Qw49wufVytK I1tTBwASPGbh0UdIcll3nxWdHsBu1LjWzmcSb8m1NcmnsXzBTIlVXGtsqBqcgdIF0kAN c1QJsXlTP0r4EOshEYqrEJHMQKzrE6cMhbwBsO/GaAU6/trs7K4BOLkJblMXQ7EpfJJs GTErxZ21UhT2Zbk/D7lNht/WfgiKwf+D2KJEGt4DF4EYBiIGR3/vQX/KItMwFK153DpU 8hbQ== X-Gm-Message-State: AJIora9kam1aCYtqDPjI+pVIhgMdHM7OXXTPkgpsWXOxafhzYpT+Z2Ps GK+1nYPrbsP6Z2B9Bswi0Zcbd2oVmoKYFePX8gXBUQ== X-Google-Smtp-Source: AGRyM1u0h6yA/954leQbr5zIXm4voue5dmmJeYfkVJlG7WbVzXVy8DO7FzImHTpnLmtSaO5ja0DRTA== X-Received: by 2002:a05:6000:192:b0:21a:3c91:df05 with SMTP id p18-20020a056000019200b0021a3c91df05mr1776235wrx.655.1656489707040; Wed, 29 Jun 2022 01:01:47 -0700 (PDT) Received: from jerome-XPS-13-9310.. ([2a01:e0a:3cb:7bb0:592b:5102:88ef:e71d]) by smtp.gmail.com with ESMTPSA id r5-20020a05600c320500b0039db500714fsm2168077wmp.6.2022.06.29.01.01.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jun 2022 01:01:46 -0700 (PDT) From: Jerome Forissier <jerome.forissier@linaro.org> To: u-boot@lists.denx.de Cc: Jerome Forissier <jerome.forissier@linaro.org>, Deepak Das <deepakdas.linux@gmail.com>, Jagan Teki <jagan@amarulasolutions.com>, Simon Glass <sjg@chromium.org>, Philipp Tomsich <philipp.tomsich@vrull.eu>, Kever Yang <kever.yang@rock-chips.com>, Alexandru Gagniuc <mr.nuke.me@gmail.com>, Jaehoon Chung <jh80.chung@samsung.com>, Heiko Schocher <hs@denx.de>, Nishanth Menon <nm@ti.com>, Aswath Govindraju <a-govindraju@ti.com>, Xavier Drudis Ferran <xdrudis@tinet.cat> Subject: [PATCH v2 2/2] rockchip: rk3399: enable spl-fifo-mode for sdmmc only when needed Date: Wed, 29 Jun 2022 10:01:11 +0200 Message-Id: <98ffa6310bb99c2d645cc66525dcc5fcb2509af9.1656489154.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <cover.1656489154.git.jerome.forissier@linaro.org> References: <cover.1656489154.git.jerome.forissier@linaro.org> 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 <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean |
Series |
spl, rk3399: fix FIT image loading out-of-range
|
expand
|
diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boot.dtsi index 716b9a433a..1be1a40bdb 100644 --- a/arch/arm/dts/rk3399-u-boot.dtsi +++ b/arch/arm/dts/rk3399-u-boot.dtsi @@ -124,8 +124,10 @@ &sdmmc { u-boot,dm-pre-reloc; +#if (CONFIG_SPL_LOAD_FIT_IMAGE_BUFFER_SIZE == 0) /* mmc to sram can't do dma, prevent aborts transferring TF-A parts */ u-boot,spl-fifo-mode; +#endif }; &spi1 {
Commit 5c606ca35c42 ("rockchip: rk3399: enable spl-fifo-mode for sdmmc") mentions that the RK3399 SoC can't do DMA between SDMMC and SRAM. According to the TRM "7.3.2 Embedded SRAM access path" [1], only the 8KB SRAM at 0xff3b0000 (INTMEM1) is in this situation. The 192KB SRAM can be accessed by both DMA controllers. Assuming the only use case for writing from MMC to INTMEM1 is loading a FIT image, and with the introduction of a temporary buffer for that purpose (CONFIG_SPL_LOAD_FIT_IMAGE_BUFFER_SIZE, which is required anyways to ensure the destination boundaries are enforced), then spl-fifo-mode is not needed anymore and DMA can be enabled safely. Link: [1] https://www.rockchip.fr/Rockchip%20RK3399%20TRM%20V1.4%20Part1.pdf CC: Deepak Das <deepakdas.linux@gmail.com> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> --- Changes since v1: - Fixed conditional (#if ... == 0 instead or #ifndef) --- arch/arm/dts/rk3399-u-boot.dtsi | 2 ++ 1 file changed, 2 insertions(+)