From patchwork Tue Mar 31 07:35:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 46575 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5A2692159A for ; Tue, 31 Mar 2015 07:36:25 +0000 (UTC) Received: by labpk9 with SMTP id pk9sf1797643lab.1 for ; Tue, 31 Mar 2015 00:36:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=2LgQVgDq0L+/eHHee5kZ1Fhr5BMM/Zby2MOazzthSkE=; b=J7NVowytEyOmzh27kMvVbkUQcayY72SEZGyiUeYI6mKTIu+uOLGM/QgB5SFS8NjtDu l6iBKNjfAWnKKQNz+J08w39R1JVo2ZDnNqVp9/PHASfITuwAqQKArfc7yRkxv68GXCyu WoousJYBIrW+ffZdWbmA2nCXCgwGc9Z+nvedr7NkV/tXGBq4+0+uTVQDLtnUMEmwg1dv 6CtfWnYLH0nEZuTo/7oqs0VJ9UPcMEpjs6C1Sq/np2/RxU3BwrC5760JAzYMbZeBzaOv xtdC2yFLc0q/qCZ+CMI+AXJ70j7Wwdct9jxf3K0/I9tkaKqjHm8t8haG7U5yIu2IY9Xk w7PA== X-Gm-Message-State: ALoCoQmMts7MoSxJFrUr8dF9/0R4uIGD1kBgbcf4tK6+GSzpmG8DOh5MkXtkAENCWTE4rIB5ZZSi X-Received: by 10.180.97.200 with SMTP id ec8mr357408wib.5.1427787384319; Tue, 31 Mar 2015 00:36:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.82 with SMTP id u18ls726355lal.79.gmail; Tue, 31 Mar 2015 00:36:24 -0700 (PDT) X-Received: by 10.112.54.165 with SMTP id k5mr30128111lbp.57.1427787384130; Tue, 31 Mar 2015 00:36:24 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id sz5si8674004lbb.66.2015.03.31.00.36.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Mar 2015 00:36:23 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by lbcmq2 with SMTP id mq2so6157626lbc.0 for ; Tue, 31 Mar 2015 00:36:23 -0700 (PDT) X-Received: by 10.152.8.161 with SMTP id s1mr20985988laa.41.1427787383853; Tue, 31 Mar 2015 00:36:23 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.57.201 with SMTP id k9csp1633713lbq; Tue, 31 Mar 2015 00:36:23 -0700 (PDT) X-Received: by 10.66.148.165 with SMTP id tt5mr65932193pab.38.1427787381933; Tue, 31 Mar 2015 00:36:21 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qm14si18252476pdb.120.2015.03.31.00.36.20; Tue, 31 Mar 2015 00:36:21 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753428AbbCaHgR (ORCPT + 27 others); Tue, 31 Mar 2015 03:36:17 -0400 Received: from mail-wg0-f51.google.com ([74.125.82.51]:34829 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753184AbbCaHf1 (ORCPT ); Tue, 31 Mar 2015 03:35:27 -0400 Received: by wgdm6 with SMTP id m6so9159616wgd.2 for ; Tue, 31 Mar 2015 00:35:25 -0700 (PDT) X-Received: by 10.194.21.193 with SMTP id x1mr69981651wje.144.1427787325830; Tue, 31 Mar 2015 00:35:25 -0700 (PDT) Received: from localhost.localdomain (cpc14-aztw22-2-0-cust189.18-1.cable.virginm.net. [82.45.1.190]) by mx.google.com with ESMTPSA id l10sm19074059wje.15.2015.03.31.00.35.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 31 Mar 2015 00:35:24 -0700 (PDT) From: Peter Griffin To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, maxime.coquelin@st.com, patrice.chotard@st.com, tj@kernel.org, srinivas.kandagatla@gmail.com Cc: peter.griffin@linaro.org, lee.jones@linaro.org, devicetree@vger.kernel.org, linux-ide@vger.kernel.org Subject: [PATCH 3/3] ahci: st: st_configure_oob must be called after IP is clocked. Date: Tue, 31 Mar 2015 08:35:09 +0100 Message-Id: <1427787309-1601-4-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427787309-1601-1-git-send-email-peter.griffin@linaro.org> References: <1427787309-1601-1-git-send-email-peter.griffin@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.griffin@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Currently the ahci_st driver will hang the system on probe, as the st_configure_oob function does some register writes before the IP is clocked. This patch moves the function call to after ahci_platform_enable_resources (which enables the IP clock), and resolves the hang. Addtionally st_ahci_configure_oob should be called in the st_ahci_resume function, so we also rectify that ensuring it is also called after the IP clock has been enabled. Signed-off-by: Peter Griffin Acked-by: Lee Jones Acked-by: Maxime Coquelin --- drivers/ata/ahci_st.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/ata/ahci_st.c b/drivers/ata/ahci_st.c index bc971af..ea0ff00 100644 --- a/drivers/ata/ahci_st.c +++ b/drivers/ata/ahci_st.c @@ -68,8 +68,6 @@ static int st_ahci_deassert_resets(struct device *dev) } } - st_ahci_configure_oob(drv_data->hpriv->mmio); - if (drv_data->sw_rst) { err = reset_control_deassert(drv_data->sw_rst); if (err) { @@ -172,6 +170,8 @@ static int st_ahci_probe(struct platform_device *pdev) if (err) return err; + st_ahci_configure_oob(drv_data->hpriv->mmio); + err = ahci_platform_init_host(pdev, hpriv, &st_ahci_port_info, &ahci_platform_sht); if (err) { @@ -222,6 +222,8 @@ static int st_ahci_resume(struct device *dev) return err; } + st_ahci_configure_oob(drv_data->hpriv->mmio); + return ahci_platform_resume_host(dev); } #endif