diff mbox

[4/5] ata: ahci_mvebu: add support for Armada 8K

Message ID 1461335561-18363-5-git-send-email-thomas.petazzoni@free-electrons.com
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Thomas Petazzoni April 22, 2016, 2:32 p.m. UTC
This commit adds support for the AHCI controller found in the Armada
7K/8K ARM64 SoCs. This controller uses non-standard port offset and
port length values, which explains why some special handling is
needed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 drivers/ata/ahci_mvebu.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox

Patch

diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c
index de7128d..b1d1d64 100644
--- a/drivers/ata/ahci_mvebu.c
+++ b/drivers/ata/ahci_mvebu.c
@@ -120,6 +120,10 @@  static int ahci_mvebu_probe(struct platform_device *pdev)
 
 		ahci_mvebu_mbus_config(hpriv, dram);
 		ahci_mvebu_regret_option(hpriv);
+	} else if (of_device_is_compatible(pdev->dev.of_node,
+					   "marvell,armada-8k-ahci")) {
+		hpriv->port_offset = 0x10000;
+		hpriv->port_length = 0x10000;
 	}
 
 	rc = ahci_platform_init_host(pdev, hpriv, &ahci_mvebu_port_info,
@@ -137,6 +141,7 @@  disable_resources:
 static const struct of_device_id ahci_mvebu_of_match[] = {
 	{ .compatible = "marvell,armada-380-ahci", },
 	{ .compatible = "marvell,armada-3700-ahci", },
+	{ .compatible = "marvell,armada-8k-ahci", },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, ahci_mvebu_of_match);