diff mbox series

[v1,08/15] sata: ahci_mvebu.c: Enable AHCI/SATA driver for MIPS Octeon

Message ID 20210407071241.536752-9-sr@denx.de
State Accepted
Commit 089884dbacfdbf7dec829b0d9004bd271be3dfdc
Delegated to: Daniel Schwierzeck
Headers show
Series mips: octeon: MIPS Octeon misc updates: NIC23, AHCI, serial-remote tools etc | expand

Commit Message

Stefan Roese April 7, 2021, 7:12 a.m. UTC
This patch enables the usage of the MVEBU AHCI/SATA driver. The only
changes necessary to support MIPS Octeon via DT based probing are, to
add the compatible DT property and the use of dev_remap_addr() so that
the correct mapped address is used in the Octeon case (phys != virt).

Please note that this driver supports the usage of the "scsi" command
and not the "sata" command, since it does not provide an own "scan"
function, which is needed for the "sata" cmd support.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
---

 drivers/ata/Kconfig      | 2 +-
 drivers/ata/ahci_mvebu.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index f2f8275aeca8..6e47964cdc8f 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -121,7 +121,7 @@  config SUNXI_AHCI
 
 config AHCI_MVEBU
 	bool "Marvell EBU AHCI SATA support"
-	depends on ARCH_MVEBU
+	depends on ARCH_MVEBU || ARCH_OCTEON
 	depends on AHCI
 	select SCSI_AHCI
 	select DM_SCSI
diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c
index 7d82d2ea3fff..f05150d61ddf 100644
--- a/drivers/ata/ahci_mvebu.c
+++ b/drivers/ata/ahci_mvebu.c
@@ -39,7 +39,7 @@  static int mvebu_ahci_probe(struct udevice *dev)
 	 */
 	board_ahci_enable();
 
-	ahci_probe_scsi(dev, dev_read_addr(dev));
+	ahci_probe_scsi(dev, (ulong)dev_remap_addr(dev));
 
 	return 0;
 }
@@ -48,6 +48,7 @@  static const struct udevice_id mvebu_ahci_ids[] = {
 	{ .compatible = "marvell,armada-380-ahci" },
 	{ .compatible = "marvell,armada-3700-ahci" },
 	{ .compatible = "marvell,armada-8k-ahci" },
+	{ .compatible = "cavium,octeon-7130-ahci" },
 	{ }
 };