* [PATCH/RFT] sata: rcar_sata: Reset SATA PHY on resume
@ 2017-04-18 7:02 Simon Horman
2017-04-18 7:17 ` Tejun Heo
2017-04-18 9:20 ` Sergei Shtylyov
0 siblings, 2 replies; 5+ messages in thread
From: Simon Horman @ 2017-04-18 7:02 UTC (permalink / raw)
To: linux-renesas-soc
Cc: linux-arm-kernel, Magnus Damm, linux-ide, Simon Horman,
Khiem Nguyen
In the case where power is cut on suspend the SATA PHY state needs to be
suspended on resume.
This is the case on the Salvator-X board with the r8a7795 or r8a7796 SoC.
In that environment it has been observed that SATA partitions cannot not be
accessed on resume.
Based on work by Khiem Nguyen.
Cc: Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
* Compile and boot tested only
---
drivers/ata/sata_rcar.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index 5d38245a7a73..4f4f7788a6cf 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -969,16 +969,9 @@ static int sata_rcar_resume(struct device *dev)
{
struct ata_host *host = dev_get_drvdata(dev);
struct sata_rcar_priv *priv = host->private_data;
- void __iomem *base = priv->base;
clk_prepare_enable(priv->clk);
-
- /* ack and mask */
- iowrite32(0, base + SATAINTSTAT_REG);
- iowrite32(0x7ff, base + SATAINTMASK_REG);
- /* enable interrupts */
- iowrite32(ATAPI_INT_ENABLE_SATAINT, base + ATAPI_INT_ENABLE_REG);
-
+ sata_rcar_init_controller(host);
ata_host_resume(host);
return 0;
--
2.7.0.rc3.207.g0ac5344
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH/RFT] sata: rcar_sata: Reset SATA PHY on resume
2017-04-18 7:02 [PATCH/RFT] sata: rcar_sata: Reset SATA PHY on resume Simon Horman
@ 2017-04-18 7:17 ` Tejun Heo
2017-04-18 7:30 ` Simon Horman
2017-04-18 9:20 ` Sergei Shtylyov
1 sibling, 1 reply; 5+ messages in thread
From: Tejun Heo @ 2017-04-18 7:17 UTC (permalink / raw)
To: Simon Horman
Cc: linux-renesas-soc, linux-arm-kernel, Magnus Damm, linux-ide,
Khiem Nguyen
On Tue, Apr 18, 2017 at 04:02:53PM +0900, Simon Horman wrote:
> In the case where power is cut on suspend the SATA PHY state needs to be
> suspended on resume.
^
re-initialized?
>
> This is the case on the Salvator-X board with the r8a7795 or r8a7796 SoC.
> In that environment it has been observed that SATA partitions cannot not be
> accessed on resume.
>
> Based on work by Khiem Nguyen.
>
> Cc: Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> * Compile and boot tested only
Can somebody verify this fix?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH/RFT] sata: rcar_sata: Reset SATA PHY on resume
2017-04-18 7:17 ` Tejun Heo
@ 2017-04-18 7:30 ` Simon Horman
0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2017-04-18 7:30 UTC (permalink / raw)
To: Tejun Heo
Cc: linux-renesas-soc, linux-ide, Magnus Damm, Khiem Nguyen,
linux-arm-kernel
On Tue, Apr 18, 2017 at 04:17:38PM +0900, Tejun Heo wrote:
> On Tue, Apr 18, 2017 at 04:02:53PM +0900, Simon Horman wrote:
> > In the case where power is cut on suspend the SATA PHY state needs to be
> > suspended on resume.
> ^
> re-initialized?
Yes, sorry for the think-o.
> > This is the case on the Salvator-X board with the r8a7795 or r8a7796 SoC.
> > In that environment it has been observed that SATA partitions cannot not be
> > accessed on resume.
> >
> > Based on work by Khiem Nguyen.
> >
> > Cc: Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com>
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > ---
> > * Compile and boot tested only
>
> Can somebody verify this fix?
Yes, I should be able to do so but I need to set up the appropriate
hardware environment first. I would, of course, welcome verification by
others.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH/RFT] sata: rcar_sata: Reset SATA PHY on resume
2017-04-18 7:02 [PATCH/RFT] sata: rcar_sata: Reset SATA PHY on resume Simon Horman
2017-04-18 7:17 ` Tejun Heo
@ 2017-04-18 9:20 ` Sergei Shtylyov
2017-04-20 9:05 ` Simon Horman
1 sibling, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2017-04-18 9:20 UTC (permalink / raw)
To: Simon Horman, linux-renesas-soc
Cc: linux-ide, Magnus Damm, Khiem Nguyen, linux-arm-kernel
Hello.
On 4/18/2017 10:02 AM, Simon Horman wrote:
> In the case where power is cut on suspend the SATA PHY state needs to be
> suspended on resume.
>
> This is the case on the Salvator-X board with the r8a7795 or r8a7796 SoC.
> In that environment it has been observed that SATA partitions cannot not be
> accessed on resume.
>
> Based on work by Khiem Nguyen.
>
> Cc: Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> * Compile and boot tested only
> ---
> drivers/ata/sata_rcar.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
Why the scope prefix in the subject is not just "sata_rcar: "? :-)
[...]
MBR, Sergei
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH/RFT] sata: rcar_sata: Reset SATA PHY on resume
2017-04-18 9:20 ` Sergei Shtylyov
@ 2017-04-20 9:05 ` Simon Horman
0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2017-04-20 9:05 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: linux-renesas-soc, linux-arm-kernel, Magnus Damm, linux-ide,
Khiem Nguyen
On Tue, Apr 18, 2017 at 12:20:20PM +0300, Sergei Shtylyov wrote:
> Hello.
>
> On 4/18/2017 10:02 AM, Simon Horman wrote:
>
> >In the case where power is cut on suspend the SATA PHY state needs to be
> >suspended on resume.
> >
> >This is the case on the Salvator-X board with the r8a7795 or r8a7796 SoC.
> >In that environment it has been observed that SATA partitions cannot not be
> >accessed on resume.
> >
> >Based on work by Khiem Nguyen.
> >
> >Cc: Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com>
> >Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> >---
> >* Compile and boot tested only
> >---
> > drivers/ata/sata_rcar.c | 9 +--------
> > 1 file changed, 1 insertion(+), 8 deletions(-)
>
> Why the scope prefix in the subject is not just "sata_rcar: "? :-)
Thanks, I will drop that.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-04-20 9:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-18 7:02 [PATCH/RFT] sata: rcar_sata: Reset SATA PHY on resume Simon Horman
2017-04-18 7:17 ` Tejun Heo
2017-04-18 7:30 ` Simon Horman
2017-04-18 9:20 ` Sergei Shtylyov
2017-04-20 9:05 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox