[U-Boot] [PATCH v2 12/19] km/arm: remove spi toggle command

Valentin Longchamp valentin.longchamp at keymile.com
Mon Mar 26 13:34:42 CEST 2012


From: Holger Brunck <holger.brunck at keymile.com>

Now we toggle between SPI and NAND flash automatically if
we claim the SPI bus. So we can get rid of this command.

Signed-off-by: Holger Brunck <holger.brunck at keymile.com>
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>
---
 board/keymile/km_arm/km_arm.c |   26 --------------------------
 include/configs/km/km_arm.h   |    5 ++---
 2 files changed, 2 insertions(+), 29 deletions(-)

diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c
index dcecf83..10c9a5f 100644
--- a/board/keymile/km_arm/km_arm.c
+++ b/board/keymile/km_arm/km_arm.c
@@ -313,32 +313,6 @@ 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[])
-{
-	if (argc < 2)
-		return cmd_usage(cmdtp);
-
-	if ((strcmp(argv[1], "off") == 0)) {
-		printf("SPI FLASH disabled, NAND enabled\n");
-		km_hw_spi_bus_claim(0);
-	} else if ((strcmp(argv[1], "on") == 0)) {
-		printf("SPI FLASH enabled, NAND disabled\n");
-		km_hw_spi_bus_claim(1);
-	} else {
-		return cmd_usage(cmdtp);
-	}
-
-	return 0;
-}
-
-U_BOOT_CMD(
-	spitoggle,	2,	0,	do_spi_toggle,
-	"En-/disable SPI FLASH access",
-	"<on|off> - Enable (on) or disable (off) SPI FLASH access\n"
-	);
-#endif
-
 int dram_init(void)
 {
 	/* dram_init must store complete ramsize in gd->ram_size */
diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h
index e2e8793..edb8f4e 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -237,9 +237,8 @@ int get_scl(void);
 
 #define	CONFIG_KM_UPDATE_UBOOT						\
 	"update="							\
-		"spi on;sf probe 0;sf erase 0 50000;"			\
-		"sf write ${load_addr_r} 0 ${filesize};"		\
-		"spi off\0"
+		"sf probe 0;sf erase 0 50000;"				\
+		"sf write ${load_addr_r} 0 ${filesize};\0"
 
 /*
  * Default environment variables
-- 
1.7.1



More information about the U-Boot mailing list