From patchwork Sun Aug 18 21:35:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1148904 X-Patchwork-Delegate: sbabic@denx.de 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=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46BVnF4J10z9sMr for ; Mon, 19 Aug 2019 07:39:13 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3C843C21DD4; Sun, 18 Aug 2019 21:36:57 +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 01A59C21BE5; Sun, 18 Aug 2019 21:36:49 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 84E4CC21D56; Sun, 18 Aug 2019 21:36:24 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id 7D23AC21DE8 for ; Sun, 18 Aug 2019 21:36:22 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46BVjy2H1Lz1rGS0; Sun, 18 Aug 2019 23:36:22 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46BVjy1llXz1qql4; Sun, 18 Aug 2019 23:36:22 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id xhnJ0DgHSdSF; Sun, 18 Aug 2019 23:36:21 +0200 (CEST) X-Auth-Info: /4TcdOUcb4dWojfEwixuz4y6NHkGtfU7004qW1PLGN4= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sun, 18 Aug 2019 23:36:21 +0200 (CEST) From: Lukasz Majewski To: Stefano Babic , u-boot@lists.denx.de, Peng Fan , Fabio Estevam Date: Sun, 18 Aug 2019 23:35:57 +0200 Message-Id: <20190818213603.28171-5-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190818213603.28171-1-lukma@denx.de> References: <20190818213603.28171-1-lukma@denx.de> Subject: [U-Boot] [PATCH v2 4/9] spi: fix: Call mxs_reset_block() during DM/DTS probe 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" Without this change the DM/DTS version of mxs_spi driver doesn't reset the SPI IP block in probe. As a result this driver (when used solely on U-Boot proper) relies on reset performed by mxs spi driver in SPL. In the use case where eMMC is used in SPL as a boot primary device, the mxs_reset_block() is not called at all and DM/DTS aware SPI driver in U-Boot proper is malfunctioning. Signed-off-by: Lukasz Majewski Acked-by: Peng Fan --- Changes in v2: None drivers/spi/mxs_spi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c index b1cc83aab1..d475830f17 100644 --- a/drivers/spi/mxs_spi.c +++ b/drivers/spi/mxs_spi.c @@ -436,6 +436,8 @@ static int mxs_spi_probe(struct udevice *bus) priv->dma_channel = plat->dma_id; priv->clk_id = plat->clk_id; + mxs_reset_block(&priv->regs->hw_ssp_ctrl0_reg); + ret = mxs_dma_init_channel(priv->dma_channel); if (ret) { printf("%s: DMA init channel error %d\n", __func__, ret);