From patchwork Mon Mar 2 12:48:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 45280 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id ECEF12149C for ; Mon, 2 Mar 2015 12:49:09 +0000 (UTC) Received: by lbiw7 with SMTP id w7sf23874492lbi.0 for ; Mon, 02 Mar 2015 04:49:09 -0800 (PST) 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=BEV0Pn/mWdvLfGyRRExkO4RA88EOUagT/TV7sEwxIsg=; b=Le70vFKMlGAewTC7bhEa1hfNI5n5m2yuNZYB+euq3TnJVO8IhfF78U+JxR/06HZy+U mAPCJHEJt/lw68mK87Aa9gSqJNg5MBzRhGN4x58lSGujpVSQTvdhid8N2Hw+bKrgzYyN mTe6/lJTJ4LmM1EZcChQjjZYtlZg4m5AtWnXZDDVwBqbk/YvmMogoPHE8eaOc5IvJ3VR 42MKMMCneCJAEbLfgsum3xofCjbzF2ytm17aOpLGH6b0JR2bO/1biuiBkg8EjodnfVYP +VJQxdlu5ElHxYFFYXUz2hEf77fBagfoLcke+L7q3fsuaJHKnt7YnZobZLVJdJJQhpme I3dA== X-Gm-Message-State: ALoCoQl6p+zyYgvl6n/rJ0wStircXHsWUBzvetcdW6ZQ1bb/rRrBLIjbofCy29X80StAnyQOWLQp X-Received: by 10.112.181.198 with SMTP id dy6mr3845150lbc.22.1425300548946; Mon, 02 Mar 2015 04:49:08 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.234.232 with SMTP id uh8ls441341lac.82.gmail; Mon, 02 Mar 2015 04:49:08 -0800 (PST) X-Received: by 10.152.43.51 with SMTP id t19mr23714761lal.73.1425300548778; Mon, 02 Mar 2015 04:49:08 -0800 (PST) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id zj11si8761049lbb.80.2015.03.02.04.49.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Mar 2015 04:49:08 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbjf15 with SMTP id f15so1792668lbj.2 for ; Mon, 02 Mar 2015 04:49:08 -0800 (PST) X-Received: by 10.112.130.39 with SMTP id ob7mr14633485lbb.32.1425300548648; Mon, 02 Mar 2015 04:49:08 -0800 (PST) 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.35.133 with SMTP id h5csp5503157lbj; Mon, 2 Mar 2015 04:49:07 -0800 (PST) X-Received: by 10.70.35.15 with SMTP id d15mr46815633pdj.61.1425300546927; Mon, 02 Mar 2015 04:49:06 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zd2si9080638pac.176.2015.03.02.04.49.06; Mon, 02 Mar 2015 04:49:06 -0800 (PST) Received-SPF: none (google.com: devicetree-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 S1752254AbbCBMsy (ORCPT + 5 others); Mon, 2 Mar 2015 07:48:54 -0500 Received: from mail-we0-f180.google.com ([74.125.82.180]:45063 "EHLO mail-we0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753768AbbCBMsv (ORCPT ); Mon, 2 Mar 2015 07:48:51 -0500 Received: by wesp10 with SMTP id p10so30877316wes.12 for ; Mon, 02 Mar 2015 04:48:50 -0800 (PST) X-Received: by 10.180.108.199 with SMTP id hm7mr35107981wib.5.1425300530257; Mon, 02 Mar 2015 04:48:50 -0800 (PST) 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 t9sm15910109wia.15.2015.03.02.04.48.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Mar 2015 04:48:49 -0800 (PST) From: Peter Griffin To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, maxime.coquelin@st.com, patrice.chotard@st.com, srinivas.kandagatla@gmail.com, tj@kernel.org Cc: peter.griffin@linaro.org, lee.jones@linaro.org, linux-ide@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 3/3] ahci: st: st_configure_oob must be called after IP is clocked. Date: Mon, 2 Mar 2015 12:48:39 +0000 Message-Id: <1425300519-13747-4-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1425300519-13747-1-git-send-email-peter.griffin@linaro.org> References: <1425300519-13747-1-git-send-email-peter.griffin@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@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.170 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 --- 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