ahci-pci.c 815 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2017, Bin Meng <bmeng.cn@gmail.com>
  4. */
  5. #include <common.h>
  6. #include <ahci.h>
  7. #include <dm.h>
  8. #include <pci.h>
  9. static int ahci_pci_bind(struct udevice *dev)
  10. {
  11. struct udevice *scsi_dev;
  12. return ahci_bind_scsi(dev, &scsi_dev);
  13. }
  14. static int ahci_pci_probe(struct udevice *dev)
  15. {
  16. return ahci_probe_scsi_pci(dev);
  17. }
  18. static const struct udevice_id ahci_pci_ids[] = {
  19. { .compatible = "ahci-pci" },
  20. { }
  21. };
  22. U_BOOT_DRIVER(ahci_pci) = {
  23. .name = "ahci_pci",
  24. .id = UCLASS_AHCI,
  25. .of_match = ahci_pci_ids,
  26. .bind = ahci_pci_bind,
  27. .probe = ahci_pci_probe,
  28. };
  29. static struct pci_device_id ahci_pci_supported[] = {
  30. { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, ~0) },
  31. { PCI_DEVICE(0x1b21, 0x0611) },
  32. {},
  33. };
  34. U_BOOT_PCI_DEVICE(ahci_pci, ahci_pci_supported);