diff --git a/drivers/pci/pci_indirect.c b/drivers/pci/pci_indirect.c
index a24100e3a88b2462a5843f3b730988522200cafd..6134c22d1bccf0fe7810f07a68196865587d1491 100644
--- a/drivers/pci/pci_indirect.c
+++ b/drivers/pci/pci_indirect.c
@@ -7,7 +7,7 @@
 
 #include <common.h>
 
-#if !defined(__I386__)
+#if !defined(__I386__) && !defined(CONFIG_DM_PCI)
 
 #include <asm/processor.h>
 #include <asm/io.h>