MIPS: Netlogic: Update function to read DRAM BARs
[linux-drm-fsl-dcu.git] / arch / mips / netlogic / xlp / setup.c
index 4fdd9fd29d1d89e154d82d26e640d98a9baf6776..f743fd9da32366c787d438e81285fe399c41bc15 100644 (file)
@@ -51,7 +51,6 @@ uint64_t nlm_io_base;
 struct nlm_soc_info nlm_nodes[NLM_NR_NODES];
 cpumask_t nlm_cpumask = CPU_MASK_CPU0;
 unsigned int nlm_threads_per_core;
-unsigned int xlp_cores_per_node;
 
 static void nlm_linux_exit(void)
 {
@@ -82,7 +81,7 @@ static void __init xlp_init_mem_from_bars(void)
        uint64_t map[16];
        int i, n;
 
-       n = xlp_get_dram_map(-1, map);  /* -1: info for all nodes */
+       n = nlm_get_dram_map(-1, map, ARRAY_SIZE(map)); /* -1 : all nodes */
        for (i = 0; i < n; i += 2) {
                /* exclude 0x1000_0000-0x2000_0000, u-boot device */
                if (map[i] <= 0x10000000 && map[i+1] > 0x10000000)
@@ -163,10 +162,6 @@ void __init prom_init(void)
        void *reset_vec;
 
        nlm_io_base = CKSEG1ADDR(XLP_DEFAULT_IO_BASE);
-       if (cpu_is_xlp9xx())
-               xlp_cores_per_node = 32;
-       else
-               xlp_cores_per_node = 8;
        nlm_init_boot_cpu();
        xlp_mmu_init();
        nlm_node_init(0);