]> git.baikalelectronics.ru Git - uboot.git/commit
spi: mt7621-spi: remove data cache and rewrite its xfer function
authorWeijie Gao <weijie.gao@mediatek.com>
Wed, 25 Sep 2019 09:45:24 +0000 (17:45 +0800)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Fri, 25 Oct 2019 15:20:44 +0000 (17:20 +0200)
commitafd94509daffb75b86ffdcb9671c1203b460920c
treea40b0732817ad289b9b1e0785aaa1edacf3442f4
parent03c92f0753bcdcbed45705e4820c88e240001842
spi: mt7621-spi: remove data cache and rewrite its xfer function

The mt7621 spi controller supports continuous generic half-duplex spi
transaction. There is no need to cache xfer data at all.

To achieve this goal, the OPADDR register must be used as the first data
to be sent. And follows the eight generic DIDO registers. But one thing
different between OPADDR and DIDO registers is OPADDR has a reversed byte
order.

With this patch, any amount of data can be read/written in a single xfer
function call.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
drivers/spi/mt7621_spi.c