From patchwork Thu Apr 18 10:27:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 16225 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3EC8F23974 for ; Thu, 18 Apr 2013 10:28:14 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id m1sf100778yhg.11 for ; Thu, 18 Apr 2013 03:27:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=/D0zEQlEJxSbasianyZyGZObQGp9pmDH9NGNWvl6AAM=; b=CCnTl/u43GXsrgimWbBfPCuLqE+TL70rVNuUPC6JSmxquYWqVFdHF30UwU7Rnzpq9v hJvVWeCJBwAiL7gOnJvr40zZI8EOBO+0znUgYGe+3O/TNIoPv+zxA17FKhIIsV2R2TnV VmJ2nPiNjNRRhrI3p/T9RGuwpM/JCwtQmwV5C6J8A0eJ8vmoA0BhiDiuRaW6jgeqDJz6 Mzz1bqQmY/cf+I64uDptnKS8OAls1nKNSherKs9WURs2NFpPJjVjn8gTewK7gZiUpxWH 141tY4exEcl1aa86CjgOH0bQk5TmwLBoWYCjHAamEckCIaj1qODWWRP716wqxy2rEGKk aSmA== X-Received: by 10.58.100.11 with SMTP id eu11mr4140235veb.25.1366280857106; Thu, 18 Apr 2013 03:27:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.42.38 with SMTP id k6ls1375074qel.4.gmail; Thu, 18 Apr 2013 03:27:37 -0700 (PDT) X-Received: by 10.52.91.230 with SMTP id ch6mr6372469vdb.42.1366280856764; Thu, 18 Apr 2013 03:27:36 -0700 (PDT) Received: from mail-vb0-x230.google.com (mail-vb0-x230.google.com [2607:f8b0:400c:c02::230]) by mx.google.com with ESMTPS id sc6si6255764vdc.86.2013.04.18.03.27.36 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Apr 2013 03:27:36 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::230 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::230; Received: by mail-vb0-f48.google.com with SMTP id p13so2170816vbe.35 for ; Thu, 18 Apr 2013 03:27:36 -0700 (PDT) X-Received: by 10.52.163.231 with SMTP id yl7mr6563556vdb.57.1366280856633; Thu, 18 Apr 2013 03:27:36 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp116330veb; Thu, 18 Apr 2013 03:27:36 -0700 (PDT) X-Received: by 10.180.80.3 with SMTP id n3mr16901117wix.20.1366280855648; Thu, 18 Apr 2013 03:27:35 -0700 (PDT) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [2a00:1450:400c:c05::22f]) by mx.google.com with ESMTPS id i1si7224316wie.29.2013.04.18.03.27.35 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Apr 2013 03:27:35 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::22f is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c05::22f; Received: by mail-wi0-f175.google.com with SMTP id h11so1617714wiv.2 for ; Thu, 18 Apr 2013 03:27:35 -0700 (PDT) X-Received: by 10.180.36.235 with SMTP id t11mr16999144wij.1.1366280855086; Thu, 18 Apr 2013 03:27:35 -0700 (PDT) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPS id o5sm15168504wix.3.2013.04.18.03.27.33 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Apr 2013 03:27:34 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: arnd@arndb.de, linus.walleij@stericsson.com, Lee Jones , Herbert Xu , "David S. Miller" , Andreas Westin , linux-crypto@vger.kernel.org Subject: [PATCH 4/9] crypto: ux500/cryp - Prepare clock before enabling it Date: Thu, 18 Apr 2013 11:27:00 +0100 Message-Id: <1366280825-31136-5-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1366280825-31136-1-git-send-email-lee.jones@linaro.org> References: <1366280825-31136-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmlI1JkgTug/nWbgj+ZFyAvB1btifa+JCy/BfVmtvZvmdiFEzaZJSZYZRBKGWTIzZ/iqm1o X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::230 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , If we fail to prepare the ux500-cryp clock before enabling it the platform will fail to boot. Here we insure this happens. Cc: Herbert Xu Cc: David S. Miller Cc: Andreas Westin Cc: linux-crypto@vger.kernel.org Signed-off-by: Lee Jones --- drivers/crypto/ux500/cryp/cryp_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/ux500/cryp/cryp_core.c b/drivers/crypto/ux500/cryp/cryp_core.c index 8bc5fef..a56cbc4 100644 --- a/drivers/crypto/ux500/cryp/cryp_core.c +++ b/drivers/crypto/ux500/cryp/cryp_core.c @@ -670,7 +670,7 @@ static int cryp_disable_power(struct device *dev, } spin_unlock(&device_data->ctx_lock); - clk_disable(device_data->clk); + clk_disable_unprepare(device_data->clk); ret = regulator_disable(device_data->pwr_regulator); if (ret) dev_err(dev, "[%s]: " @@ -703,9 +703,9 @@ static int cryp_enable_power( goto out; } - ret = clk_enable(device_data->clk); + ret = clk_prepare_enable(device_data->clk); if (ret) { - dev_err(dev, "[%s]: clk_enable() failed!", + dev_err(dev, "[%s]: clk_prepare_enable() failed!", __func__); regulator_disable(device_data->pwr_regulator); goto out;