From patchwork Tue Dec 9 15:29:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 419155 X-Patchwork-Delegate: jagannadh.teki@gmail.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 107B414009B for ; Wed, 10 Dec 2014 02:30:27 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AAD474B672; Tue, 9 Dec 2014 16:30:14 +0100 (CET) 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 XtmrIzPoV+Ql; Tue, 9 Dec 2014 16:30:14 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 544704B664; Tue, 9 Dec 2014 16:30:14 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 10D7C4B653 for ; Tue, 9 Dec 2014 16:30:07 +0100 (CET) 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 zoF1FU1LC4Wz for ; Tue, 9 Dec 2014 16:30:07 +0100 (CET) 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-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) by theia.denx.de (Postfix) with ESMTPS id D0D9F4B64D for ; Tue, 9 Dec 2014 16:30:01 +0100 (CET) Received: by mail-pd0-f178.google.com with SMTP id r10so757422pdi.9 for ; Tue, 09 Dec 2014 07:29:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=p+RZA22pAFzkokbU5Iw33O/4ZfRRRPK14x+QkfBp4eM=; b=Tq8lzwP2Vvy+TfUDA/gz7Bq/9+vuNkp+aNk7sJ4LOepq8OMd3jS44ciAXrzqTxRLHk v6V27996CIsfenub8U8oea3KfIp3Qw5+fTsd7mbgl9jiXyfQAxLZLzpI0hFx4zGaziii IDFAzCaeElhoLSmJpmee+DLnE/lD37qEcUPv4LMUcKcnSmKyeWe7qKhS/DA71hJ3FhL9 3MAhYPYLhG9sQE3YJgC3c0B8LfZnObTTKaX6TbG6qIhT1W/KQVi8mUIkyH2wtveUU4bl JFEZhBe7m1JOxQq6Ijt0E3ep6/ivh0oKT9Y4KBYjjLdlolFEvaNULzA/jSAfFUCkAvNl cEow== X-Received: by 10.70.43.105 with SMTP id v9mr32060479pdl.158.1418138998684; Tue, 09 Dec 2014 07:29:58 -0800 (PST) Received: from localhost.localdomain ([49.248.54.161]) by mx.google.com with ESMTPSA id hs10sm1815318pdb.33.2014.12.09.07.29.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Dec 2014 07:29:58 -0800 (PST) From: Jagannadha Sutradharudu Teki To: u-boot@lists.denx.de Date: Tue, 9 Dec 2014 20:59:38 +0530 Message-Id: <1418138980-2302-3-git-send-email-jagannadh.teki@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1418138980-2302-1-git-send-email-jagannadh.teki@gmail.com> References: <1418138980-2302-1-git-send-email-jagannadh.teki@gmail.com> Subject: [U-Boot] [PATCH 2/4] spi: Fix flag collision for SST_WP X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 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: Simon Glass At present SECT_4K is the same as SST_WP so we cannot tell these apart. Fix this so that the table in sf_params.c can be used correctly. Reported-by: Jens Rottmann Signed-off-by: Simon Glass Reviewed-by: Jagannadha Sutradharudu Teki --- drivers/mtd/spi/sf_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h index e159f04..7218e69 100644 --- a/drivers/mtd/spi/sf_internal.h +++ b/drivers/mtd/spi/sf_internal.h @@ -41,6 +41,7 @@ enum { SECT_32K = 1 << 1, E_FSR = 1 << 2, WR_QPP = 1 << 3, + SST_WP = 1 << 4, }; #define SPI_FLASH_3B_ADDR_LEN 3 @@ -104,7 +105,6 @@ enum { /* SST specific */ #ifdef CONFIG_SPI_FLASH_SST -# define SST_WP 0x01 /* Supports AAI word program */ # define CMD_SST_BP 0x02 /* Byte Program */ # define CMD_SST_AAI_WP 0xAD /* Auto Address Incr Word Program */