Hi Kaneko-san,
On Wed, Dec 6, 2017 at 7:45 PM, Yoshihiro Kaneko <[email protected]> wrote:
> From: Khiem Nguyen <[email protected]>
>
> Because power of Salvator-X board is cut off in suspend,
> it needs to reset SATA PHY state in resume.
> Otherwise, SATA partition could not be accessed anymore.
Thanks for your patch!
So this is needed on R-Car Gen3 only.
> --- a/drivers/ata/sata_rcar.c
> +++ b/drivers/ata/sata_rcar.c
> @@ -977,11 +977,43 @@ static int sata_rcar_resume(struct device *dev)
> struct sata_rcar_priv *priv = host->private_data;
> void __iomem *base = priv->base;
> int ret;
> + u32 val;
>
> ret = clk_prepare_enable(priv->clk);
> if (ret)
> return ret;
>
> + /* Re-use from sata_rcar_init_controller() */
> + /* reset and setup phy */
> + switch (priv->type) {
> + case RCAR_GEN1_SATA:
> + sata_rcar_gen1_phy_init(priv);
Hence why do this (and the below) on R-Car Gen1, too?
> + break;
> + case RCAR_GEN2_SATA:
> + sata_rcar_gen2_phy_init(priv);
And on both R-Car Gen2 and Gen3 (currently Gen3 is treated like Gen2
everywhere in the driver)?
What about introducing RCAR_GEN3_SATA, and doing the reinit on R-Car Gen3
only?
> + break;
> + default:
> + dev_warn(host->dev, "SATA phy is not initialized\n");
> + break;
> + }
[...]
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds