From patchwork Tue Nov 6 16:44:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu CASTET X-Patchwork-Id: 197505 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 216BE2C0168 for ; Wed, 7 Nov 2012 03:45:33 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TVmGi-0007AK-1O; Tue, 06 Nov 2012 16:44:52 +0000 Received: from mail-bk0-f49.google.com ([209.85.214.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TVmGe-00079N-S8 for linux-mtd@lists.infradead.org; Tue, 06 Nov 2012 16:44:49 +0000 Received: by mail-bk0-f49.google.com with SMTP id j4so317724bkw.36 for ; Tue, 06 Nov 2012 08:44:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=Ldgdkxdare99OhUxxmpQKgtjMKRI9Hd506odoAASkgM=; b=DI0TkoL5xY2IURz8X8f3NcGh6/R2rD+ZlQlnEvQfjDgHwPTrhVvNroFkWJYaA8yEw2 GfACN6GI+DgrYXbNwVRtF6LcnftOCeQTBe8ajz9fx7wjVFTl2KT+su6QKNTKBneEOEf+ LJGY5V+d5e232Ms5kGgBaJL8WG7MtU5fZfFombrywywVu2nb/Fd2Ioh1+q3Io9dDxMlC Pt7bkGuXxl/rq91iJB+fjpyWdQcPMSU6YUCdvCHY/04GPXDJ8uycriP8hxyODKN+AO76 2PnmDV8p/KRjnrp/RYuLLFVDsZPw8eK7/xPVXB27naMa2EFriobkCCppUViE9yIMuPel BHjQ== Received: by 10.204.150.213 with SMTP id z21mr459096bkv.45.1352220286726; Tue, 06 Nov 2012 08:44:46 -0800 (PST) Received: from perruche.Parrot.Biz ([46.218.109.82]) by mx.google.com with ESMTPS id ia2sm12666466bkc.11.2012.11.06.08.44.43 (version=SSLv3 cipher=OTHER); Tue, 06 Nov 2012 08:44:45 -0800 (PST) From: Matthieu CASTET To: linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org Subject: [PATCH 1/3] omap gpmc : add support of setting CYCLE2CYCLEDELAY and BUSTURNAROUND Date: Tue, 6 Nov 2012 17:44:35 +0100 Message-Id: <1352220277-4251-1-git-send-email-matthieu.castet@parrot.com> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121106_114449_095133_FBF01FD8 X-CRM114-Status: GOOD ( 13.64 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.214.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (matthieu.castet[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Matthieu CASTET , dedekind1@gmail.com X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Signed-off-by: Matthieu CASTET --- arch/arm/mach-omap2/gpmc.c | 7 ++++++- arch/arm/plat-omap/include/plat/gpmc.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 8ab1e1b..3957ffc 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -333,8 +333,13 @@ int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t) if (gpmc_capability & GPMC_HAS_WR_DATA_MUX_BUS) GPMC_SET_ONE(GPMC_CS_CONFIG6, 16, 19, wr_data_mux_bus); - if (gpmc_capability & GPMC_HAS_WR_ACCESS) + if (gpmc_capability & GPMC_HAS_WR_ACCESS) { + /* XXX check on which hardware it is supported */ + GPMC_SET_ONE(GPMC_CS_CONFIG6, 0, 3, busturnaround); + GPMC_SET_ONE(GPMC_CS_CONFIG6, 8, 11, cycle2cycledelay); + GPMC_SET_ONE(GPMC_CS_CONFIG6, 24, 28, wr_access); + } /* caller is expected to have initialized CONFIG1 to cover * at least sync vs async diff --git a/arch/arm/plat-omap/include/plat/gpmc.h b/arch/arm/plat-omap/include/plat/gpmc.h index 2e6e259..34ca454 100644 --- a/arch/arm/plat-omap/include/plat/gpmc.h +++ b/arch/arm/plat-omap/include/plat/gpmc.h @@ -131,6 +131,8 @@ struct gpmc_timings { /* The following are only on OMAP3430 */ u16 wr_access; /* WRACCESSTIME */ u16 wr_data_mux_bus; /* WRDATAONADMUXBUS */ + u16 cycle2cycledelay; /* CYCLE2CYCLEDELAY */ + u16 busturnaround; /* BUSTURNAROUND */ }; struct gpmc_nand_regs {