From patchwork Wed Mar 26 16:39:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 27154 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f197.google.com (mail-yk0-f197.google.com [209.85.160.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 595CB20369 for ; Wed, 26 Mar 2014 16:44:58 +0000 (UTC) Received: by mail-yk0-f197.google.com with SMTP id 19sf1962634ykq.4 for ; Wed, 26 Mar 2014 09:44:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=fsEpBQsurW5u56LIMvIi/N2gcD1lgFL/1OIiEZz2S8k=; b=BAz8kMcpstozxbUEtYbrt2c+dYad3Ens5iLDgNebpTN+BccKj5NXlE2oIe47C49WA6 vY+MJoorqVCAAQ0WpXUE+8n/o5+pbLpLS21IvQoBOzNntqpzIsExAgGqLfJr2FOgS5qz dnmaLBfKe8hhbdDgnij3Bx7A8lVbQXKbUkb2yaWwDhOTchanb1DvPX66pMXKSnMM5BJP /08+NNXmuTfW3WTPJ2okgVfqt8dZCCNDJRYOTVa0gWuHmzkhF9l14h8uCyIcACVhTgVn ZwhDO8dqxC3WMlrSkkbh8rWGfsgU3WhDxUmsSlte2wIhWxSvlQvD5nZLLTR3QFhZEPwG W7kQ== X-Gm-Message-State: ALoCoQn+Ac2lAJikrbuw5fwk8qRK+V6QqrJRei/ZrQcAf72oZwRzuM1S4DoY6B+Gmbf9PK76xcWl X-Received: by 10.236.90.200 with SMTP id e48mr23996406yhf.28.1395852298147; Wed, 26 Mar 2014 09:44:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.43.134 with SMTP id e6ls604073qga.17.gmail; Wed, 26 Mar 2014 09:44:57 -0700 (PDT) X-Received: by 10.52.231.72 with SMTP id te8mr241266vdc.54.1395852297861; Wed, 26 Mar 2014 09:44:57 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id yv5si4658166veb.26.2014.03.26.09.44.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Mar 2014 09:44:57 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id id10so2710202vcb.40 for ; Wed, 26 Mar 2014 09:44:57 -0700 (PDT) X-Received: by 10.220.114.135 with SMTP id e7mr12171814vcq.23.1395852297774; Wed, 26 Mar 2014 09:44:57 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp61452vck; Wed, 26 Mar 2014 09:44:57 -0700 (PDT) X-Received: by 10.68.99.194 with SMTP id es2mr88339454pbb.100.1395852296624; Wed, 26 Mar 2014 09:44:56 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nc6si13992562pbc.238.2014.03.26.09.44.55; Wed, 26 Mar 2014 09:44:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755820AbaCZQov (ORCPT + 26 others); Wed, 26 Mar 2014 12:44:51 -0400 Received: from mail-wg0-f48.google.com ([74.125.82.48]:41790 "EHLO mail-wg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755954AbaCZQkD (ORCPT ); Wed, 26 Mar 2014 12:40:03 -0400 Received: by mail-wg0-f48.google.com with SMTP id l18so1445714wgh.31 for ; Wed, 26 Mar 2014 09:40:00 -0700 (PDT) X-Received: by 10.180.182.199 with SMTP id eg7mr33645646wic.13.1395852000798; Wed, 26 Mar 2014 09:40:00 -0700 (PDT) Received: from lee--X1.home (host109-148-113-193.range109-148.btcentralplus.com. [109.148.113.193]) by mx.google.com with ESMTPSA id gp10sm3913806wib.13.2014.03.26.09.39.59 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Mar 2014 09:39:59 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: lee.jones@linaro.org, kernel@stlinux.com, computersforpeace@gmail.com, linux-mtd@lists.infradead.org, angus.clark@st.com Subject: [PATCH 06/15] mtd: st_spi_fsm: Add support for Macronix MX25L3255E Date: Wed, 26 Mar 2014 16:39:20 +0000 Message-Id: <1395851969-13520-7-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1395851969-13520-1-git-send-email-lee.jones@linaro.org> References: <1395851969-13520-1-git-send-email-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Angus Clark This patch adds support for the Macronix MX25L3255E device. Unlike the other Macronix devices we have seen, this device supports WRITE_1_4_4 at reasonable frequencies. Rather than masking out WRITE_1_4_4 support altogether, we now rely on the table parameters to indicate whether or not WRITE_1_4_4 should be used. Signed-off-by: Angus Clark Signed-off-by: Lee Jones --- drivers/mtd/devices/st_spi_fsm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/devices/st_spi_fsm.c b/drivers/mtd/devices/st_spi_fsm.c index 148c86f..8c56b94 100644 --- a/drivers/mtd/devices/st_spi_fsm.c +++ b/drivers/mtd/devices/st_spi_fsm.c @@ -372,14 +372,20 @@ static struct flash_info flash_types[] = { { "m25px32", 0x207116, 0, 64 * 1024, 64, M25PX_FLAG, 75, NULL }, { "m25px64", 0x207117, 0, 64 * 1024, 128, M25PX_FLAG, 75, NULL }, + /* Macronix MX25xxx + * - Support for 'FLASH_FLAG_WRITE_1_4_4' is omitted for devices + * where operating frequency must be reduced. + */ #define MX25_FLAG (FLASH_FLAG_READ_WRITE | \ FLASH_FLAG_READ_FAST | \ FLASH_FLAG_READ_1_1_2 | \ FLASH_FLAG_READ_1_2_2 | \ FLASH_FLAG_READ_1_1_4 | \ - FLASH_FLAG_READ_1_4_4 | \ FLASH_FLAG_SE_4K | \ FLASH_FLAG_SE_32K) + { "mx25l3255e", 0xc29e16, 0, 64 * 1024, 64, + (MX25_FLAG | FLASH_FLAG_WRITE_1_4_4), 86, + stfsm_mx25_config}, { "mx25l25635e", 0xc22019, 0, 64*1024, 512, (MX25_FLAG | FLASH_FLAG_32BIT_ADDR | FLASH_FLAG_RESET), 70, stfsm_mx25_config },