gpio: zynq: Add gpio driver support for PMC gpio
[oweals/u-boot.git] / drivers / ata / ahci_mvebu.c
index 3ae8dae4ddc379bf5e2edcc198dad1d1016a660c..48a9d00d1479c174d8dd97fb42f38ade24b3a743 100644 (file)
@@ -16,13 +16,19 @@ __weak int board_ahci_enable(void)
        return 0;
 }
 
-#ifdef CONFIG_ARMADA_8K
-/* CP110 has different AHCI port addresses */
-void __iomem *ahci_port_base(void __iomem *base, u32 port)
+static int mvebu_ahci_bind(struct udevice *dev)
 {
-       return base + 0x10000 + (port * 0x10000);
+       struct udevice *scsi_dev;
+       int ret;
+
+       ret = ahci_bind_scsi(dev, &scsi_dev);
+       if (ret) {
+               debug("%s: Failed to bind (err=%d\n)", __func__, ret);
+               return ret;
+       }
+
+       return 0;
 }
-#endif
 
 static int mvebu_ahci_probe(struct udevice *dev)
 {
@@ -32,12 +38,13 @@ static int mvebu_ahci_probe(struct udevice *dev)
         */
        board_ahci_enable();
 
-       ahci_init(devfdt_get_addr_ptr(dev));
+       ahci_probe_scsi(dev, (ulong)devfdt_get_addr_ptr(dev));
 
        return 0;
 }
 
 static const struct udevice_id mvebu_ahci_ids[] = {
+       { .compatible = "marvell,armada-380-ahci" },
        { .compatible = "marvell,armada-3700-ahci" },
        { .compatible = "marvell,armada-8k-ahci" },
        { }
@@ -47,5 +54,6 @@ U_BOOT_DRIVER(ahci_mvebu_drv) = {
        .name           = "ahci_mvebu",
        .id             = UCLASS_AHCI,
        .of_match       = mvebu_ahci_ids,
+       .bind           = mvebu_ahci_bind,
        .probe          = mvebu_ahci_probe,
 };