* [PATCH] spi: bcm-qspi: fix SFDP BFPT read by usig mspi read
@ 2024-01-09 21:00 Kamal Dasu
2024-01-09 21:21 ` Florian Fainelli
2024-01-22 22:07 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Kamal Dasu @ 2024-01-09 21:00 UTC (permalink / raw)
To: Kamal Dasu, Broadcom internal kernel review list, Mark Brown,
Boris Brezillon
Cc: Kamal Dasu, linux-spi, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1204 bytes --]
SFDP read shall use the mspi reads when using the bcm_qspi_exec_mem_op()
call. This fixes SFDP parameter page read failures seen with parts that
now use SFDP protocol to read the basic flash parameter table.
Fixes: 5f195ee7d830 ("spi: bcm-qspi: Implement the spi_mem interface")
Signed-off-by: Kamal Dasu <kamal.dasu@broadcom.com>
---
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 ef08fcac2f6d..0407b91183ca 100644
--- a/drivers/spi/spi-bcm-qspi.c
+++ b/drivers/spi/spi-bcm-qspi.c
@@ -19,7 +19,7 @@
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/spi/spi.h>
-#include <linux/spi/spi-mem.h>
+#include <linux/mtd/spi-nor.h>
#include <linux/sysfs.h>
#include <linux/types.h>
#include "spi-bcm-qspi.h"
@@ -1221,7 +1221,7 @@ static int bcm_qspi_exec_mem_op(struct spi_mem *mem,
/* non-aligned and very short transfers are handled by MSPI */
if (!IS_ALIGNED((uintptr_t)addr, 4) || !IS_ALIGNED((uintptr_t)buf, 4) ||
- len < 4)
+ len < 4 || op->cmd.opcode == SPINOR_OP_RDSFDP)
mspi_read = true;
if (!has_bspi(qspi) || mspi_read)
--
2.17.1
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4203 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: bcm-qspi: fix SFDP BFPT read by usig mspi read
2024-01-09 21:00 [PATCH] spi: bcm-qspi: fix SFDP BFPT read by usig mspi read Kamal Dasu
@ 2024-01-09 21:21 ` Florian Fainelli
2024-01-22 22:07 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2024-01-09 21:21 UTC (permalink / raw)
To: Kamal Dasu, Broadcom internal kernel review list, Mark Brown,
Boris Brezillon
Cc: Kamal Dasu, linux-spi, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 515 bytes --]
On 1/9/24 13:00, Kamal Dasu wrote:
> SFDP read shall use the mspi reads when using the bcm_qspi_exec_mem_op()
> call. This fixes SFDP parameter page read failures seen with parts that
> now use SFDP protocol to read the basic flash parameter table.
>
> Fixes: 5f195ee7d830 ("spi: bcm-qspi: Implement the spi_mem interface")
> Signed-off-by: Kamal Dasu <kamal.dasu@broadcom.com>
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
--
Florian
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: bcm-qspi: fix SFDP BFPT read by usig mspi read
2024-01-09 21:00 [PATCH] spi: bcm-qspi: fix SFDP BFPT read by usig mspi read Kamal Dasu
2024-01-09 21:21 ` Florian Fainelli
@ 2024-01-22 22:07 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2024-01-22 22:07 UTC (permalink / raw)
To: Broadcom internal kernel review list, Boris Brezillon, Kamal Dasu
Cc: Kamal Dasu, linux-spi, linux-kernel
On Tue, 09 Jan 2024 16:00:32 -0500, Kamal Dasu wrote:
> SFDP read shall use the mspi reads when using the bcm_qspi_exec_mem_op()
> call. This fixes SFDP parameter page read failures seen with parts that
> now use SFDP protocol to read the basic flash parameter table.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: bcm-qspi: fix SFDP BFPT read by usig mspi read
commit: f9540ac18bb4afd13d3a09275693793cb18d4afb
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-22 22:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-09 21:00 [PATCH] spi: bcm-qspi: fix SFDP BFPT read by usig mspi read Kamal Dasu
2024-01-09 21:21 ` Florian Fainelli
2024-01-22 22:07 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®