devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [RFC PATCH] printk: console: Allow each console to have its own loglevel
       [not found]   ` <YoZWFi0AtmA9fvv/@chrisdown.name>
@ 2022-05-19 17:48     ` Geert Uytterhoeven
  2022-05-19 18:05       ` Chris Down
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2022-05-19 17:48 UTC (permalink / raw)
  To: Chris Down
  Cc: Linux Kernel Mailing List, Petr Mladek, Greg Kroah-Hartman,
	Kernel Team, Rob Herring, Krzysztof Kozlowski,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

Hi Chris,

CC DT

On Thu, May 19, 2022 at 4:37 PM Chris Down <chris@chrisdown.name> wrote:
> Geert Uytterhoeven writes:
> >All of the above options are appropriate for "classic" systems,
> >where the console device is selected using the "console=" option.
> >
> >On systems using Device tree, the serial console device is selected
> >using the "chosen/stout-path" property in DT, and the graphical
> >console is usually auto-detected and auto-enabled through DRM.
> >Do you envision a way to specify a specific console loglevel on the
> >kernel command line on such systems?
>
> Interesting question! I hadn't really thought about device tree. I actually
> have very little understanding of how it works to be honest :-)
>
> I'm happy to add loglevel support to device tree, I assume I'd add another
> property under the chosen node, like chosen/stdout-loglevel.

Please do not add a new property there.
IMHO, the loglevel should be specified on the kernel command line,
and not be fixed using a DT property.

Typically, boot loaders (e.g. U-Boot) replace the command line
specified in chosen/stdout-path in DT by something retrieved from
the boot environment (e.g. user-specifief bootargs in NVMEM).

> I have some questions, though:
>
> 1. It looks like DT is standardised. Do I need to get standards approval first?
> 2. Is there documentation on how to reliably test DT changes?

The DT specification can be found at
https://www.devicetree.org/specifications/

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC PATCH] printk: console: Allow each console to have its own loglevel
  2022-05-19 17:48     ` [RFC PATCH] printk: console: Allow each console to have its own loglevel Geert Uytterhoeven
@ 2022-05-19 18:05       ` Chris Down
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Down @ 2022-05-19 18:05 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux Kernel Mailing List, Petr Mladek, Greg Kroah-Hartman,
	Kernel Team, Rob Herring, Krzysztof Kozlowski,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

Hi Geert,

Geert Uytterhoeven writes:
>CC DT

Thanks!

>On Thu, May 19, 2022 at 4:37 PM Chris Down <chris@chrisdown.name> wrote:
>> Geert Uytterhoeven writes:
>> >All of the above options are appropriate for "classic" systems,
>> >where the console device is selected using the "console=" option.
>> >
>> >On systems using Device tree, the serial console device is selected
>> >using the "chosen/stout-path" property in DT, and the graphical
>> >console is usually auto-detected and auto-enabled through DRM.
>> >Do you envision a way to specify a specific console loglevel on the
>> >kernel command line on such systems?
>>
>> Interesting question! I hadn't really thought about device tree. I actually
>> have very little understanding of how it works to be honest :-)
>>
>> I'm happy to add loglevel support to device tree, I assume I'd add another
>> property under the chosen node, like chosen/stdout-loglevel.
>
>Please do not add a new property there.
>IMHO, the loglevel should be specified on the kernel command line,
>and not be fixed using a DT property.

Ah, if that's what you want, it should already work I think (if I understood 
your point correctly).

As long as you know which console type will be brought up, you can just specify 
the following rule on the command line and the rule will be applied to 
whichever console is brought up by DT (untested, but it should work):

     # default 4, serial to 5
     loglevel=4 console=ttyS0/5

     # default 4, usb to 5
     loglevel=4 console=ttyUSB0/5

Is that the kind of thing you meant?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-19 18:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <YoUBh5BSsURDO71Z@chrisdown.name>
     [not found] ` <CAMuHMdU2tUU6FAM-nK9oxd0GwcO3WwvZp9Um4=w5By+N0P0kXA@mail.gmail.com>
     [not found]   ` <YoZWFi0AtmA9fvv/@chrisdown.name>
2022-05-19 17:48     ` [RFC PATCH] printk: console: Allow each console to have its own loglevel Geert Uytterhoeven
2022-05-19 18:05       ` Chris Down

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).