Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
[oweals/u-boot.git] / arch / powerpc / cpu / mpc85xx / pci.c
index c6d2fda5dbb0153fe09913dd22d31f391af4a658..9a6fc13b73f13f369a54cd9cacc0e72104e3d048 100644 (file)
@@ -1,19 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright 2004 Freescale Semiconductor.
  * Copyright (C) 2003 Motorola Inc.
  * Xianghua Xiao (x.xiao@motorola.com)
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /*
  * PCI Configuration space access support for MPC85xx PCI Bridge
  */
 #include <common.h>
+#include <asm/bitops.h>
 #include <asm/cpm_85xx.h>
 #include <pci.h>
 
-#if !defined(CONFIG_FSL_PCI_INIT)
+#if !defined(CONFIG_FSL_PCI_INIT) && !defined(CONFIG_DM_PCI)
 
 #ifndef CONFIG_SYS_PCI1_MEM_BUS
 #define CONFIG_SYS_PCI1_MEM_BUS CONFIG_SYS_PCI1_MEM_BASE
@@ -120,7 +120,7 @@ pci_mpc85xx_init(struct pci_controller *board_hose)
 
        pci_register_hose(hose);
 
-#if defined(CONFIG_MPC8555CDS) || defined(CONFIG_MPC8541CDS)
+#if defined(CONFIG_TARGET_MPC8555CDS) || defined(CONFIG_TARGET_MPC8541CDS)
        /*
         * This is a SW workaround for an apparent HW problem
         * in the PCI controller on the MPC85555/41 CDS boards.