Re: [PATCH] sata: rcar_sata: Reset SATA PHY when Salvator-X board resumes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Simon-san, Geert-san,

2017-12-19 17:26 GMT+09:00 Simon Horman <horms@xxxxxxxxxxxx>:
> On Wed, Dec 06, 2017 at 07:56:09PM +0100, Geert Uytterhoeven wrote:
>> Hi Kaneko-san,
>>
>> On Wed, Dec 6, 2017 at 7:45 PM, Yoshihiro Kaneko <ykaneko0929@xxxxxxxxx> wrote:
>> > From: Khiem Nguyen <khiem.nguyen.xt@xxxxxxxxxxxxxxx>
>> >
>> > 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?
>
> Agreed, that seems to make sense.
> Kaneko-san, could you look into implementing this?

Yes, I will do it.

Kaneko

>
>>
>> > +               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 -- geert@xxxxxxxxxxxxxx
>>
>> 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
>>
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux