[U-Boot] [PATCH 10/21] spi/kirkwood: add weak functions board_spi_bus_claim/release

Prafulla Wadaskar prafulla at marvell.com
Wed Mar 21 17:30:42 CET 2012



> -----Original Message-----
> From: Holger Brunck [mailto:holger.brunck at keymile.com]
> Sent: 21 March 2012 21:19
> To: u-boot at lists.denx.de
> Cc: Valentin Longchamp; Gerlando Falauto; Prafulla Wadaskar; Holger
> Brunck
> Subject: [PATCH 10/21] spi/kirkwood: add weak functions
> board_spi_bus_claim/release
> 
> From: Valentin Longchamp <valentin.longchamp at keymile.com>
> 
> Some kirkwood based boards may need to implement such function due to
> some HW designs.
> 
> Signed-off-by: Valentin Longchamp <valentin.longchamp at keymile.com>
> cc: Gerlando Falauto <gerlando.falauto at keymile.com>
> cc: Prafulla Wadaskar <prafulla at marvell.com>
> cc: Holger Brunck <holger.brunck at keymile.com>
> ---
>  drivers/spi/kirkwood_spi.c |   12 +++++++++++-
>  1 files changed, 11 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/spi/kirkwood_spi.c b/drivers/spi/kirkwood_spi.c
> index db8ba8b..058dae2 100644
> --- a/drivers/spi/kirkwood_spi.c
> +++ b/drivers/spi/kirkwood_spi.c
> @@ -86,13 +86,23 @@ void spi_free_slave(struct spi_slave *slave)
>  	free(slave);
>  }
> 
> -int spi_claim_bus(struct spi_slave *slave)
> +__attribute__((weak)) int board_spi_claim_bus(struct spi_slave
> *slave)
>  {
>  	return 0;
>  }
> 
> +int spi_claim_bus(struct spi_slave *slave)
> +{
> +	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)
>  {
> +	board_spi_release_bus(slave);
>  }
> 
>  #ifndef CONFIG_SPI_CS_IS_VALID
> --
> 1.7.1

Pls post this as standalone patch, does not have any dependency.
Exclude from this patch series.

Regards..
Prafulla . . .


More information about the U-Boot mailing list