Message ID | 1338550263-1899-5-git-send-email-valentin.longchamp@keymile.com |
---|---|
State | Accepted |
Delegated to: | Prafulla Wadaskar |
Headers | show |
> -----Original Message----- > From: Valentin Longchamp [mailto:valentin.longchamp@keymile.com] > Sent: 01 June 2012 17:01 > To: Prafulla Wadaskar > Cc: u-boot@lists.denx.de; Valentin Longchamp; Holger Brunck > Subject: [PATCH v4 5/5] 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.longchamp@keymile.com> > cc: Holger Brunck <holger.brunck@keymile.com> > cc: Prafulla Wadaskar <prafulla@marvell.com> > --- Applied this entire patch series to u-boot-marvell.git master branch Regards.. Prafulla . . .
Hi Prafulla, On 06/05/2012 04:21 PM, Prafulla Wadaskar wrote: >> -----Original Message----- >> From: Valentin Longchamp [mailto:valentin.longchamp@keymile.com] >> Sent: 01 June 2012 17:01 >> To: Prafulla Wadaskar >> Cc: u-boot@lists.denx.de; Valentin Longchamp; Holger Brunck >> Subject: [PATCH v4 5/5] 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.longchamp@keymile.com> >> cc: Holger Brunck <holger.brunck@keymile.com> >> cc: Prafulla Wadaskar <prafulla@marvell.com> >> --- > > Applied this entire patch series to u-boot-marvell.git master branch > Thank you for applying this patch series. I will now send you the third series as you discussed it with Holger (http://lists.denx.de/pipermail/u-boot/2012-May/125208.html), which contains the patches for the support of new boards and new features for Keymile boards. Valentin
diff --git a/drivers/spi/kirkwood_spi.c b/drivers/spi/kirkwood_spi.c index db4bb0a..f4523a3 100644 --- a/drivers/spi/kirkwood_spi.c +++ b/drivers/spi/kirkwood_spi.c @@ -87,6 +87,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) @@ -118,7 +123,11 @@ int spi_claim_bus(struct spi_slave *slave) #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) @@ -126,6 +135,8 @@ 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
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> --- drivers/spi/kirkwood_spi.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-)