arm: a37xx: pci: Find PCIe controller node by compatible instead of path
[pandora-u-boot.git] / arch / arm / mach-mvebu / armada3700 / cpu.c
index e438b49..1abac7c 100644 (file)
@@ -9,6 +9,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <init.h>
+#include <asm/global_data.h>
 #include <linux/bitops.h>
 #include <linux/libfdt.h>
 #include <asm/io.h>
@@ -52,8 +53,6 @@
 #define A3700_PTE_BLOCK_DEVICE \
        (PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_NON_SHARE)
 
-#define PCIE_PATH                      "/soc/pcie@d0070000"
-
 DECLARE_GLOBAL_DATA_PTR;
 
 static struct mm_region mvebu_mem_map[MAX_MEM_MAP_REGIONS] = {
@@ -287,7 +286,7 @@ int a3700_fdt_fix_pcie_regions(void *blob)
        const u32 *ranges;
        int node, len;
 
-       node = fdt_path_offset(blob, PCIE_PATH);
+       node = fdt_node_offset_by_compatible(blob, -1, "marvell,armada-3700-pcie");
        if (node < 0)
                return node;
 
@@ -313,7 +312,7 @@ int a3700_fdt_fix_pcie_regions(void *blob)
        return fdt_setprop_inplace(blob, node, "ranges", new_ranges, len);
 }
 
-void reset_cpu(ulong ignored)
+void reset_cpu(void)
 {
        /*
         * Write magic number of 0x1d1e to North Bridge Warm Reset register