diff mbox

[U-Boot,v2,10/19] arm/km: implement weak function board_spi_clam_bus/release

Message ID 1332761689-16666-11-git-send-email-valentin.longchamp@keymile.com
State Rejected
Delegated to: Prafulla Wadaskar
Headers show

Commit Message

Valentin Longchamp March 26, 2012, 11:34 a.m. UTC
They are needed on all km_arm boards where we have the environement
variables in the NOR Flash. This is #ifdefed by
CONFIG_KM_ENV_IS_IN_SPI_NOR. First boards using this feature are
the upcoming boards kmcoge5un and kmnusa.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
---
 board/keymile/km_arm/km_arm.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c
index 2507734..dcecf83 100644
--- a/board/keymile/km_arm/km_arm.c
+++ b/board/keymile/km_arm/km_arm.c
@@ -33,6 +33,7 @@ 
 #include <nand.h>
 #include <netdev.h>
 #include <miiphy.h>
+#include <spi.h>
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/kirkwood.h>
@@ -302,6 +303,16 @@  int km_hw_spi_bus_claim(int on)
 	return 0;
 }
 
+int board_spi_claim_bus(struct spi_slave *slave)
+{
+	return km_hw_spi_bus_claim(1);
+}
+
+void board_spi_release_bus(struct spi_slave *slave)
+{
+	km_hw_spi_bus_claim(0);
+}
+
 #if defined(CONFIG_CMD_SF)
 int do_spi_toggle(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {