From patchwork Wed Aug 17 07:19:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenyou Yang X-Patchwork-Id: 659979 X-Patchwork-Delegate: trini@ti.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 3sDgt52lR2z9sXx for ; Wed, 17 Aug 2016 17:32:29 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9C5F34B99D; Wed, 17 Aug 2016 09:32:26 +0200 (CEST) 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 zzngwcGVYjgu; Wed, 17 Aug 2016 09:32:26 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C60304B951; Wed, 17 Aug 2016 09:32:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5FDDD4B951 for ; Wed, 17 Aug 2016 09:32:23 +0200 (CEST) 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 aMRrtD1SEk9M for ; Wed, 17 Aug 2016 09:32:23 +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 eusmtp01.atmel.com (eusmtp01.atmel.com [212.144.249.242]) by theia.denx.de (Postfix) with ESMTPS id 335804B71E for ; Wed, 17 Aug 2016 09:32:19 +0200 (CEST) Received: from apsmtp01.atmel.com (10.168.254.30) by eusmtp01.atmel.com (10.145.145.30) with Microsoft SMTP Server id 14.3.235.1; Wed, 17 Aug 2016 09:32:16 +0200 Received: from shaarm01.corp.atmel.com (10.168.254.13) by apsmtp01.corp.atmel.com (10.168.254.30) with Microsoft SMTP Server id 14.3.235.1; Wed, 17 Aug 2016 15:39:29 +0800 From: Wenyou Yang To: U-Boot Mailing List Date: Wed, 17 Aug 2016 15:19:39 +0800 Message-ID: <1471418380-12481-1-git-send-email-wenyou.yang@atmel.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Cc: Jagan Teki Subject: [U-Boot] [PATCH] sf: fix sf probe X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Cyrille Pitchen This patch fixes the "sf probe" command. The very first SPI flash probe passes, for instance when u-boot tries to read its environment settings from a (Q)SPI memory but next "sf probe" commands fail because the flash memory node is unbound from the SPI controller children nodes. Signed-off-by: Cyrille Pitchen Signed-off-by: Wenyou Yang Tested-by: Stefan Roese Tested-by: Hannes Schmelzer Reviewed-by: Simon Glass --- cmd/sf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/sf.c b/cmd/sf.c index 286906c..65b117f 100644 --- a/cmd/sf.c +++ b/cmd/sf.c @@ -125,7 +125,6 @@ static int do_spi_flash_probe(int argc, char * const argv[]) ret = spi_find_bus_and_cs(bus, cs, &bus_dev, &new); if (!ret) { device_remove(new); - device_unbind(new); } flash = NULL; ret = spi_flash_probe_bus_cs(bus, cs, speed, mode, &new);