From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932120AbbCBRDu (ORCPT ); Mon, 2 Mar 2015 12:03:50 -0500 Received: from mail-wg0-f41.google.com ([74.125.82.41]:39102 "EHLO mail-wg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756196AbbCBRDr (ORCPT ); Mon, 2 Mar 2015 12:03:47 -0500 Date: Mon, 2 Mar 2015 17:03:38 +0000 From: Lee Jones To: Peter Griffin Cc: 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, linux-ide@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH 3/3] ahci: st: st_configure_oob must be called after IP is clocked. Message-ID: <20150302170338.GC6976@x1> References: <1425300519-13747-1-git-send-email-peter.griffin@linaro.org> <1425300519-13747-4-git-send-email-peter.griffin@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1425300519-13747-4-git-send-email-peter.griffin@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 02 Mar 2015, Peter Griffin wrote: > 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 > --- > drivers/ata/ahci_st.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) I suspect we might find a few issues like this now we're not using 'clk_ignore_unused'. Acked-by: Lee Jones > 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 -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog