Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq
[oweals/u-boot.git] / drivers / pci / pci_auto.c
index ae61e24907a01bdb8ac8cc227f76a00b81fe985b..44470fa812b0ed42ca475bb27262d1b7be0fb733 100644 (file)
@@ -7,10 +7,7 @@
  *
  * Copyright 2000 MontaVista Software Inc.
  *
- * This program is free software; you can redistribute  it and/or modify it
- * under  the terms of  the GNU General  Public License as published by the
- * Free Software Foundation;  either version 2 of the  License, or (at your
- * option) any later version.
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -89,7 +86,7 @@ void pciauto_setup_device(struct pci_controller *hose,
                          struct pci_region *prefetch,
                          struct pci_region *io)
 {
-       pci_addr_t bar_response;
+       u32 bar_response;
        pci_size_t bar_size;
        u16 cmdstat = 0;
        int bar, bar_nr = 0;
@@ -300,7 +297,7 @@ void pciauto_config_init(struct pci_controller *hose)
 {
        int i;
 
-       hose->pci_io = hose->pci_mem = NULL;
+       hose->pci_io = hose->pci_mem = hose->pci_prefetch = NULL;
 
        for (i = 0; i < hose->region_count; i++) {
                switch(hose->regions[i].flags) {
@@ -390,7 +387,7 @@ int pciauto_config_device(struct pci_controller *hose, pci_dev_t dev)
                n = pci_hose_scan_bus(hose, hose->current_busno);
 
                /* figure out the deepest we've gone for this leg */
-               sub_bus = max(n, sub_bus);
+               sub_bus = max((unsigned int)n, sub_bus);
                pciauto_postscan_setup_bridge(hose, dev, sub_bus);
 
                sub_bus = hose->current_busno;