linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Query: spi-nor: dummy buswidth calculation
@ 2018-09-04  9:28 Yogesh Narayan Gaur
  2018-09-04 12:30 ` Boris Brezillon
  0 siblings, 1 reply; 3+ messages in thread
From: Yogesh Narayan Gaur @ 2018-09-04  9:28 UTC (permalink / raw)
  To: boris.brezillon@bootlin.com, linux-mtd@lists.infradead.org,
	linux-spi@vger.kernel.org

Hi Boris,

I have query regarding dummy bus width calculation for the read commands, added in the patch series [1]

In func m25p80_read(), dummy.buswidth is being assigned as
+       op.dummy.buswidth = op.addr.buswidth;

Above, buswidth for dummy commands are being assigned and are marked equal to the buswidth of the address command.
This is true for case when we are doing operation in 1-4-4 or 1-2-2 protocol where data as well as address are running on same data lines and having same buswidth.

I am adding support of octal commands in framework and for this needs to add support for 1-1-8 protocol for Micron flash MT35XU512ABA1G12.
For octal command, 7Ch, flash is sending data and the dummy on the 8 data lines and address on 1 data line.

If I do below code change, then I am getting correct data else there is data corruption only in the first byte read.
-       op.dummy.buswidth = op.addr.buswidth;
+       op.dummy.buswidth = spi_nor_get_protocol_data_nbits(nor->read_proto);


[1] https://patchwork.kernel.org/patch/10334345/

--
Regards
Yogesh Gaur

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-04 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-04  9:28 Query: spi-nor: dummy buswidth calculation Yogesh Narayan Gaur
2018-09-04 12:30 ` Boris Brezillon
2018-09-04 13:10   ` Cyrille Pitchen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).