From patchwork Thu Apr 18 10:26:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 16222 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f71.google.com (mail-qe0-f71.google.com [209.85.128.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0015223974 for ; Thu, 18 Apr 2013 10:28:08 +0000 (UTC) Received: by mail-qe0-f71.google.com with SMTP id b10sf4807034qen.2 for ; Thu, 18 Apr 2013 03:27:32 -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=fnAoKsJZ2pNdsr4nJZ3DonoGfuDTkwyzcGCgsFqnRT8=; b=bWekgU+Z5ZiQnDzrcGD55qIembBGIB/RXdVcje4xPWfXmRgLB/aJxT8essHebHC2cq szJcdWx2EMWNg0fzBlsSXgyJMF34ep5wkuhSsmu3eFlNcbL1YVnzEBcz7dS+FrQQRy1Q 3gP6Re9M1rYJ/N8884BHqjq+496sWNrfSfki9OjyKILytnp6qV86QndYmXVl5yBZN4a/ 6E3iMkXDyr1imYuG67rMXY6GUd+vQOLbl4vgmBg6atcFCKG9snEogBx5wgWfGTSOAbDD gGH6/IZJbTE9lQ0Ga7DZ0GW5tYgA7L3V1CYxIePG0mi06MM2U3N8eW7woYSM7nTIH+9z 1hMg== X-Received: by 10.236.164.40 with SMTP id b28mr5081585yhl.40.1366280851832; Thu, 18 Apr 2013 03:27:31 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.49.134 with SMTP id u6ls1390957qen.79.gmail; Thu, 18 Apr 2013 03:27:31 -0700 (PDT) X-Received: by 10.58.40.9 with SMTP id t9mr7781769vek.10.1366280851694; Thu, 18 Apr 2013 03:27:31 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id u8si5312578vck.29.2013.04.18.03.27.31 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Apr 2013 03:27:31 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id m16so2258589vca.39 for ; Thu, 18 Apr 2013 03:27:31 -0700 (PDT) X-Received: by 10.58.48.166 with SMTP id m6mr7541693ven.59.1366280851561; Thu, 18 Apr 2013 03:27:31 -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 nf2csp116325veb; Thu, 18 Apr 2013 03:27:31 -0700 (PDT) X-Received: by 10.180.80.3 with SMTP id n3mr16900605wix.20.1366280850606; Thu, 18 Apr 2013 03:27:30 -0700 (PDT) Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [2a00:1450:400c:c05::22b]) by mx.google.com with ESMTPS id gg1si3444113wic.86.2013.04.18.03.27.30 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Apr 2013 03:27:30 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::22b is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c05::22b; Received: by mail-wi0-f171.google.com with SMTP id l13so2199760wie.16 for ; Thu, 18 Apr 2013 03:27:30 -0700 (PDT) X-Received: by 10.194.241.231 with SMTP id wl7mr10332979wjc.52.1366280850102; Thu, 18 Apr 2013 03:27:30 -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.28 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Apr 2013 03:27:29 -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 1/9] crypto: ux500/hash - Prepare clock before enabling it Date: Thu, 18 Apr 2013 11:26:57 +0100 Message-Id: <1366280825-31136-2-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: ALoCoQlPdoxpUrSmOF8143xcNDbtANrRYUBET9FmOqwmyWlMZBmpzle9DVo8kX5UtxaqfwLMtfFI X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.180 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-hash 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/hash/hash_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c index 632c333..118386a 100644 --- a/drivers/crypto/ux500/hash/hash_core.c +++ b/drivers/crypto/ux500/hash/hash_core.c @@ -308,10 +308,10 @@ static int hash_disable_power( device_data->restore_dev_state = true; } - clk_disable(device_data->clk); + clk_disable_unprepare(device_data->clk); ret = regulator_disable(device_data->regulator); if (ret) - dev_err(dev, "[%s] regulator_disable() failed!", __func__); + dev_err(dev, "[%s] regulator_disable_unprepare() failed!", __func__); device_data->power_state = false; @@ -344,9 +344,9 @@ static int hash_enable_power( __func__); 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__); ret = regulator_disable( device_data->regulator);