m68k: generalize uboot command line support
Subsystems (2)
Greg Ungerer
maintainerPATCH 1/1 m68k: generalize uboot command line support
The uboot command line support needs to be used by both MMU and no-MMU setups, but currently we only have the code in the no-MMU code paths. Move the uboot command line processing code into its own file. Add appropriate calls to it from both the MMU and no-MMU arch setup code.
--- arch/m68k/include/asm/bootinfo.h | 4 ++ arch/m68k/kernel/Makefile | 1 + arch/m68k/kernel/setup_mm.c | 3 ++ arch/m68k/kernel/setup_no.c | 79 +---------------------------- arch/m68k/kernel/uboot.c | 107 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 117 insertions(+), 77 deletions(-) create mode 100644 arch/m68k/kernel/uboot.c
arch/m68k/include/asm/bootinfo.h +4 -0
@@ -22,6 +22,10 @@ extern void save_bootinfo(const struct bi_record *bi);static inline void save_bootinfo (const struct bi_record *bi) {}#endif +#ifdef CONFIG_UBOOT +void process_uboot_commandline (char *commandp,int size); +#endif +#endif /* __ASSEMBLY__ */
arch/m68k/kernel/Makefile +1 -0
@@ -24,6 +24,7 @@ obj-$(CONFIG_HAS_DMA) += dma.o obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o obj-$(CONFIG_BOOTINFO_PROC) += bootinfo_proc.o +obj-$(CONFIG_UBOOT) += uboot.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
arch/m68k/kernel/setup_mm.c +3 -0
@@ -274,6 +274,9 @@ void __init setup_arch(char **cmdline_p)strncpy (m68k_command_line,CONFIG_BOOTPARAM_STRING ,CL_SIZE ); m68k_command_line[CL_SIZE -1 ] =0 ;#endif /* CONFIG_BOOTPARAM */ +#if defined(CONFIG_UBOOT ) +process_uboot_commandline (&m68k_command_line[0 ],CL_SIZE ); +#endif *cmdline_p = m68k_command_line;memcpy (boot_command_line, *cmdline_p,CL_SIZE );
arch/m68k/kernel/setup_no.c +2 -77
97 lines not on this page · raw message
arch/m68k/kernel/uboot.c new file +107 -0
107 lines not on this page · raw message
Signature · 1 line
1.9.1
Geert Uytterhoeven
maintainerHi Greg,
arch/m68k/include/asm/bootinfo.h extern void save_bootinfo(const struct bi_record *bi); · line 27
Quoted 9 lines · Greg Ungerer
arch/m68k/include/asm/bootinfo.h +3
-0@@ -22,6 +22,10 @@ extern void save_bootinfo(const struct bi_record *bi);static inline void save_bootinfo (const struct bi_record *bi) {}#endif +#ifdef CONFIG_UBOOT +void process_uboot_commandline (char *commandp,int size); +#endif
What about providing a dummy for the !CONFIG_UBOOT case..
arch/m68k/kernel/setup_mm.c void __init setup_arch(char **cmdline_p) · line 279
Quoted 9 lines
arch/m68k/kernel/setup_mm.c +3
-0@@ -274,6 +274,9 @@ void __init setup_arch(char **cmdline_p)strncpy (m68k_command_line,CONFIG_BOOTPARAM_STRING ,CL_SIZE ); m68k_command_line[CL_SIZE -1 ] =0 ;#endif /* CONFIG_BOOTPARAM */ +#if defined(CONFIG_UBOOT ) +process_uboot_commandline (&m68k_command_line[0 ],CL_SIZE ); +#endif
... so you can drop the #if and #endif here?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Greg Ungerer
maintainerHi Geert,
Quoted 15 lines · Geert Uytterhoeven
Hi Greg,
arch/m68k/include/asm/bootinfo.h extern void save_bootinfo(const struct bi_record *bi); · line 27
Quoted 9 lines · Greg Ungerer
arch/m68k/include/asm/bootinfo.h +3
-0@@ -22,6 +22,10 @@ extern void save_bootinfo(const struct bi_record *bi);static inline void save_bootinfo (const struct bi_record *bi) {}#endif +#ifdef CONFIG_UBOOT +void process_uboot_commandline (char *commandp,int size); +#endif What about providing a dummy for the !CONFIG_UBOOT case..
Quoted 11 lines
arch/m68k/kernel/setup_mm.c void __init setup_arch(char **cmdline_p) · line 279
Quoted 9 lines
arch/m68k/kernel/setup_mm.c +3
-0@@ -274,6 +274,9 @@ void __init setup_arch(char **cmdline_p)strncpy (m68k_command_line,CONFIG_BOOTPARAM_STRING ,CL_SIZE ); m68k_command_line[CL_SIZE -1 ] =0 ;#endif /* CONFIG_BOOTPARAM */ +#if defined(CONFIG_UBOOT ) +process_uboot_commandline (&m68k_command_line[0 ],CL_SIZE ); +#endif ... so you can drop the #if and #endif here?
Yep, good idea. I'll re-spin with that.
Thanks
Greg