From patchwork Sun Oct 30 17:46:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 688994 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 3t6Q3P0TT1z9s9N for ; Mon, 31 Oct 2016 04:49:05 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EE1C3A754A; Sun, 30 Oct 2016 18:48:24 +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 3jPV9WQ9WvQs; Sun, 30 Oct 2016 18:48:24 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A5EA7A75D5; Sun, 30 Oct 2016 18:47:59 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C9766A75A9 for ; Sun, 30 Oct 2016 18:47:44 +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 CR6YtyJV2IOu for ; Sun, 30 Oct 2016 18:47:44 +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-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by theia.denx.de (Postfix) with ESMTPS id 15AE8A75A8 for ; Sun, 30 Oct 2016 18:47:38 +0100 (CET) Received: by mail-pf0-f195.google.com with SMTP id a136so3208252pfa.0 for ; Sun, 30 Oct 2016 10:47:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2bwJdIIUpAjo4/xaaCPW1M2xP56x/4LYSaqLRg4aNvo=; b=I4PdGw5kZm8nGpv1/WtDgjvox7AmKBg6ijWQUj0HXSqGuXnwaGXPRnGDMY1z07TkWc rBRVPEcs2jz9wxymwBuBXcHFUZLvxgk+ViyRxqhfuL4+jpF2zl6nNAqN8O/60id2uzKa dIMIh6b20BZy1QyJeV7/sMLjQfxoS43xSMmig6Ke7Mar9ofKBxzOUy7x7NcRCnUbxlaw KgfIEMfYtZz0TRHmoauEbcXGZOSUzTRhyDBiNy/qYeGDV0cWVR7oqFAA7q953fx+tMH+ oHoa0GXrdx8y0mg9aWxUWWFa4H/0kVLuWttHt0mMswKnIYJZpI9r+Huzr6y4d1ozsaiv 4xbw== X-Gm-Message-State: ABUngvcilJ8X39SFHJD8kJkVxiahPAvoUDbKIJdH5kTYmuKqlZr0eKooo4BXEhqkU90TLA== X-Received: by 10.98.11.71 with SMTP id t68mr2076727pfi.136.1477849656841; Sun, 30 Oct 2016 10:47:36 -0700 (PDT) Received: from Mr.J ([49.204.230.134]) by smtp.gmail.com with ESMTPSA id s7sm4138882pfg.32.2016.10.30.10.47.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 30 Oct 2016 10:47:35 -0700 (PDT) From: Jagan Teki To: u-boot@lists.denx.de Date: Sun, 30 Oct 2016 23:16:19 +0530 Message-Id: <1477849590-11954-11-git-send-email-jagan@openedev.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477849590-11954-1-git-send-email-jagan@openedev.com> References: <1477849590-11954-1-git-send-email-jagan@openedev.com> Cc: Yunhui Cui , Michal Simek , Siva Durga Prasad Paladugu , Jagan Teki Subject: [U-Boot] [PATCH v5 10/21] sf: params: Add S25FS256S_64K spi flash support 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add Spansion S25FS256S_64K spi flash to the list of spi_flash_ids. In spansion S25FS-S family the physical sectors are grouped as normal and parameter sectors. Parameter sectors are 4kB in size with 8 set located at the bottom or top address of a device. Normal sectors are similar to other flash family with sizes of 64kB or 32 kB. To erase whole flash using sector erase(D8h or DCh) won't effect the parameter sectors, so in order to erase these we must use 4K sector erase commands (20h or 21h) separately. So better to erase the whole flash using 4K sector erase instead of detecting these family parts again and do two different erase operations. Cc: Yunhui Cui Cc: Simon Glass Cc: Bin Meng Cc: York Sun Cc: Vignesh R Cc: Mugunthan V N Cc: Michal Simek Cc: Michael Trimarchi Cc: Siva Durga Prasad Paladugu Signed-off-by: Jagan Teki Reviewed-by: Simon Glass --- drivers/mtd/spi/sf_params.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/spi/sf_params.c b/drivers/mtd/spi/sf_params.c index 344d9c9..b029c76 100644 --- a/drivers/mtd/spi/sf_params.c +++ b/drivers/mtd/spi/sf_params.c @@ -93,6 +93,7 @@ const struct spi_flash_info spi_flash_ids[] = { {"S25FL128S_64K", INFO(0x012018, 0x4d01, 64 * 1024, 256, RD_FULL | WR_QPP) }, {"S25FL256S_256K", INFO(0x010219, 0x4d00, 256 * 1024, 128, RD_FULL | WR_QPP) }, {"S25FL256S_64K", INFO(0x010219, 0x4d01, 64 * 1024, 512, RD_FULL | WR_QPP) }, + {"S25FS256S_64K", INFO6(0x010219, 0x4d0181, 64 * 1024, 512, RD_FULL | WR_QPP | SECT_4K) }, {"S25FS512S", INFO(0x010220, 0x4D00, 128 * 1024, 512, RD_FULL | WR_QPP) }, {"S25FL512S_256K", INFO(0x010220, 0x4d00, 256 * 1024, 256, RD_FULL | WR_QPP) }, {"S25FL512S_64K", INFO(0x010220, 0x4d01, 64 * 1024, 1024, RD_FULL | WR_QPP) },