mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
spi: mtk_spim: check slave device mode in spi-mem's supports_op
Call spi_mem_default_supports_op() in supports_op to honor the slave's supported single/dual/quad mode settings. Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
This commit is contained in:
@@ -359,6 +359,9 @@ static bool mtk_spim_supports_op(struct spi_slave *slave,
|
||||
struct udevice *bus = dev_get_parent(slave->dev);
|
||||
struct mtk_spim_priv *priv = dev_get_priv(bus);
|
||||
|
||||
if (!spi_mem_default_supports_op(slave, op))
|
||||
return false;
|
||||
|
||||
if (op->cmd.buswidth == 0 || op->cmd.buswidth > 4 ||
|
||||
op->addr.buswidth > 4 || op->dummy.buswidth > 4 ||
|
||||
op->data.buswidth > 4)
|
||||
|
||||
Reference in New Issue
Block a user