Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5472062ybh; Wed, 7 Aug 2019 06:35:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsOYUpp/49ph2w89bbRvXUHbt3hnhjSrtvTMOx0E7Un7+Q/CrIrby3YXGdPXsOHH/Ontbd X-Received: by 2002:a17:902:7781:: with SMTP id o1mr8181059pll.205.1565184905499; Wed, 07 Aug 2019 06:35:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565184905; cv=none; d=google.com; s=arc-20160816; b=OSUX6idOps6kRCQ/bFyh1np3iPOmP4hCFs84MLUW4uZvUKFZAM9X1AkEbgKVEzkdWQ 7h7/5O7RH1mnJH9EyOBmWIdbJxdo4O3ElPq2i/vH4yi9Dpw4yWiKuyTX77RnCo7WHWvj gyrDdIqyg7MnUo6SB6oImntzfKlFVLdBTDsLawHvm0m+nNCQjHUQjq4pLEfuS/Mr3JZd A5sh5IHOFYH2SlhNVaBfHd9+wT9wSCIXKnSavamQsn53Hx4q4WMQxrhmGfRksXOWRI5P Hb2SrguXnuTFMCXTqdli0dsM5iPnk1gMGL4SgQJSJBMWzKpTXITRTmEbX3iaq/C0w+8l IQ/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:in-reply-to:subject:cc:to :from:dkim-signature; bh=3mT0qX6BJMb19WlpAQonUb3hiJi+k8YBab91Hj0vvho=; b=uuC/HFFIVTrKswVwo8Ij9i6GJDkiYIAr6lwL2wRe7glYKcXwee/zAnjwgz9vBUF+Sm Y8DhCPF4HX364erNn3SF3t7Ne0Eou3yLmDUyhGG75Qg2Z2lypr/lvlLBi20ofrbvd+4a WD2/1BzTTH0nidTwvG0LLO3k8qjBwwEjpHvGGqVlzhfidt+6LaXUDkBdpI1ePkpkFB8p kr/NcRJRG397Ec4YmHzKcxkSPmeYiHvYZ3NDHNnOwpIto+NUvn9grfDEol/Itm29Gt6y SlGImMGMdZQ0nbyMwv+1njjE7ezEJhanI6+mw+KvssxOSgrpiYlsnKAwfVAAfSBtQMA/ gEBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=LhjsSrdJ; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n9si47807778pgp.338.2019.08.07.06.34.48; Wed, 07 Aug 2019 06:35:05 -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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=LhjsSrdJ; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388490AbfHGNde (ORCPT + 99 others); Wed, 7 Aug 2019 09:33:34 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:35380 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388342AbfHGNa7 (ORCPT ); Wed, 7 Aug 2019 09:30:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=3mT0qX6BJMb19WlpAQonUb3hiJi+k8YBab91Hj0vvho=; b=LhjsSrdJD78p CED+ljKGscLImtPr8cvKltrohbkNClfrC0SEY+UP0JVdNvM/j5+rbHsbi4p9e+yiqcFhdzCm0jD5w OzSBPn91Kh/M8VhSVnSP0RsnF5xa8+QCJTZf33sJJOa5jiXmATUaZnac/OIMwhkyg+elvg970I2x1 J2W/w=; Received: from ypsilon.sirena.org.uk ([2001:470:1f1d:6b5::7]) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hvM1o-0007hL-Fe; Wed, 07 Aug 2019 13:30:56 +0000 Received: by ypsilon.sirena.org.uk (Postfix, from userid 1000) id D6BF32742BE8; Wed, 7 Aug 2019 14:30:55 +0100 (BST) From: Mark Brown To: Rayagonda Kokatanur Cc: bcm-kernel-feedback-list@broadcom.com, Kamal Dasu , linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Mark Brown Subject: Applied "spi: bcm-qspi: Fix BSPI QUAD and DUAL mode support when using flex mode" to the spi tree In-Reply-To: <1565086070-28451-1-git-send-email-rayagonda.kokatanur@broadcom.com> X-Patchwork-Hint: ignore Message-Id: <20190807133055.D6BF32742BE8@ypsilon.sirena.org.uk> Date: Wed, 7 Aug 2019 14:30:55 +0100 (BST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch spi: bcm-qspi: Fix BSPI QUAD and DUAL mode support when using flex mode has been applied to the spi tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.3 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 79629d0f7ce5b38515c1716911a0181f01b91102 Mon Sep 17 00:00:00 2001 From: Rayagonda Kokatanur Date: Tue, 6 Aug 2019 15:37:50 +0530 Subject: [PATCH] spi: bcm-qspi: Fix BSPI QUAD and DUAL mode support when using flex mode Fix data transfer width settings based on DT field 'spi-rx-bus-width' to configure BSPI in single, dual or quad mode by using data width and not the command width. Fixes: 5f195ee7d830c ("spi: bcm-qspi: Implement the spi_mem interface") Signed-off-by: Rayagonda Kokatanur Link: https://lore.kernel.org/r/1565086070-28451-1-git-send-email-rayagonda.kokatanur@broadcom.com Signed-off-by: Mark Brown --- 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 584bcb018a62..285a6f463013 100644 --- a/drivers/spi/spi-bcm-qspi.c +++ b/drivers/spi/spi-bcm-qspi.c @@ -354,7 +354,7 @@ static int bcm_qspi_bspi_set_flex_mode(struct bcm_qspi *qspi, { int bpc = 0, bpp = 0; u8 command = op->cmd.opcode; - int width = op->cmd.buswidth ? op->cmd.buswidth : SPI_NBITS_SINGLE; + int width = op->data.buswidth ? op->data.buswidth : SPI_NBITS_SINGLE; int addrlen = op->addr.nbytes; int flex_mode = 1; @@ -992,7 +992,7 @@ static int bcm_qspi_exec_mem_op(struct spi_mem *mem, if (mspi_read) return bcm_qspi_mspi_exec_mem_op(spi, op); - ret = bcm_qspi_bspi_set_mode(qspi, op, -1); + ret = bcm_qspi_bspi_set_mode(qspi, op, 0); if (!ret) ret = bcm_qspi_bspi_exec_mem_op(spi, op); -- 2.20.1