From patchwork Fri May 25 23:14:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 161437 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 6F348B6EEC for ; Sat, 26 May 2012 09:16:49 +1000 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SY3jI-0006zk-1P; Fri, 25 May 2012 23:15:32 +0000 Received: from mail-vb0-f49.google.com ([209.85.212.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SY3jF-0006yR-Pu for linux-mtd@lists.infradead.org; Fri, 25 May 2012 23:15:30 +0000 Received: by mail-vb0-f49.google.com with SMTP id fo1so1234373vbb.36 for ; Fri, 25 May 2012 16:15:29 -0700 (PDT) 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:in-reply-to:references; bh=FD3l4OH/79abYBvGdXqdqsKrNMogoaBbmdeinI2PzEk=; b=a8ggCcKGbcxNo7hE4D3li92at3uuSHz7aioRAkCc1BIEilSRangK6e5Gzw4BcsdxDa 9Dq43vundnlbevuvBW83QlEAkfAAWNJ/F0cMSpmZ860PY63JVLddlF1W9Egly+oO9CdN squixv8KUcXwpicntCQoUqSNYBZOdhkl0diQnxPZ9u6RkftBvjCYl3RF4CtIH/D7ZV9o rjum23uL9grIz/lx39a8akPXPh75oh2gjhAPfFOZF/8qzJ3FWbowJKYHFYELkZB7COtY +oEUKq9JL2lW2uRcRCvsExb2jthsfSC2hpbbAzwKf5V6B7m6XYA11bJdB19QKBVe0lBy X4hg== Received: by 10.52.29.179 with SMTP id l19mr599235vdh.73.1337987729617; Fri, 25 May 2012 16:15:29 -0700 (PDT) Received: from localhost.localdomain ([201.82.161.72]) by mx.google.com with ESMTPS id s10sm2787583vdg.10.2012.05.25.16.15.27 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 25 May 2012 16:15:28 -0700 (PDT) From: Fabio Estevam To: kernel@pengutronix.de Subject: [PATCH 09/15] nand: mxc_nand: Use clk_prepare_enable/clk_disable_unprepare Date: Fri, 25 May 2012 20:14:50 -0300 Message-Id: <1337987696-31728-9-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1337987696-31728-1-git-send-email-festevam@gmail.com> References: <1337987696-31728-1-git-send-email-festevam@gmail.com> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (festevam[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_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: Fabio Estevam , Artem Bityutskiy , linux-mtd@lists.infradead.org, shawn.guo@freescale.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 From: Fabio Estevam Prepare the clock before enabling it. Cc: Artem Bityutskiy Cc: Signed-off-by: Fabio Estevam --- drivers/mtd/nand/mxc_nand.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index fd14966..d6efa17 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c @@ -764,7 +764,7 @@ static void mxc_nand_select_chip_v2(struct mtd_info *mtd, int chip) if (chip == -1) { /* Disable the NFC clock */ if (host->clk_act) { - clk_disable(host->clk); + clk_disable_unprepare(host->clk); host->clk_act = 0; } return; @@ -772,7 +772,7 @@ static void mxc_nand_select_chip_v2(struct mtd_info *mtd, int chip) if (!host->clk_act) { /* Enable the NFC clock */ - clk_enable(host->clk); + clk_prepare_enable(host->clk); host->clk_act = 1; }