[U-Boot] [PATCH 19/20] arm/km: remove spi toggle command
Valentin Longchamp
valentin.longchamp at keymile.com
Thu Jun 7 12:06:59 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: 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 a71bd2f..2581d61 100644
--- a/board/keymile/km_arm/km_arm.c
+++ b/board/keymile/km_arm/km_arm.c
@@ -320,32 +320,6 @@ void board_spi_release_bus(struct spi_slave *slave)
kw_gpio_set_value(KM_FLASH_GPIO_PIN, 1);
}
-#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 66f382b..5fbb590 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -257,9 +257,8 @@ int get_scl(void);
#define CONFIG_KM_UPDATE_UBOOT \
"update=" \
- "spi on;sf probe 0;sf erase 0 +${filesize};" \
- "sf write ${load_addr_r} 0 ${filesize};" \
- "spi off\0"
+ "sf probe 0;sf erase 0 +${filesize};" \
+ "sf write ${load_addr_r} 0 ${filesize};\0"
#if defined CONFIG_KM_ENV_IS_IN_SPI_NOR
#define CONFIG_KM_NEW_ENV \
--
1.7.1
More information about the U-Boot
mailing list