From patchwork Wed Apr 23 10:16:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 4040261 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 127C1BFF02 for ; Wed, 23 Apr 2014 11:16:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4C106201EC for ; Wed, 23 Apr 2014 11:16:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6FF0A201E7 for ; Wed, 23 Apr 2014 11:16:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wcv8b-0007Kn-E5; Wed, 23 Apr 2014 11:14:49 +0000 Received: from mail-bn1blp0181.outbound.protection.outlook.com ([207.46.163.181] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wcv8K-00079h-N5; Wed, 23 Apr 2014 11:14:33 +0000 Received: from CH1PR03CA005.namprd03.prod.outlook.com (10.255.156.150) by BLUPR03MB423.namprd03.prod.outlook.com (10.141.78.150) with Microsoft SMTP Server (TLS) id 15.0.921.12; Wed, 23 Apr 2014 11:14:18 +0000 Received: from BY2FFO11FD034.protection.gbl (10.255.156.132) by CH1PR03CA005.outlook.office365.com (10.255.156.150) with Microsoft SMTP Server (TLS) id 15.0.921.12 via Frontend Transport; Wed, 23 Apr 2014 11:14:18 +0000 Received: from az84smr01.freescale.net (192.88.158.246) by BY2FFO11FD034.mail.protection.outlook.com (10.1.14.219) with Microsoft SMTP Server (TLS) id 15.0.929.8 via Frontend Transport; Wed, 23 Apr 2014 11:14:18 +0000 Received: from shlinux2.ap.freescale.net (shlinux2.ap.freescale.net [10.192.224.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s3NBDxmY008408; Wed, 23 Apr 2014 04:14:15 -0700 From: Huang Shijie To: Subject: [PATCH v1 5/7] mtd: fsl-quadspi: get the dummy cycles for DDR Quad read from the DT property Date: Wed, 23 Apr 2014 18:16:53 +0800 Message-ID: <1398248215-26768-6-git-send-email-b32955@freescale.com> X-Mailer: git-send-email 1.7.2.rc3 In-Reply-To: References: X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.246; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009001)(6009001)(428001)(189002)(199002)(50986999)(77096999)(80976001)(19580405001)(6806004)(36756003)(19580395003)(83322001)(44976005)(46102001)(31966008)(77982001)(74662001)(48376002)(74502001)(76176999)(88136002)(92566001)(85852003)(83072002)(89996001)(87936001)(4396001)(87286001)(50226001)(77156001)(93916002)(81342001)(81542001)(99396002)(92726001)(11926002)(62966002)(76482001)(33646001)(80022001)(79102001)(20776003)(47776003)(50466002)(42262001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB423; H:az84smr01.freescale.net; FPR:F08ED660.31248898.FE4136F.9CB6EE71.20175; MLV:sfv; PTR:gate-az5.freescale.com; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Forefront-PRVS: 01901B3451 Received-SPF: None (: freescale.com does not designate permitted sender hosts) X-OriginatorOrg: freescale.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140423_041432_851321_537753E9 X-CRM114-Status: UNSURE ( 8.87 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) Cc: marex@denx.de, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-spi@vger.kernel.org, Huang Shijie , linux-mtd@lists.infradead.org, computersforpeace@gmail.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Check the "spi-nor,ddr-quad-read-dummy" DT property to get the dummy cycles for DDR quad read. Signed-off-by: Huang Shijie --- drivers/mtd/spi-nor/fsl-quadspi.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c index 8d659a2..15bdeb9 100644 --- a/drivers/mtd/spi-nor/fsl-quadspi.c +++ b/drivers/mtd/spi-nor/fsl-quadspi.c @@ -883,6 +883,7 @@ static int fsl_qspi_probe(struct platform_device *pdev) for_each_available_child_of_node(dev->of_node, np) { const struct spi_device_id *id; char modalias[40]; + u32 dummy = 0; /* skip the holes */ if (!has_second_chip) @@ -918,6 +919,12 @@ static int fsl_qspi_probe(struct platform_device *pdev) if (ret < 0) goto map_failed; + /* Set the dummy cycles for the DDR Quad Read */ + ret = of_property_read_u32(np, "spi-nor,ddr-quad-read-dummy", + &dummy); + if (!ret && dummy > 0 && dummy < 8) + nor->read_dummy = dummy; + /* set the chip address for READID */ fsl_qspi_set_base_addr(q, nor);