MIPS: generic: Init command line with fw_init_cmdline()
authorPaul Cercueil <paul@crapouillou.net>
Sun, 6 Sep 2020 19:29:27 +0000 (21:29 +0200)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Fri, 18 Sep 2020 14:31:10 +0000 (16:31 +0200)
commit13a0ea28e8c698cc0d600fdeed8da3e4d478b97e
tree41acc405df53a0ced657931a0820af44801df477
parent8405419942f2f012dc23b5c8817eded2d591b033
MIPS: generic: Init command line with fw_init_cmdline()

The function bootcmdline_init() in arch/mips/kernel/setup.c will
populate the boot_command_line string using the parameters hardcoded in
the kernel, and those provided in the devicetree file. Then, it would
append the content of the arcs_cmdline variable, which is filled by the
board's plat_mem_setup() function.

The plat_mem_setup() function for the generic MIPS board would just copy
the current boot_command_line to arcs_cmdline, which is nonsense for two
reasons:
- the result will be appended to the boot_command_line anyway, so all it
  does is duplicate every single parameter on the command line;
- the code did not perform at all what it's supposed to, which is to
  retrieve the parameters passed by the bootloader.

Fix this by calling fw_init_cmdline() in plat_mem_setup(), which will
properly initialize arcs_cmdline to the parameters passed by the
bootloader.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/generic/init.c