spi: mt7621-spi: restore default register value after each xfer
authorWeijie Gao <weijie.gao@mediatek.com>
Wed, 25 Sep 2019 09:45:25 +0000 (17:45 +0800)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Fri, 25 Oct 2019 15:20:44 +0000 (17:20 +0200)
commit43405e009be86436affdf355f1e0549bdb6c9b9b
treece8879707b9d209faa9aa83641eb41d4b3756293
parent54a6b8e793dd8baf1621cd0c5d6eeeaa542bb329
spi: mt7621-spi: restore default register value after each xfer

Currently this driver uses a different way to implement the spi xfer,
by modifying some fields of two registers, which is incompatible with the
MTK's original SDK linux driver. This will cause the flash data being
damaged by the SDK driver.

This patch lets the mt7621_spi_set_cs() restore the original register
fields after cs deactivated.

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