Merge tag 'v3.10.55' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / kernel / devtree.c
index 0905502bee1563b81c03c59bf3a27dc24f3ba644..f8414182a4d0db68c2d6d4700ff84e7bc2f804f2 100644 (file)
@@ -26,6 +26,8 @@
 #include <asm/mach/arch.h>
 #include <asm/mach-types.h>
 
+extern char default_command_line[COMMAND_LINE_SIZE];
+
 void __init early_init_dt_add_memory_arch(u64 base, u64 size)
 {
        arm_add_memory(base, size);
@@ -152,9 +154,10 @@ void __init arm_dt_init_cpu_maps(void)
                tmp_map[i] = hwid;
        }
 
-       if (WARN(!bootcpu_valid, "DT missing boot CPU MPIDR[23:0], "
-                                "fall back to default cpu_logical_map\n"))
+       if (!bootcpu_valid) {
+               pr_warn("DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map\n");
                return;
+       }
 
        /*
         * Since the boot CPU node contains proper data, and all nodes have
@@ -182,6 +185,7 @@ struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)
        unsigned int score, mdesc_score = ~1;
        unsigned long dt_root;
        const char *model;
+       char *from = default_command_line;
 
 #ifdef CONFIG_ARCH_MULTIPLATFORM
        DT_MACHINE_START(GENERIC_DT, "Generic DT based system")
@@ -244,5 +248,10 @@ struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)
        /* Change machine number to match the mdesc we're using */
        __machine_arch_type = mdesc_best->nr;
 
+       if (mdesc_best->fixup) {
+        mdesc_best->fixup((void *)dt_root, &from, &meminfo);
+        strlcpy(boot_command_line, from, COMMAND_LINE_SIZE);
+    }
+
        return mdesc_best;
 }