Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1660169
| From | Paul Cercueil <paul@crapouillou.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 08/15] MIPS: ingenic: Use common cmdline handling code |
| Date | 2017-06-07 22:10 +0200 |
| Message-ID | <tPPrc-2PB-41@gated-at.bofh.it> (permalink) |
| References | <tPPrb-2PB-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Paul Burton <paul.burton@imgtec.com>
jz4740_init_cmdline appends all arguments from argv (in fw_arg1) to
arcs_cmdline, up to argc (in fw_arg0). The common code in
fw_init_cmdline will do the exact same thing when run on a system where
fw_arg0 isn't a pointer to kseg0 (it'll also set _fw_envp but we don't
use it). Remove the custom implementation & use the generic code.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
---
arch/mips/jz4740/prom.c | 24 ++----------------------
1 file changed, 2 insertions(+), 22 deletions(-)
diff --git a/arch/mips/jz4740/prom.c b/arch/mips/jz4740/prom.c
index 47e857194ce6..a62dd8e6ecf9 100644
--- a/arch/mips/jz4740/prom.c
+++ b/arch/mips/jz4740/prom.c
@@ -20,33 +20,13 @@
#include <linux/serial_reg.h>
#include <asm/bootinfo.h>
+#include <asm/fw/fw.h>
#include <asm/mach-jz4740/base.h>
-static __init void jz4740_init_cmdline(int argc, char *argv[])
-{
- unsigned int count = COMMAND_LINE_SIZE - 1;
- int i;
- char *dst = &(arcs_cmdline[0]);
- char *src;
-
- for (i = 1; i < argc && count; ++i) {
- src = argv[i];
- while (*src && count) {
- *dst++ = *src++;
- --count;
- }
- *dst++ = ' ';
- }
- if (i > 1)
- --dst;
-
- *dst = 0;
-}
-
void __init prom_init(void)
{
- jz4740_init_cmdline((int)fw_arg0, (char **)fw_arg1);
mips_machtype = MACH_INGENIC_JZ4740;
+ fw_init_cmdline();
}
void __init prom_free_prom_memory(void)
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/15] Ingenic JZ4770 and GCW Zero patchset Paul Cercueil <paul@crapouillou.net> - 2017-06-07 22:10 +0200
[PATCH 03/15] clk: ingenic: Add code to enable/disable PLLs Paul Cercueil <paul@crapouillou.net> - 2017-06-07 22:10 +0200
[PATCH 14/15] devicetree/bindings: Add GCW vendor prefix Paul Cercueil <paul@crapouillou.net> - 2017-06-07 22:10 +0200
Re: [PATCH 14/15] devicetree/bindings: Add GCW vendor prefix Rob Herring <robh@kernel.org> - 2017-06-09 16:30 +0200
[PATCH 11/15] MIPS: ingenic: Initial JZ4770 support Paul Cercueil <paul@crapouillou.net> - 2017-06-07 22:10 +0200
[PATCH 08/15] MIPS: ingenic: Use common cmdline handling code Paul Cercueil <paul@crapouillou.net> - 2017-06-07 22:10 +0200
[PATCH 01/15] clk: ingenic: Fix recalc_rate for clocks with fixed divider Paul Cercueil <paul@crapouillou.net> - 2017-06-07 22:10 +0200
[PATCH 07/15] MIPS: Setup boot_command_line before plat_mem_setup Paul Cercueil <paul@crapouillou.net> - 2017-06-07 22:10 +0200
[PATCH 13/15] MIPS: JZ4770: Workaround for corrupted DMA transfers Paul Cercueil <paul@crapouillou.net> - 2017-06-07 22:10 +0200
[PATCH 04/15] clk: Add Ingenic jz4770 CGU driver Paul Cercueil <paul@crapouillou.net> - 2017-06-07 22:10 +0200
Re: [PATCH 04/15] clk: Add Ingenic jz4770 CGU driver Stephen Boyd <sboyd@codeaurora.org> - 2017-06-07 23:00 +0200
Re: [PATCH 04/15] clk: Add Ingenic jz4770 CGU driver Maarten ter Huurne <maarten@treewalker.org> - 2017-06-08 11:00 +0200
Re: [PATCH 04/15] clk: Add Ingenic jz4770 CGU driver Paul Cercueil <paul@crapouillou.net> - 2017-06-08 23:20 +0200
[PATCH 09/15] MIPS: platform: add machtype IDs for more Ingenic SoCs Paul Cercueil <paul@crapouillou.net> - 2017-06-07 22:10 +0200
csiph-web