summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorKamal Dasu <kdasu.kdev@gmail.com>2018-04-26 14:48:01 -0400
committerMark Brown <broonie@kernel.org>2018-05-02 05:58:45 +0900
commit602805fb618b018b7a41fbb3f93c1992b078b1ae (patch)
tree5d93dad04c73915d856f1664c380fe0d9406a360 /drivers/spi
parent5eb9a07a4ae1008b67d8bcd47bddb3dae97456b7 (diff)
downloadlinux-stable-602805fb618b018b7a41fbb3f93c1992b078b1ae.tar.gz
linux-stable-602805fb618b018b7a41fbb3f93c1992b078b1ae.tar.bz2
linux-stable-602805fb618b018b7a41fbb3f93c1992b078b1ae.zip
spi: bcm-qspi: Always read and set BSPI_MAST_N_BOOT_CTRL
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 <kdasu.kdev@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-bcm-qspi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c
index 2946989c61a2..6573152ce893 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;