summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-npcm-pspi.c
diff options
context:
space:
mode:
authorHoan Nguyen An <na-hoan@jinso.co.jp>2018-12-20 11:48:42 +0300
committerMark Brown <broonie@kernel.org>2018-12-20 17:56:11 +0300
commit916d9802e4b0723c1e4650e58e04c0259c14b85c (patch)
tree982a73f273d6c72d7bb25c7474a15706b2ba9e5f /drivers/spi/spi-npcm-pspi.c
parent079e7f8709bb41cd0dc13efaffb24a0f17841955 (diff)
downloadlinux-916d9802e4b0723c1e4650e58e04c0259c14b85c.tar.xz
spi: sh-msiof: Reduce the number of times write to and perform the transmission from FIFO
The current state of the spi-sh-msiof, in master transfer mode: if t-> bits_per_word <= 8, if the data length is divisible by 4 ((len & 3) = 0), the length of each word will be 32 bits In case of data length can not be divisible by 4 ((len & 3) != 0), always set each word to be 8 bits, this will increase the number of times that write to FIFO, increasing the number of times it should be transmitted. Assume that the number of bytes of data length more than 64 bytes, each transmission will write 64 times into the TFDR then transmit, a maximum one-time transmission will transmit 64 bytes if each word is 8 bits long. Switch to setting if t->bits_per_word <= 8, the word length will be 32 bits although the data length is not divisible by 4, then if leftover, will transmit the balance and the length of each words is 1 byte. The maximum each can transmit up to 64 x 4 (Data Size = 32 bits (4 bytes)) = 256 bytes. TMDR2 : Bits 28 to 24 BITLEN1[4:0] Data Size (8 to 32 bits) Bits 23 to 16 WDLEN1[7:0] Word Count (1 to 64 words) Signed-off-by: Hoan Nguyen An <na-hoan@jinso.co.jp> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-npcm-pspi.c')
0 files changed, 0 insertions, 0 deletions