Re: [RFC PATCH v3 05/35] arch/sh/kernel/setup.c: Update DT support.
Geert Uytterhoeven <[email protected]>
| Newsgroups | gmane.linux.ports.sh.devel |
|---|---|
| Message-ID | <CAMuHMdXw1ZQeB7N-8AQ_Ojt74MKQNFmVafTNxNQ-HfKJd83QHg@mail.gmail.com> |
Hi Sato-san, On Sat, Oct 14, 2023 at 4:54 PM Yoshinori Sato <[email protected]> wrote: > Fix fdt initialize. > > Signed-off-by: Yoshinori Sato <[email protected]> Thanks for your patch! > --- > arch/sh/kernel/setup.c | 36 +++++++++++++++++++++++++----------- > 1 file changed, 25 insertions(+), 11 deletions(-) > > diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c > index b3da2757faaf..8fdbb9836134 100644 > --- a/arch/sh/kernel/setup.c > +++ b/arch/sh/kernel/setup.c > @@ -31,6 +31,7 @@ > #include <linux/memblock.h> > #include <linux/of.h> > #include <linux/of_fdt.h> > +#include <linux/libfdt.h> > #include <linux/uaccess.h> > #include <uapi/linux/mount.h> > #include <asm/io.h> > @@ -79,7 +80,13 @@ extern int root_mountflags; > #define RAMDISK_PROMPT_FLAG 0x8000 > #define RAMDISK_LOAD_FLAG 0x4000 > > +#if defined(CONFIG_OF) || !defined(USE_BUILTIN_DTB) This breaks non-DT. I assume you meant "&&" instead? Also, USE_BUILTIN_DTB lacks the CONFIG_-prefix. However, I'm not sure this works as expected, as I have CONFIG_USE_BUILTIN_DTB=y on qemu/r2d, but the kernel command line passed to qemu is not used by Linux? > +#define CHOSEN_BOOTARGS > +#endif > + > +#ifndef CHOSEN_BOOTARGS > static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, }; > +#endif > > static struct resource code_resource = { > .name = "Kernel code", 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