From mboxrd@z Thu Jan 1 00:00:00 1970 From: Valentin Longchamp Date: Mon, 26 Mar 2012 13:34:40 +0200 Subject: [U-Boot] [PATCH v2 10/19] arm/km: implement weak function board_spi_clam_bus/release In-Reply-To: <1332761689-16666-1-git-send-email-valentin.longchamp@keymile.com> References: <1332761689-16666-1-git-send-email-valentin.longchamp@keymile.com> Message-ID: <1332761689-16666-11-git-send-email-valentin.longchamp@keymile.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Signed-off-by: Holger Brunck cc: Gerlando Falauto cc: Prafulla Wadaskar --- board/keymile/km_arm/km_arm.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) 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 #include #include +#include #include #include #include @@ -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[]) { -- 1.7.1