From patchwork Thu Jun 4 11:29:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Juszkiewicz X-Patchwork-Id: 241644 List-Id: U-Boot discussion From: marcin at juszkiewicz.com.pl (Marcin Juszkiewicz) Date: Thu, 4 Jun 2020 13:29:22 +0200 Subject: [PATCH] sata_sil: make it buildable with DM_PCI Message-ID: <20200604112922.3725819-1-marcin@juszkiewicz.com.pl> Linker complained about lack of `pci_virt_to_mem` function. Looks like driver was not ready for device model - I took solution from e1000.c driver. Signed-off-by: Marcin Juszkiewicz --- drivers/ata/sata_sil.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git drivers/ata/sata_sil.c drivers/ata/sata_sil.c index 6896fa8771..5f9d4378e2 100644 --- drivers/ata/sata_sil.c +++ drivers/ata/sata_sil.c @@ -27,7 +27,11 @@ #include "sata_sil.h" +#ifdef CONFIG_DM_PCI +#define virt_to_bus(devno, v) dm_pci_virt_to_mem(devno, (void *) (v)) +#else #define virt_to_bus(devno, v) pci_virt_to_mem(devno, (void *) (v)) +#endif /* just compatible ahci_ops */ struct sil_ops {