Skip to content

Commit

Permalink
ata: ahci: mvebu: request PHY suspend/resume for Armada 3700
Browse files Browse the repository at this point in the history
A feature has been added in the libahci driver: the possibility to set
a new flag in hpriv->flags to let the core handle PHY suspend/resume
automatically. Make use of this feature to make suspend to RAM work
with SATA drives on A3700.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Miquel Raynal authored and Jens Axboe committed Jan 11, 2019
1 parent 2f558bc commit bde0b5c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/ata/ahci_mvebu.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

struct ahci_mvebu_plat_data {
int (*plat_config)(struct ahci_host_priv *hpriv);
unsigned int flags;
};

static void ahci_mvebu_mbus_config(struct ahci_host_priv *hpriv,
Expand Down Expand Up @@ -195,6 +196,7 @@ static int ahci_mvebu_probe(struct platform_device *pdev)
if (IS_ERR(hpriv))
return PTR_ERR(hpriv);

hpriv->flags |= pdata->flags;
hpriv->plat_data = (void *)pdata;

rc = ahci_platform_enable_resources(hpriv);
Expand Down Expand Up @@ -225,6 +227,7 @@ static const struct ahci_mvebu_plat_data ahci_mvebu_armada_380_plat_data = {

static const struct ahci_mvebu_plat_data ahci_mvebu_armada_3700_plat_data = {
.plat_config = ahci_mvebu_armada_3700_config,
.flags = AHCI_HFLAG_SUSPEND_PHYS,
};

static const struct of_device_id ahci_mvebu_of_match[] = {
Expand Down

0 comments on commit bde0b5c

Please sign in to comment.