diff mbox series

[v2,24/32] pci: sata_sil: Drop DM_PCI checks

Message ID 20210802005446.2267075-25-sjg@chromium.org
State Accepted
Commit 6b4a2a5c865f649eaaaad24068f63ef80ef5ad97
Delegated to: Tom Rini
Headers show
Series pci: Drop all pre-driver model code | expand

Commit Message

Simon Glass Aug. 2, 2021, 12:54 a.m. UTC
We don't need these checks anymore since when PCI is enabled, driver model
is always used.

Drop them.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v1)

 drivers/ata/sata_sil.c | 8 --------
 drivers/ata/sata_sil.h | 4 ----
 2 files changed, 12 deletions(-)

Comments

Tom Rini Aug. 6, 2021, 9:21 p.m. UTC | #1
On Sun, Aug 01, 2021 at 06:54:37PM -0600, Simon Glass wrote:

> We don't need these checks anymore since when PCI is enabled, driver model
> is always used.
> 
> Drop them.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index 7e4e97d803e..dda712f42cb 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -27,11 +27,7 @@ 
 
 #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 {
@@ -616,11 +612,7 @@  static int sil_init_sata(struct udevice *uc_dev, int dev)
 #else
 	priv->sil_sata_desc[dev] = sata;
 	priv->port_num = dev;
-#ifdef CONFIG_DM_PCI
 	sata->devno = uc_dev->parent;
-#else
-	sata->devno = sata_info.devno;
-#endif	/* CONFIG_DM_PCI */
 #endif
 	sata->id = dev;
 	sata->port = port;
diff --git a/drivers/ata/sata_sil.h b/drivers/ata/sata_sil.h
index a300c0c3887..bea4322c919 100644
--- a/drivers/ata/sata_sil.h
+++ b/drivers/ata/sata_sil.h
@@ -21,11 +21,7 @@  struct sil_sata {
 	u16		pio;
 	u16		mwdma;
 	u16		udma;
-#ifdef CONFIG_DM_PCI
 	struct udevice	*devno;
-#else
-	pci_dev_t	devno;
-#endif
 	int		wcache;
 	int		flush;
 	int		flush_ext;