spi: hisi-sfc-v3xx: add address mode check
authorYicong Yang <yangyicong@hisilicon.com>
Wed, 27 Jan 2021 09:40:50 +0000 (17:40 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 27 Jan 2021 12:37:30 +0000 (12:37 +0000)
commit6d2386e36440165da782dbc5c0de40f31665e108
treedb6131aa8b01e0cd2d11a3881be50bdadccb0377
parent6589daf8bb98c75ad1065edad87c099ffb9f5d87
spi: hisi-sfc-v3xx: add address mode check

The address mode is either 3 or 4 for the controller, which is configured
by the firmware and cannot be modified in the OS driver. Get the
firmware configuration and add address mode check in the .supports_op()
to block invalid operations.

Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Acked-by: John Garry <john.garry@huawei.com>
Link: https://lore.kernel.org/r/1611740450-47975-3-git-send-email-yangyicong@hisilicon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-hisi-sfc-v3xx.c