From patchwork Wed Apr 25 18:28:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Dasu X-Patchwork-Id: 10364145 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 45B37601D3 for ; Wed, 25 Apr 2018 18:28:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33808287BA for ; Wed, 25 Apr 2018 18:28:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 268CF287EA; Wed, 25 Apr 2018 18:28:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6DB0287BA for ; Wed, 25 Apr 2018 18:28:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756496AbeDYS2Y (ORCPT ); Wed, 25 Apr 2018 14:28:24 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:45593 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756448AbeDYS2T (ORCPT ); Wed, 25 Apr 2018 14:28:19 -0400 Received: by mail-qk0-f194.google.com with SMTP id x22so5611241qkb.12; Wed, 25 Apr 2018 11:28:18 -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=vH0MgITDIQ5ihAvVjx3VXvFlAgEHvlBQ/T+OOhiFNcQ=; b=ZAnTACxytn1TiEwHTuDzx1sSXTXAyP0O+32xvh7tt7bTQFgroAGKDmlp+s7Izs1lss oX3VN3cv6Hwp3ofnlYzsL1P+fTpC9zD3fqkBvs5klhbn+nry6ZNOV03IFPn72Pty65m0 TbBKlUBfONlzAmftczVFpREKF6yYZka0j0ykBb27UVXSIqbZ/k/Y1TYQmTIiN4NJwrLk 4MYzWDNuCuU/kGowZW+XkP2jHTzWNsuqzAwvyTcjUfcW6l/Jw4WaOpAn3UkJHWxjiK0m 09ZiYT4N8917bj+4mN1AdGQqNzSfrSDWYtgPGz5WtwQias55J0cTSeE/GrlVmWtYduNt jfag== 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=vH0MgITDIQ5ihAvVjx3VXvFlAgEHvlBQ/T+OOhiFNcQ=; b=WAf4LkSDLEee45O0E3sib0oQ5gc3jYz/n0XNjBo+JEXfR63VeFG+CFBovY9tNtyB+E pRHozRwW19Fv9kLFhpbXae6OU3pfZ7h1MuS8W2rafjSLlu+5RoKUrneV0/fs7ncDrRas uKSsyEhfVws9rPStCnxx5HFeE9BElmUBdPzCHh25YdROSI9u8AyRljmTmuhXNkowequH pf78ZZkVXRjAiaSw3iOZrGlABIJ/hUhxxVle3KYE0pirMe98LeLl74E0AtGZeiwx786w HcFPlZG4tGeUwzo4v2u4mL3b+NAZMgomGgQvILj8wZgl7NZ2SCH++eej95oJuTyHLuBb YUXQ== X-Gm-Message-State: ALQs6tCklikrNoqwGBU6LVgQpQBE1ytzg71hUj+LwaR53slR72wRy//0 A0yFY6H3UhWOubwtGqEKCp4= X-Google-Smtp-Source: AB8JxZoCQsMEEh403+wrdFC1gjfuGJaJrLjc2IiKAifYyEUQS+ui219PoEryTERwHGJFJGyVc4UtWA== X-Received: by 10.55.203.193 with SMTP id u62mr29849589qkl.83.1524680898432; Wed, 25 Apr 2018 11:28:18 -0700 (PDT) Received: from mail.broadcom.com ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id x28-v6sm1980695qtx.95.2018.04.25.11.28.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Apr 2018 11:28:17 -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 v1 2/2] spi: bcm-qspi: Always change BSPI_MAST_N_BOOT_CTRL state Date: Wed, 25 Apr 2018 14:28:05 -0400 Message-Id: <1524680885-4600-3-git-send-email-kdasu.kdev@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524680885-4600-1-git-send-email-kdasu.kdev@gmail.com> References: <1524680885-4600-1-git-send-email-kdasu.kdev@gmail.com> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Always confirm the BSPI_MAST_N_BOOT_CTRL bit when enabling or disabling BSPI transfers. 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;