From patchwork Tue May 15 14:11:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Longchamp X-Patchwork-Id: 159348 X-Patchwork-Delegate: prafulla@marvell.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id CAA0DB6F9F for ; Wed, 16 May 2012 00:27:43 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F345928119; Tue, 15 May 2012 16:26:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7-dwTy4jXvx6; Tue, 15 May 2012 16:26:01 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3127F28106; Tue, 15 May 2012 16:23:12 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 40D88280AC for ; Tue, 15 May 2012 16:21:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TSqQ91RMA2LO for ; Tue, 15 May 2012 16:21:38 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail.ch.keymile.com (mail.ch.keymile.com [193.17.201.103]) by theia.denx.de (Postfix) with SMTP id 65D44280AF for ; Tue, 15 May 2012 16:21:26 +0200 (CEST) Received: from SRVCHBER1212.ch.keymile.net ([172.31.32.9]) by eSafe SMTP Relay 1334159602; Tue, 15 May 2012 16:11:08 +0200 Received: from chber1-10533x.ch.keymile.net ([172.31.40.3]) by SRVCHBER1212.ch.keymile.net with Microsoft SMTPSVC(6.0.3790.4675); Tue, 15 May 2012 16:11:07 +0200 From: Valentin Longchamp To: To: prafulla@marvell.com, holger.brunck@keymile.com Date: Tue, 15 May 2012 16:11:03 +0200 Message-Id: <1337091064-30561-27-git-send-email-valentin.longchamp@keymile.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1337091064-30561-1-git-send-email-valentin.longchamp@keymile.com> References: <1337091064-30561-1-git-send-email-valentin.longchamp@keymile.com> X-OriginalArrivalTime: 15 May 2012 14:11:07.0078 (UTC) FILETIME=[92197660:01CD32A4] X-ESAFE-STATUS: [srvchber1306.keymile.net] Mail allowed Cc: Valentin Longchamp , Gerlando@theia.denx.de, u-boot@lists.denx.de, Holger Brunck , Falauto Subject: [U-Boot] [PATCH v4 26/27] km/arm: remove spi toggle command X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Holger Brunck 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 Signed-off-by: Valentin Longchamp cc: Gerlando Falauto cc: Prafulla Wadaskar --- 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 d370c8c..220cac0 100644 --- a/board/keymile/km_arm/km_arm.c +++ b/board/keymile/km_arm/km_arm.c @@ -318,32 +318,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", - " - 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 547b579..18b114f 100644 --- a/include/configs/km/km_arm.h +++ b/include/configs/km/km_arm.h @@ -253,9 +253,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" #if defined CONFIG_KM_ENV_IS_IN_SPI_NOR #define CONFIG_KM_NEW_ENV \