MIPS: Make MIPS_CMDLINE_DTB default
authorJonas Gorski <jogo@openwrt.org>
Mon, 12 Oct 2015 11:13:03 +0000 (13:13 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 11 Nov 2015 07:38:37 +0000 (08:38 +0100)
Seval of-enabled machines (bmips, lantiq, xlp, pistachio, ralink) copied
the arguments from dtb to arcs_command_line to prevent the kernel from
overwriting them.

Since there is now an option to keep the dtb arguments, default to the
new option remove the "backup" to arcs_command_line in case of USE_OF is
enabled, except for those platforms that still take the bootloader
arguments or do not use any at all.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: John Crispin <blogic@openwrt.org>
Cc: Ganesan Ramalingam <ganesanr@broadcom.com>
Cc: Jayachandran C <jchandra@broadcom.com>
Cc: Andrew Bresticker <abrestic@chromium.org>
Cc: James Hartley <james.hartley@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/11285/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/Kconfig
arch/mips/bmips/setup.c
arch/mips/lantiq/prom.c
arch/mips/netlogic/xlp/dt.c
arch/mips/pistachio/init.c
arch/mips/ralink/of.c

index e3e65ae681c8f9fdbea820bf4a6b17757d67f2ba..a65341a037123166493b15d4c0d02013b56aed94 100644 (file)
@@ -2751,6 +2751,9 @@ endchoice
 
 choice
        prompt "Kernel command line type" if !CMDLINE_OVERRIDE
+       default MIPS_CMDLINE_FROM_DTB if USE_OF && !ATH79 && !MACH_INGENIC && \
+                                        !MIPS_MALTA && !MIPS_SEAD3 && \
+                                        !CAVIUM_OCTEON_SOC
        default MIPS_CMDLINE_FROM_BOOTLOADER
 
        config MIPS_CMDLINE_FROM_DTB
index 526ec2789bb9ef0ba208079d307f9580c408c7ec..5b16d2955fbb864afae0103753bd8d0d115eba0e 100644 (file)
@@ -157,7 +157,6 @@ void __init plat_mem_setup(void)
                panic("no dtb found");
 
        __dt_setup_arch(dtb);
-       strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
 
        for (q = bmips_quirk_list; q->quirk_fn; q++) {
                if (of_flat_dt_is_compatible(of_get_flat_dt_root(),
index 0db099ecc01648cca11a69cddcaab31c8c0a099e..297bcaa6b5d32b346c25fc9414a1e4690094c092 100644 (file)
@@ -77,8 +77,6 @@ void __init plat_mem_setup(void)
         * parsed resulting in our memory appearing
         */
        __dt_setup_arch(__dtb_start);
-
-       strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
 }
 
 void __init device_tree_init(void)
index a625bdb6d6aa0e2f23de8c629f34e28803d19d66..856a6e6d296e978a6435707a781bc15df412824e 100644 (file)
@@ -87,7 +87,6 @@ void __init *xlp_dt_init(void *fdtp)
 void __init xlp_early_init_devtree(void)
 {
        __dt_setup_arch(xlp_fdt_blob);
-       strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
 }
 
 void __init device_tree_init(void)
index 8bd8ebb20a72631501e5365478d10aa0d07b992b..96ba2cc9ad3e34da3948c3103d41629e24c88227 100644 (file)
@@ -58,7 +58,6 @@ void __init plat_mem_setup(void)
                panic("Device-tree not present");
 
        __dt_setup_arch((void *)fw_arg1);
-       strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
 
        plat_setup_iocoherency();
 }
index 0d30dcd6324623a3ed6dc635ec653a2619228132..f9eda5d8f82cd54681efbdf65c4f55123a3dfeed 100644 (file)
@@ -74,8 +74,6 @@ void __init plat_mem_setup(void)
         */
        __dt_setup_arch(__dtb_start);
 
-       strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
-
        of_scan_flat_dt(early_init_dt_find_memory, NULL);
        if (memory_dtb)
                of_scan_flat_dt(early_init_dt_scan_memory, NULL);