Re: [PATCH 03/18] spi: stm32h7: remove unused mode fault MODF event handling

From: Mark Brown
Date: Wed Aug 05 2020 - 16:15:32 EST


On Wed, Aug 05, 2020 at 09:01:58AM +0200, Alain Volmat wrote:
> From: Antonio Borneo <antonio.borneo@xxxxxx>

> Accordingly to STM32H7 document RM0433, "mode fault" MODF is
> a special mode to handle a spi bus with multiple masters, in
> which each master has to "detect" if another master enables
> its CS to take control of the bus. Once this is detected,
> all other masters has to temporarily switch to "slave" mode.

> Such multi-master mode is not supported in Linux and this
> driver properly disables the mode by setting the bits
> SPI_CR1_SSI and SPI_CFG2_SSM, thus forcing a master only
> operating mode.

> In this condition, we will never receive an interrupt due to
> MODF event and we do not need to handle it.

> Remove all the unused code around handling MODF events.

What does having this cost us? Hopefully it's not doing much but if
something goes wrong with the hardware and this does get flagged up for
some reason it'd be good to know about it. It doesn't seem to be having
a big impact on the code or anything.

Attachment: signature.asc
Description: PGP signature