From patchwork Tue Nov 19 11:04:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Heiko_St=C3=BCbner?= X-Patchwork-Id: 1197374 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 (no SPF record) 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=sntech.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 47HNJX0FyCz9sPn for ; Tue, 19 Nov 2019 22:05:00 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id BF259C21F9F; Tue, 19 Nov 2019 11:04:25 +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=none 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 6903AC21F8A; Tue, 19 Nov 2019 11:04:22 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8DB30C21FA4; Tue, 19 Nov 2019 11:04:14 +0000 (UTC) Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lists.denx.de (Postfix) with ESMTPS id 6C731C21EA1 for ; Tue, 19 Nov 2019 11:04:11 +0000 (UTC) Received: from wf0530.dip.tu-dresden.de ([141.76.182.18] helo=phil.dip.tu-dresden.de) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1iX1In-0005Fp-Gu; Tue, 19 Nov 2019 12:04:09 +0100 From: Heiko Stuebner To: u-boot@lists.denx.de Date: Tue, 19 Nov 2019 12:04:01 +0100 Message-Id: <20191119110402.17876-1-heiko@sntech.de> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Cc: Heiko Stuebner , christoph.muellner@theobroma-systems.com Subject: [U-Boot] [PATCH v2 1/2] rockchip: dwmmc: add handling for u-boot, spl-fifo-mode 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Heiko Stuebner Rockchips dwmmc controllers can't do dma to non-ddr addresses, like for example the soc-internal sram but during boot parts of TrustedFirmware need to be placed there from the read FIT image. So add handling for a u-boot,spl-fifo-mode to not put the mmc controllers into fifo mode for all time. The regular fifo-mode property still takes precedent and only if not set do we check for the spl-specific property. Suggested-by: Philipp Tomsich Signed-off-by: Heiko Stuebner Reviewed-by: Kever Yang Signed-off-by: Philipp Tomsich Reviewed-by: Philipp Tomsich --- drivers/mmc/rockchip_dw_mmc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c index b2a1201631..a0e1be8794 100644 --- a/drivers/mmc/rockchip_dw_mmc.c +++ b/drivers/mmc/rockchip_dw_mmc.c @@ -72,6 +72,11 @@ static int rockchip_dwmmc_ofdata_to_platdata(struct udevice *dev) return -EINVAL; priv->fifo_mode = dev_read_bool(dev, "fifo-mode"); +#ifdef CONFIG_SPL_BUILD + if (!priv->fifo_mode) + priv->fifo_mode = dev_read_bool(dev, "u-boot,spl-fifo-mode"); +#endif + /* * 'clock-freq-min-max' is deprecated * (see https://github.com/torvalds/linux/commit/b023030f10573de738bbe8df63d43acab64c9f7b)