From patchwork Wed Sep 13 02:05:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 112393 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp373391qgf; Tue, 12 Sep 2017 19:07:48 -0700 (PDT) X-Google-Smtp-Source: ADKCNb5uthXxdzL79ex/KDJhSX6Ic9H6Z7mn+HMkuYQWcIN0RSXX9jigR9DoEYnkiFGNpEuuUNGM X-Received: by 10.99.95.71 with SMTP id t68mr16203756pgb.432.1505268468794; Tue, 12 Sep 2017 19:07:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505268468; cv=none; d=google.com; s=arc-20160816; b=BK6JDd3+QBmrZZhps9nvEqOpouCUyLDNHKGpG7agVXa48f603yDFwjeBeFT0X2yy6Z 6MDfBqLEjvySu/4RcUHWqObIrq9/Kme08m9lIUkapbaAAlNhn1utpxyiUaf/pseAOPMF dX79cQbnM0OooHElHgzo5irLYQijH70RuzaW3RoHG4YZjpOIC6rSs/cGGdFSF2XTSr0D CI+/ks88NOXG7ZKGaGsRuO+9JOnP0/KrVmOhXKbAwJk0QJsqPlbM/Oc08I3Wzq2KNilY EgofQDFnA05XiMKmvcVeA68nuErQjk932bMN/qPcBeYQjUnCvn8cAzoL5a0viW6g+PBz mL/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:dkim-signature:dkim-filter:dkim-signature :arc-authentication-results; bh=eixr4ws0B4jpzCPVDMRA0oA4VMMn+LAWvng6rwCsTR8=; b=LwtyVW68wUsuBJ4+tt46NkkwIDoWirk6buhuuWZFhMhNLK8IFFKVNdwx9xHVTEeGgz /V2+6fH3lIIEZigvyCDs74ben/dTNFsEZ3kwQlt6i0BYGGIpXV1jtbEh6cgkAieavIO6 tFH9eRssJcUIrUyzKvi2SPagIcY7IaFj58hARqP1D596khO3855A4KrnlU+RbdPMt4Ud YhxaJ8l0aHc4+lG7BEKtmOFB52vlqdNFrZ7pQnEqAJKq5Nw3pdWZgRMlr41UsbrIyr83 htTVccPDIzSWQ+cI6jGp1+UQcbmZFIpcYIufBnRQAU4EElt95VgdnsXH61yOcA0n4Msf rA+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=s/ZRduAo; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=rRliQ1bM; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-mtd-bounces+patch=linaro.org@lists.infradead.org Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id h8si8074393pgq.25.2017.09.12.19.07.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Sep 2017 19:07:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=s/ZRduAo; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=rRliQ1bM; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-mtd-bounces+patch=linaro.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=eixr4ws0B4jpzCPVDMRA0oA4VMMn+LAWvng6rwCsTR8=; b=s/ZRduAoExEEw0OzOzSYDh6dKi QGy0BEBb0hFDPWuFJm7CgNCtN5F6u02eybsZT+Y7UiHabQ80HLo9Z/lc5AMFP4V8PlwWn0QDUH0cY KJ6VuvfTFB/cHib0hD/ONSkMhAMwTBFAUS2xb30Cc/zEOn7JJzbdtRuFMhCL56f0AQARNVMqo3jji 0PpyllNk1JQgMSwT8osMuckpH5MvkWHMjgj/uXda68CDmYFnkZFHJHsipz0MgfQ698UynC3VEVL5V s2RqbgMl2pqlt7vdGIOhZn1fvEluCBgYr1FcjLHkjQhqovazL9gKrRB9OSUJSnXi5oN3QDDxgAGYf YjQ2ZJLQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1drx5W-00014A-S6; Wed, 13 Sep 2017 02:07:38 +0000 Received: from conuserg-10.nifty.com ([210.131.2.77]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1drx4m-0000PW-Fv for linux-mtd@lists.infradead.org; Wed, 13 Sep 2017 02:06:59 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id v8D25uqB022945; Wed, 13 Sep 2017 11:05:59 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com v8D25uqB022945 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1505268359; bh=Pp8ErW7A0jElDfN2Cy6eG5afu4VeTVMOkbyQ9DH3wfk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rRliQ1bMEYQYkJ1/5KkTlbAPsqhoNGXa4rqftuGfY3if0Dn5sAqLxrfq2Vq91p6FH rtmyEPRPoA4LwIxhg6lJ9aXjq3xvKIOQEElYkT9ZePjr9n0frHFkb6jNrWQc7Kkp8n Bhi195ul72ehEy+cj5V53Yx29tSN2RdUu/Fc2nhGmPynjNVshXmGBvp46LywJQtKpZ KI47x9t1CS5iskkpBku8lN7UD0nda3Rlc5b6Cn93qfoGrrMbqaQveGEQOnzsxKbQYD ZSSQa//oAxqVHmLm+uZ7ZEtJtRvr8/03f5dqj0fppo2D7nhsKRzJ0Mbh/cZMcVhsQ5 IODupE4VOIbWA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mtd@lists.infradead.org Subject: [PATCH v2 2/2] mtd: nand: denali: support two row address cycle devices Date: Wed, 13 Sep 2017 11:05:51 +0900 Message-Id: <1505268351-31941-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505268351-31941-1-git-send-email-yamada.masahiro@socionext.com> References: <1505268351-31941-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170912_190653_483883_4484712E X-CRM114-Status: GOOD ( 10.06 ) X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Boris Brezillon , Marek Vasut , Richard Weinberger , linux-kernel@vger.kernel.org, Masahiro Yamada , Cyrille Pitchen , Brian Norris , David Woodhouse MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org The register TWO_ROW_ADDR_CYCLES specifies the number of row address cycles of the device, but it is fixed to 0 in the driver init code (i.e. always 3 row address cycles). Reflect the result of nand_scan_ident() to the register setting in order to support 2 row address cycle devices. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/mtd/nand/denali.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index 3087b0b..aefdc83 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -1137,8 +1137,6 @@ static void denali_hw_init(struct denali_nand_info *denali) iowrite32(0xffff, denali->reg + SPARE_AREA_MARKER); - /* Should set value for these registers when init */ - iowrite32(0, denali->reg + TWO_ROW_ADDR_CYCLES); iowrite32(1, denali->reg + ECC_ENABLE); } @@ -1379,6 +1377,8 @@ int denali_init(struct denali_nand_info *denali) denali->reg + PAGES_PER_BLOCK); iowrite32(chip->options & NAND_BUSWIDTH_16 ? 1 : 0, denali->reg + DEVICE_WIDTH); + iowrite32(chip->options & NAND_ROW_ADDR_3 ? 0 : TWO_ROW_ADDR_CYCLES__FLAG, + denali->reg + TWO_ROW_ADDR_CYCLES); iowrite32(mtd->writesize, denali->reg + DEVICE_MAIN_AREA_SIZE); iowrite32(mtd->oobsize, denali->reg + DEVICE_SPARE_AREA_SIZE);