In our design we have two SPI devices on the same bus, each with an active-low chip-select. The SPI flash for booting is McSPI0 chip-select 0 (spi0_cs0) and an LCD driver chip is McSPI0 chip-select 1 (spi0_cs1). When either of these devices are accessed by U-Boot, the active-low chip-select is enabled for both devices at the same time. That's not right, of course.
The problem is in the U-Boot omap3_spi.c driver. Every time a single SPI device is selected with spi_claim_bus(), the entire SPI peripheral is reset with spi_reset(). This causes the EPOL bit for all of the SPI peripheral's chip-selects to be reset in their corresponding MCSPI_CHxCONF register. When EPOL is reset (to zero), the chip-select polarity is set for "held high during the active state". This configures them all as active-high chip-selects. Next, the spi_claim_bus() function will configure only the chip-select for the selected SPI device as active-low (by setting the EPOL bit in the appropriate MCSPI_CHxCONF register).
When the SPI access occurs, the chip-select for the SPI device being accessed will be properly asserted low (because it is correctly configured as active-low), but the other chip-selects from the same SPI bus are also being held asserted low (because they are incorrectly configured as active-high).
This issue occurs with U-Boot 2014.07, but I think with later versions as well, as the code looks the same.
Has this issue been encountered before?
What is the best way to solve this issue?