imx: imx8qm/qxp: check whether m4 partition booted
[oweals/u-boot.git] / drivers / pci / pci-rcar-gen2.c
index cbaba1986a423a54f9ef3280f897ed5faa7fe43c..014d8704788b3eaa3dc9778e3e89eb16ad5d65f6 100644 (file)
@@ -97,7 +97,7 @@ static int rcar_gen2_pci_addr_valid(pci_dev_t d, uint offset)
 
        /* Only one EHCI/OHCI device built-in */
        slot = PCI_DEV(d);
-       if (slot > 2)
+       if (slot != 1 && slot != 2)
                return -EINVAL;
 
        /* bridge logic only has registers to 0x40 */
@@ -107,7 +107,7 @@ static int rcar_gen2_pci_addr_valid(pci_dev_t d, uint offset)
        return 0;
 }
 
-static u32 get_bus_address(struct udevice *dev, pci_dev_t bdf, u32 offset)
+static u32 get_bus_address(const struct udevice *dev, pci_dev_t bdf, u32 offset)
 {
        struct rcar_gen2_pci_priv *priv = dev_get_priv(dev);
 
@@ -126,7 +126,7 @@ static u32 setup_bus_address(struct udevice *dev, pci_dev_t bdf, u32 offset)
        return get_bus_address(dev, bdf, offset);
 }
 
-static int rcar_gen2_pci_read_config(struct udevice *dev, pci_dev_t bdf,
+static int rcar_gen2_pci_read_config(const struct udevice *dev, pci_dev_t bdf,
                                     uint offset, ulong *value,
                                     enum pci_size_t size)
 {