Received: by 10.192.165.148 with SMTP id m20csp2486105imm; Thu, 26 Apr 2018 11:50:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq+aMj9qH3Xp2u4I8Aj9K/QwSz4SKs+yVUK8+C84VPltBB66gACDQN1ENlCXtHtnX/aXKEp X-Received: by 10.98.9.145 with SMTP id 17mr12609345pfj.34.1524768609607; Thu, 26 Apr 2018 11:50:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524768609; cv=none; d=google.com; s=arc-20160816; b=eC9yxW2C4oBfqp7ZgSvrlG4D/mGnBO4R2y/rvIu1uzG4lQbP+8OY1uM2FxJHZ/BjIg 5WC5oxQQTU02hnB2cJq0I7KOoBA4H4kOrI4RdbEzcw+HkzkIp7mQrLiVyQ+LUp+oUZTG Rvu5ErryC6bKuYzsgUxm6bciqTteyGC+JDOXOliDudryyj/MyljGHrXPJaeF752J8bRg Wy/g83gmALMPcaNJwKroAwZqADS9v4sd/BoOvHrJJ6/V1rWbaIuQPaGDf4gfTFPGBX/U FQYZ4DkU6Aaz1Vi1Tq6ORddFlSjvPUVK0/UdL9wCvPP0b9t3+uJpmiFEuMPvQ+PerMSJ n6Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=13wU9RyBdwowVAI7NX9HkCiAgURteyjJtqX0uA3mySE=; b=PsBYTOA+UvPXMAJnYdDqqV4jddQV9N4TwlShm+kxj3beN6bLwYwjVN7Amwxr7vfo6S 9fUCmzzELGJgDzEla1oRkdZfm+elsHz8X66oDIWy945HuGh4MWVZBjq6u3+MyDo3DQk0 3h5XPUmovphDXVff1U4FO+wuxxWFslU2ta1FnmXjpl9xcDTovqOgkoYoCQQILZf39QMn s5U9eoB4rCOv6LylXNwSGU/1gONeMtmPLwwzUrUHCm/fRUYDb+Zmz8p9sq0UbUUgC+yl OR5M7SrNATeQ6f23gBB7FeVwyl8jp0iNP+PJrJx4t26jmfIgF1OHWK7JZx3bhmSE37HC reGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CczVLIxz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k28si12001078pgn.129.2018.04.26.11.49.55; Thu, 26 Apr 2018 11:50:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CczVLIxz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756476AbeDZSsl (ORCPT + 99 others); Thu, 26 Apr 2018 14:48:41 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:40278 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755422AbeDZSs2 (ORCPT ); Thu, 26 Apr 2018 14:48:28 -0400 Received: by mail-qk0-f193.google.com with SMTP id o64so26412921qkl.7; Thu, 26 Apr 2018 11:48:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=13wU9RyBdwowVAI7NX9HkCiAgURteyjJtqX0uA3mySE=; b=CczVLIxzkYRzL2r6/gqnviJ4teqd907tTIBLrzl4QFljPSwhaBZkOVW0UPaxtRm3Up OFVxoToCwH6H85AvI529GWhBHvySP93SydaFAxC8aoNOwam7BTAzH8RAu3jbAXbpkszg GWK+fwz8rNVxWHJJsREg4jXDuXeVYTYmUKBtjyTMnG7v4Htd4JkyBPaSlYYOpitpdvmt L0DtVM2ESmP9GRoYIiamlzSjNetyb/c9VKzv70PSrM+l7YPit86LQco3WN5i6ry5fi+b VPHTJQK3F8dqEMaOKCEsfytKFt34efpKfO1UqNeUyCqFZwPvQIGgII9zGzV58vEtDrrT ws1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=13wU9RyBdwowVAI7NX9HkCiAgURteyjJtqX0uA3mySE=; b=eZVDzRWP+mQfh6IIGkPq1RFaifKV7bylr5HcMctsx0dm98QG4LQVtYt3MS8PPubIXE iy+J5WBXIKxPrG6a+UQNCwoQpjfwwHBKSl99KeyXG1VUOWWGvsOJsQf9Gh0s2mbBY2ry poBk4EPVPSZz2lPx5MrzzIiDHRRLA0kEzURTyRns9uQDXNDfAkctC5lyipbsveZcqzfo QvdxNdAgwG2340j1IonfCfCbop4VGQJSaWjuj7IGrPlCpnySkvle/E/CVPvsgYCptjey ZdDY5HmMd23Q3JVHcMeLWTavThVVZScQRaqJvcnITi/rS26zDd8KMLaAIwLhDCHYAHrb /3sw== X-Gm-Message-State: ALQs6tBIcBQQSWVC/DloJxIm6VLkTy8O3FM9CKew1YNUlBepjpTWx2Ys R1u9sf9KUBUkeUPmKspNEyHdug== X-Received: by 10.55.43.153 with SMTP id r25mr35697504qkr.422.1524768507471; Thu, 26 Apr 2018 11:48:27 -0700 (PDT) Received: from mail.broadcom.com ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id k43-v6sm17970058qtc.5.2018.04.26.11.48.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Apr 2018 11:48:27 -0700 (PDT) From: Kamal Dasu To: broonie@kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, jon.mason@broadcom.com, yendapally.reddy@broadcom.com, Kamal Dasu Subject: [PATCH v2 2/2] spi: bcm-qspi: Always read and set BSPI_MAST_N_BOOT_CTRL Date: Thu, 26 Apr 2018 14:48:01 -0400 Message-Id: <1524768481-16347-3-git-send-email-kdasu.kdev@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524768481-16347-1-git-send-email-kdasu.kdev@gmail.com> References: <1524768481-16347-1-git-send-email-kdasu.kdev@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Always confirm the BSPI_MAST_N_BOOT_CTRL bit when enabling or disabling BSPI transfers. Fixes: 4e3b2d236fe00 ("spi: bcm-qspi: Add BSPI spi-nor flash controller driver") Signed-off-by: Kamal Dasu --- drivers/spi/spi-bcm-qspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c index 2946989..6573152 100644 --- a/drivers/spi/spi-bcm-qspi.c +++ b/drivers/spi/spi-bcm-qspi.c @@ -490,7 +490,7 @@ static int bcm_qspi_bspi_set_mode(struct bcm_qspi *qspi, static void bcm_qspi_enable_bspi(struct bcm_qspi *qspi) { - if (!has_bspi(qspi) || (qspi->bspi_enabled)) + if (!has_bspi(qspi)) return; qspi->bspi_enabled = 1; @@ -505,7 +505,7 @@ static void bcm_qspi_enable_bspi(struct bcm_qspi *qspi) static void bcm_qspi_disable_bspi(struct bcm_qspi *qspi) { - if (!has_bspi(qspi) || (!qspi->bspi_enabled)) + if (!has_bspi(qspi)) return; qspi->bspi_enabled = 0; -- 2.7.4