From patchwork Tue Nov 10 06:22:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vignesh Raghavendra X-Patchwork-Id: 542190 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id C03B31402D2 for ; Tue, 10 Nov 2015 17:22:46 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 023A34B8C9; Tue, 10 Nov 2015 07:22:43 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id az0Dn-VgMIGQ; Tue, 10 Nov 2015 07:22:42 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 350D34B8CA; Tue, 10 Nov 2015 07:22:31 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EB27E4B8C5 for ; Tue, 10 Nov 2015 07:22:23 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xqzueG7i85Ki for ; Tue, 10 Nov 2015 07:22:23 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by theia.denx.de (Postfix) with ESMTPS id 22F024B8B7 for ; Tue, 10 Nov 2015 07:22:19 +0100 (CET) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id tAA6MGmn012559; Tue, 10 Nov 2015 00:22:16 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id tAA6MGuo006991; Tue, 10 Nov 2015 00:22:16 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.224.2; Tue, 10 Nov 2015 00:22:16 -0600 Received: from uda0132425.apr.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id tAA6MBRL011862; Tue, 10 Nov 2015 00:22:14 -0600 From: Vignesh R To: Tom Rini , Jagan Teki , Lokesh Vutla Date: Tue, 10 Nov 2015 11:52:10 +0530 Message-ID: <1447136531-1325-2-git-send-email-vigneshr@ti.com> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1447136531-1325-1-git-send-email-vigneshr@ti.com> References: <1447136531-1325-1-git-send-email-vigneshr@ti.com> MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 1/2] spi: ti_qspi: Add dummy readl for bus sync X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 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" Add dummy readl after invalidating cmd field of QSPI_CMD_REG to ensure bus sync. Without this device's CS is not deactivated reliably leading to failure to enumerate flash or failure to set quad enable bit on Macronix flash present on am437x-sk and am437x-idk evms. Signed-off-by: Vignesh R Reviewed-by: Mugunthan V N Reviewed-by: Jagan Teki --- drivers/spi/ti_qspi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c index bd63db8a2acc..ba2da017c21a 100644 --- a/drivers/spi/ti_qspi.c +++ b/drivers/spi/ti_qspi.c @@ -170,6 +170,8 @@ void spi_cs_deactivate(struct spi_slave *slave) debug("spi_cs_deactivate: 0x%08x\n", (u32)slave); writel(qslave->cmd | QSPI_INVAL, &qslave->base->cmd); + /* dummy readl to ensure bus sync */ + readl(&qslave->base->cmd); } void spi_init(void)