> -----Original Message----- > From: Valentin Longchamp [mailto:valentin.longch...@keymile.com] > Sent: 30 May 2012 21:12 > To: Prafulla Wadaskar > Cc: Valentin Longchamp; holger.bru...@keymile.com; u- > b...@lists.denx.de; Prafulla Wadaskar > Subject: [PATCH v2 4/4] kw_spi: add weak functions > board_spi_claim/release_bus > > 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.longch...@keymile.com> > cc: Holger Brunck <holger.bru...@keymile.com> > cc: Prafulla Wadaskar <prafu...@marvell.com> > --- > drivers/spi/kirkwood_spi.c | 13 ++++++++++++- > 1 files changed, 12 insertions(+), 1 deletions(-) > > diff --git a/drivers/spi/kirkwood_spi.c b/drivers/spi/kirkwood_spi.c > index a3e6b6e..a0da527 100644 > --- a/drivers/spi/kirkwood_spi.c > +++ b/drivers/spi/kirkwood_spi.c > @@ -88,6 +88,11 @@ void spi_free_slave(struct spi_slave *slave) > 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) > @@ -121,7 +126,11 @@ int spi_claim_bus(struct spi_slave *slave) > kirkwood_mpp_conf(spi_mpp_config); > #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) > @@ -129,6 +138,8 @@ void spi_release_bus(struct spi_slave *slave) > #if defined(CONFIG_SYS_KW_SPI_MPP) > kirkwood_mpp_conf(spi_mpp_backup); > #endif > + > + board_spi_release_bus(slave); > } > > #ifndef CONFIG_SPI_CS_IS_VALID > -- > 1.7.1
Acked-By: Prafulla Wadaskar <prafu...@marvell.com> Regards.. Prafulla . . . _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot