This allows a final, board specific, step in the claim/relase_bus
function for the SPI controller, which may be needed for some hardware
designs.
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
u32 spi_mpp_backup[4];
#endif
+__attribute__((weak)) int board_spi_claim_bus(struct spi_slave *slave)
+{
+ return 0;
+}
+
int spi_claim_bus(struct spi_slave *slave)
{
#if defined(CONFIG_SYS_KW_SPI_MPP)
#endif
- return 0;
+ return board_spi_claim_bus(slave);
+}
+
+__attribute__((weak)) void board_spi_release_bus(struct spi_slave *slave)
+{
}
void spi_release_bus(struct spi_slave *slave)
#if defined(CONFIG_SYS_KW_SPI_MPP)
kirkwood_mpp_conf(spi_mpp_backup, NULL);
#endif
+
+ board_spi_release_bus(slave);
}
#ifndef CONFIG_SPI_CS_IS_VALID