From patchwork Sat Mar 3 20:40:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 144409 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 B6914B6EE8 for ; Sat, 3 Mar 2012 18:40:22 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1S3jYR-0002iR-Ke; Sat, 03 Mar 2012 07:38:59 +0000 Received: from mail-pz0-f43.google.com ([209.85.210.43]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1S3jYN-0002i9-V2; Sat, 03 Mar 2012 07:38:56 +0000 Received: by damc16 with SMTP id c16so4025526dam.16 for ; Fri, 02 Mar 2012 23:38:52 -0800 (PST) Received-SPF: pass (google.com: domain of shijie8@gmail.com designates 10.68.218.98 as permitted sender) client-ip=10.68.218.98; Authentication-Results: mr.google.com; spf=pass (google.com: domain of shijie8@gmail.com designates 10.68.218.98 as permitted sender) smtp.mail=shijie8@gmail.com; dkim=pass header.i=shijie8@gmail.com Received: from mr.google.com ([10.68.218.98]) by 10.68.218.98 with SMTP id pf2mr3017847pbc.51.1330760332726 (num_hops = 1); Fri, 02 Mar 2012 23:38:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=Ccg1Oe89LsxAd+bnq0vejhjO49uMaFUSbFhg9rtEjgk=; b=rtbaBtkYKnyEWkuRZkDpw+qwvbQ/FrW+XRrUPKGiFW20GJ2dJ+/2NMa9T0hgvgyUbs llxXNu/kQYb99PYj+z/3cudozup5dmh85TxftCfj/KA9RwDEEzaNXA28rYXkEJDjeZXg fiqPG6a2//dD6X0Fi47U1mda+4a2Dp2iZYF1QDGUg2k7w1CXEXGdDD30ORq7S8dbQCAN XDxaNrS70a8kinsIjs3NN5w3SLWbTac/GK/ROcPxbrPGrV3EO4aZVho20U7ytIdK2sZH kSqNa7q0IPtPYjwxIFRP3A3YGJdiAnKWif2XIb5YsuiJX4e3DiSXu8Uzzwvu2WzTjZb/ F1Hg== Received: by 10.68.218.98 with SMTP id pf2mr2574924pbc.51.1330760332647; Fri, 02 Mar 2012 23:38:52 -0800 (PST) Received: from localhost.localdomain.Home ([180.155.110.107]) by mx.google.com with ESMTPS id vy2sm7158821pbb.48.2012.03.02.23.38.49 (version=SSLv3 cipher=OTHER); Fri, 02 Mar 2012 23:38:52 -0800 (PST) From: Huang Shijie To: artem.bityutskiy@linux.intel.com Subject: [PATCH] mtd/gpmi : move the __mxs_setl()/__mxs_clrl() to gpmi-lib.c Date: Sat, 3 Mar 2012 15:40:32 -0500 Message-Id: <1330807232-5616-1-git-send-email-shijie8@gmail.com> X-Mailer: git-send-email 1.7.4 X-Spam-Note: CRM114 invocation failed X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.43 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (shijie8[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 3.2 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (shijie8[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: Huang Shijie , linux-mtd@lists.infradead.org, w.sang@pengutronix.de, linux-arm-kernel@lists.infradead.org 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 We will meet the compiler error in mx6q, since there is no mxs.h header anymore. So move these two helper functions to gpmi-lib.c. Signed-off-by: Huang Shijie --- drivers/mtd/nand/gpmi-nand/gpmi-lib.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c index 5e3c505..9a208cb 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c @@ -21,7 +21,6 @@ #include #include #include -#include #include "gpmi-nand.h" #include "gpmi-regs.h" @@ -37,6 +36,19 @@ struct timing_threshod timing_default_threshold = { .max_dll_delay_in_ns = 16, }; +#define MXS_SET_ADDR 0x4 +#define MXS_CLR_ADDR 0x8 + +static inline void __mxs_setl(u32 mask, void __iomem *reg) +{ + writel(mask, reg + MXS_SET_ADDR); +} + +static inline void __mxs_clrl(u32 mask, void __iomem *reg) +{ + writel(mask, reg + MXS_CLR_ADDR); +} + /* * Clear the bit and poll it cleared. This is usually called with * a reset address and mask being either SFTRST(bit 31) or CLKGATE