All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valentin Longchamp <valentin.longchamp@keymile.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 10/19] arm/km: implement weak function board_spi_clam_bus/release
Date: Mon, 26 Mar 2012 13:34:40 +0200	[thread overview]
Message-ID: <1332761689-16666-11-git-send-email-valentin.longchamp@keymile.com> (raw)
In-Reply-To: <1332761689-16666-1-git-send-email-valentin.longchamp@keymile.com>

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 --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[])
 {
-- 
1.7.1

  parent reply	other threads:[~2012-03-26 11:34 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26 11:34 [U-Boot] [PATCH v2 00/19] updates for keymile arm boards Valentin Longchamp
2012-03-26 11:34 ` [U-Boot] [PATCH v2 01/19] arm/km: add board type to boards.cfg Valentin Longchamp
2012-03-26 11:34 ` [U-Boot] [PATCH v2 02/19] arm/km: add piggy mac adress offset for mgcoge3un Valentin Longchamp
2012-03-26 11:34 ` [U-Boot] [PATCH v2 03/19] arm/km: rename CONFIG option CONFIG_KM_DEF_ENV_UPDATE Valentin Longchamp
2012-03-26 11:34 ` [U-Boot] [PATCH v2 04/19] arm/km: use ARRAY_SIZE macro Valentin Longchamp
2012-03-26 11:34 ` [U-Boot] [PATCH v2 05/19] arm/km: fix wrong comment in SDRAM config for mgcoge3un Valentin Longchamp
2012-03-26 11:34 ` [U-Boot] [PATCH v2 06/19] arm/km: change maintainer " Valentin Longchamp
2012-03-26 11:34 ` [U-Boot] [PATCH v2 07/19] arm/km: remove CONFIG_RESET_PHY_R Valentin Longchamp
2012-03-26 11:34 ` [U-Boot] [PATCH v2 08/19] arm/km: enable mii cmd Valentin Longchamp
2012-03-26 11:34 ` [U-Boot] [PATCH v2 09/19] arm/km: use correct kw_gpio function for NAND/SPI switching Valentin Longchamp
2012-03-26 11:34 ` Valentin Longchamp [this message]
2012-03-26 11:34 ` [U-Boot] [PATCH v2 11/19] arm/kirkwood: protect the ENV_SPI #defines Valentin Longchamp
2012-03-26 11:34 ` [U-Boot] [PATCH v2 12/19] km/arm: remove spi toggle command Valentin Longchamp
2012-03-26 11:34 ` [U-Boot] [PATCH v2 13/19] arm/km: add kmnusa board support Valentin Longchamp
2012-05-04  9:22   ` [U-Boot] [PATCH v3 " Holger Brunck
2012-03-26 11:34 ` [U-Boot] [PATCH v2 14/19] arm/km: add kmcoge5un " Valentin Longchamp
2012-05-04  9:24   ` [U-Boot] [PATCH v3 " Holger Brunck
2012-03-26 11:34 ` [U-Boot] [PATCH v2 15/19] arm/km: convert mgcoge3un target to km_kirkwood Valentin Longchamp
2012-03-26 11:34 ` [U-Boot] [PATCH v2 16/19] arm/km: remove portl2.h and use km_kirkwood instead Valentin Longchamp
2012-03-26 11:34 ` [U-Boot] [PATCH v2 17/19] arm/km: correct init of 88e6352 switch in the reset_phy function Valentin Longchamp
2012-03-26 11:34 ` [U-Boot] [PATCH v2 18/19] arm/km: enable BOCO2 FPGA download support Valentin Longchamp
2012-03-26 11:34 ` [U-Boot] [PATCH v2 19/19] arm/km: cleanup km_kirkwood boards Valentin Longchamp
2012-03-27 13:31 ` [U-Boot] [PATCH v2 00/19] updates for keymile arm boards Valentin Longchamp
2012-03-28  7:06   ` Prafulla Wadaskar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1332761689-16666-11-git-send-email-valentin.longchamp@keymile.com \
    --to=valentin.longchamp@keymile.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.