Commit 892d2eb0 authored by Simon Horman's avatar Simon Horman Committed by Luis Henriques

ata: sata_rcar: Disable DIPM mode for r8a7790 ES1

commit aa1cf258 upstream.

Unlike other SATA R-Car r8a7790 controllers the r8a7790 ES1 SATA R-Car
controller needs to be run with DIPM disabled.
Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 3b24fbed
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
Required properties: Required properties:
- compatible : should contain one of the following: - compatible : should contain one of the following:
- "renesas,sata-r8a7779" for R-Car H1 - "renesas,sata-r8a7779" for R-Car H1
- "renesas,sata-r8a7790" for R-Car H2 - "renesas,sata-r8a7790-es1" for R-Car H2 ES1
- "renesas,sata-r8a7790" for R-Car H2 other than ES1
- "renesas,sata-r8a7791" for R-Car M2 - "renesas,sata-r8a7791" for R-Car M2
- reg : address and length of the SATA registers; - reg : address and length of the SATA registers;
- interrupts : must consist of one interrupt specifier. - interrupts : must consist of one interrupt specifier.
......
...@@ -146,6 +146,7 @@ ...@@ -146,6 +146,7 @@
enum sata_rcar_type { enum sata_rcar_type {
RCAR_GEN1_SATA, RCAR_GEN1_SATA,
RCAR_GEN2_SATA, RCAR_GEN2_SATA,
RCAR_R8A7790_ES1_SATA,
}; };
struct sata_rcar_priv { struct sata_rcar_priv {
...@@ -763,6 +764,9 @@ static void sata_rcar_setup_port(struct ata_host *host) ...@@ -763,6 +764,9 @@ static void sata_rcar_setup_port(struct ata_host *host)
ap->udma_mask = ATA_UDMA6; ap->udma_mask = ATA_UDMA6;
ap->flags |= ATA_FLAG_SATA; ap->flags |= ATA_FLAG_SATA;
if (priv->type == RCAR_R8A7790_ES1_SATA)
ap->flags |= ATA_FLAG_NO_DIPM;
ioaddr->cmd_addr = base + SDATA_REG; ioaddr->cmd_addr = base + SDATA_REG;
ioaddr->ctl_addr = base + SSDEVCON_REG; ioaddr->ctl_addr = base + SSDEVCON_REG;
ioaddr->scr_addr = base + SCRSSTS_REG; ioaddr->scr_addr = base + SCRSSTS_REG;
...@@ -792,6 +796,7 @@ static void sata_rcar_init_controller(struct ata_host *host) ...@@ -792,6 +796,7 @@ static void sata_rcar_init_controller(struct ata_host *host)
sata_rcar_gen1_phy_init(priv); sata_rcar_gen1_phy_init(priv);
break; break;
case RCAR_GEN2_SATA: case RCAR_GEN2_SATA:
case RCAR_R8A7790_ES1_SATA:
sata_rcar_gen2_phy_init(priv); sata_rcar_gen2_phy_init(priv);
break; break;
default: default:
...@@ -837,6 +842,10 @@ static struct of_device_id sata_rcar_match[] = { ...@@ -837,6 +842,10 @@ static struct of_device_id sata_rcar_match[] = {
.compatible = "renesas,sata-r8a7790", .compatible = "renesas,sata-r8a7790",
.data = (void *)RCAR_GEN2_SATA .data = (void *)RCAR_GEN2_SATA
}, },
{
.compatible = "renesas,sata-r8a7790-es1",
.data = (void *)RCAR_R8A7790_ES1_SATA
},
{ {
.compatible = "renesas,sata-r8a7791", .compatible = "renesas,sata-r8a7791",
.data = (void *)RCAR_GEN2_SATA .data = (void *)RCAR_GEN2_SATA
...@@ -849,6 +858,7 @@ static const struct platform_device_id sata_rcar_id_table[] = { ...@@ -849,6 +858,7 @@ static const struct platform_device_id sata_rcar_id_table[] = {
{ "sata_rcar", RCAR_GEN1_SATA }, /* Deprecated by "sata-r8a7779" */ { "sata_rcar", RCAR_GEN1_SATA }, /* Deprecated by "sata-r8a7779" */
{ "sata-r8a7779", RCAR_GEN1_SATA }, { "sata-r8a7779", RCAR_GEN1_SATA },
{ "sata-r8a7790", RCAR_GEN2_SATA }, { "sata-r8a7790", RCAR_GEN2_SATA },
{ "sata-r8a7790-es1", RCAR_R8A7790_ES1_SATA },
{ "sata-r8a7791", RCAR_GEN2_SATA }, { "sata-r8a7791", RCAR_GEN2_SATA },
{ }, { },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment