imx: imx8qm/qxp: check whether m4 partition booted
[oweals/u-boot.git] / drivers / pci / pcie_fsl.c
index f15deb049540c7ab341614bf0291a407c8b7ae63..dc994b748ad532dd19ef0ca5e9eb7da3569b55ea 100644 (file)
@@ -15,6 +15,7 @@
 #include <asm/fsl_serdes.h>
 #include <asm/io.h>
 #include "pcie_fsl.h"
+#include <dm/device_compat.h>
 
 LIST_HEAD(fsl_pcie_list);
 
@@ -42,7 +43,7 @@ static int fsl_pcie_addr_valid(struct fsl_pcie *pcie, pci_dev_t bdf)
        return 0;
 }
 
-static int fsl_pcie_read_config(struct udevice *bus, pci_dev_t bdf,
+static int fsl_pcie_read_config(const struct udevice *bus, pci_dev_t bdf,
                                uint offset, ulong *valuep,
                                enum pci_size_t size)
 {
@@ -610,6 +611,18 @@ static const struct dm_pci_ops fsl_pcie_ops = {
        .write_config   = fsl_pcie_write_config,
 };
 
+static struct fsl_pcie_data p1_p2_data = {
+       .block_offset = 0xa000,
+       .block_offset_mask = 0xffff,
+       .stride = 0x1000,
+};
+
+static struct fsl_pcie_data p2041_data = {
+       .block_offset = 0x200000,
+       .block_offset_mask = 0x3fffff,
+       .stride = 0x1000,
+};
+
 static struct fsl_pcie_data t2080_data = {
        .block_offset = 0x240000,
        .block_offset_mask = 0x3fffff,
@@ -617,6 +630,14 @@ static struct fsl_pcie_data t2080_data = {
 };
 
 static const struct udevice_id fsl_pcie_ids[] = {
+       { .compatible = "fsl,pcie-mpc8548", .data = (ulong)&p1_p2_data },
+       { .compatible = "fsl,pcie-p1_p2", .data = (ulong)&p1_p2_data },
+       { .compatible = "fsl,pcie-p2041", .data = (ulong)&p2041_data },
+       { .compatible = "fsl,pcie-p3041", .data = (ulong)&p2041_data },
+       { .compatible = "fsl,pcie-p4080", .data = (ulong)&p2041_data },
+       { .compatible = "fsl,pcie-p5040", .data = (ulong)&p2041_data },
+       { .compatible = "fsl,pcie-t102x", .data = (ulong)&t2080_data },
+       { .compatible = "fsl,pcie-t104x", .data = (ulong)&t2080_data },
        { .compatible = "fsl,pcie-t2080", .data = (ulong)&t2080_data },
        { .compatible = "fsl,pcie-t4240", .data = (ulong)&t2080_data },
        { }