soc: mediatek: extend bus protection API
authorweiyi.lu@mediatek.com <weiyi.lu@mediatek.com>
Tue, 28 Nov 2017 07:28:18 +0000 (15:28 +0800)
committerMatthias Brugger <matthias.bgg@gmail.com>
Thu, 21 Dec 2017 10:49:22 +0000 (11:49 +0100)
commitfa7e843a901d4ea6b092fea67406f85e8ec60b22
tree716939671bf7f30cad930048a903d33b8c222938
parent3dcf01c9707d49e8a38387f4dfe9f43dfb0e63eb
soc: mediatek: extend bus protection API

MT2712 add "set/clear" bus control register to each control register set
instead of providing only one "enable" control register, we could avoid
the read-modify-write racing by declaring "bus_prot_reg_update" as "false"
in scp_soc_data or declaring as "true" to use the legacy update method.
By improving the mtk-infracfg bus protection implementation to
support set/clear bus protection control method by IC configuration.

Signed-off-by: Weiyi Lu <weiyi.lu@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-infracfg.c
drivers/soc/mediatek/mtk-scpsys.c
include/linux/soc/mediatek/infracfg.h