diff options
author | Peter Griffin <peter.griffin@linaro.org> | 2015-03-31 03:35:09 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2015-04-01 12:07:19 -0400 |
commit | 9a1e75e11a8d09c5cba022e1ac04b0785354f708 (patch) | |
tree | ede77127c8bd8b125fa3f8737e1679f46b8bf1f8 | |
parent | 9a8340bfeb03c5fc20b39aa533b164844ef582f9 (diff) |
ahci: st: st_configure_oob must be called after IP is clocked.
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 <peter.griffin@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r-- | drivers/ata/ahci_st.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ata/ahci_st.c b/drivers/ata/ahci_st.c index bc971af262e7..ea0ff005b86c 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) | |||
68 | } | 68 | } |
69 | } | 69 | } |
70 | 70 | ||
71 | st_ahci_configure_oob(drv_data->hpriv->mmio); | ||
72 | |||
73 | if (drv_data->sw_rst) { | 71 | if (drv_data->sw_rst) { |
74 | err = reset_control_deassert(drv_data->sw_rst); | 72 | err = reset_control_deassert(drv_data->sw_rst); |
75 | if (err) { | 73 | if (err) { |
@@ -172,6 +170,8 @@ static int st_ahci_probe(struct platform_device *pdev) | |||
172 | if (err) | 170 | if (err) |
173 | return err; | 171 | return err; |
174 | 172 | ||
173 | st_ahci_configure_oob(drv_data->hpriv->mmio); | ||
174 | |||
175 | err = ahci_platform_init_host(pdev, hpriv, &st_ahci_port_info, | 175 | err = ahci_platform_init_host(pdev, hpriv, &st_ahci_port_info, |
176 | &ahci_platform_sht); | 176 | &ahci_platform_sht); |
177 | if (err) { | 177 | if (err) { |
@@ -222,6 +222,8 @@ static int st_ahci_resume(struct device *dev) | |||
222 | return err; | 222 | return err; |
223 | } | 223 | } |
224 | 224 | ||
225 | st_ahci_configure_oob(drv_data->hpriv->mmio); | ||
226 | |||
225 | return ahci_platform_resume_host(dev); | 227 | return ahci_platform_resume_host(dev); |
226 | } | 228 | } |
227 | #endif | 229 | #endif |