[PATCH] spi: Replace `dummy.nbytes` with `dummy.ncycles`
Tudor.Ambarus at microchip.com
Tudor.Ambarus at microchip.com
Mon Sep 12 20:58:10 AEST 2022
On 9/12/22 12:44, Patrice CHOTARD wrote:
Hi!
>> - /* 2 bytes per clock cycle in DTR mode. */
>> - op->dummy.nbytes *= 2;
>> -
> What is the benefit to remove dtr dummy.nbytes computation ? it leads to spray it in all drivers which support DTR.
> It was simpler to let the framework to deal with it, have i missed something ?
The majority of drivers from SPI need the number of cycles, not the number
of bytes. JESD216 refers to dummy ncycles as well, there's no such thing as
dummy nbytes. You'll notice that these drivers do the computation back to
ncycles in their driver, thus they undo what's prepared in SPI NOR. There
are just 4 drivers that use nbytes and rely on what's currently computed in
SPI NOR. Since these 4 drivers don't use the standard parameter and require
nbytes instead, they can do the conversion to nbytes in their driver.
--
Cheers,
ta
More information about the openbmc
mailing list