[PATCH] riscv/console: console-config.c update

somesh deshmukh someshdeshmukh07 at gmail.com
Thu May 27 03:40:06 UTC 2021


Hi Hesham/Sebastian,

Please find the attached device tree source file which I used for rtems
testing on PolarFire SoC ICICLE Kit.


On Wed, May 19, 2021 at 2:43 PM Hesham Almatary <
hesham.almatary at cl.cam.ac.uk> wrote:

> Hello Somesh,
>
> This patch will break other existing BSPs that don't have
> "stdout-path" (in your case serial at xxxxx) node part of "/soc" node.
> You can either 1) Modify your DTS to have /serial node outside /soc,
> or 2) Add a new config for your BSP such as
> RISCV_ENABLE_FRDME310ARTY_SUPPORT and use it instead. I am not sure if
>  DTS allows having something like /soc/serial at xxxx in the stdout-path.
>
Thanks for the suggestion Hesham. We are discussing internally whether to
go with a variant of the existing riscv BSP or introduce a new riscv BSP
altogether.


> On Tue, 18 May 2021 at 20:43, Sebastian Huber
> <sebastian.huber at embedded-brains.de> wrote:
> >
> > On 05/05/2021 19:55, Somesh Deshmukh wrote:
> > > - Parsing the sub-node should be available generic not specific to
> Freedom
> > >    Arty310 board. If we remove the Freedom Arty macro now, it will lose
> > >    backward compatibility.The proposed change will retain the backward
> > >    compatibility and also adds the necessary fix for parsing sub-node.
> > > ---
> > >   bsps/riscv/riscv/console/console-config.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/bsps/riscv/riscv/console/console-config.c
> b/bsps/riscv/riscv/console/console-config.c
> > > index d962a5a418..797506a31b 100644
> > > --- a/bsps/riscv/riscv/console/console-config.c
> > > +++ b/bsps/riscv/riscv/console/console-config.c
> > > @@ -91,7 +91,7 @@ static int riscv_get_console_node(const void *fdt)
> > >       stdout_path = "";
> > >     }
> > >
> > > -#if RISCV_ENABLE_FRDME310ARTY_SUPPORT != 0
> > > +#if ((RISCV_ENABLE_FRDME310ARTY_SUPPORT != 0) ||
> (RISCV_CONSOLE_MAX_NS16550_DEVICES > 0))
> > >     int root;
> > >     int soc;
> > >     root = fdt_path_offset(fdt, "/");
> >
> > What is the purpose of this subnode stuff here:
> >
> > static int riscv_get_console_node(const void *fdt)
> > {
> >    const char *stdout_path;
> >    int node;
> >
> >    node = fdt_path_offset(fdt, "/chosen");
> >
> >    stdout_path = fdt_getprop(fdt, node, "stdout-path", NULL);
> >    if (stdout_path == NULL) {
> >      stdout_path = "";
> >    }
> >
> > #if ((RISCV_ENABLE_FRDME310ARTY_SUPPORT != 0) ||
> > (RISCV_CONSOLE_MAX_NS16550_DEVICES > 0))
> >    int root;
> >    int soc;
> >    root = fdt_path_offset(fdt, "/");
> >    soc = fdt_subnode_offset(fdt, root, "soc");
> >
> >    int offset=fdt_subnode_offset(fdt, soc,stdout_path);
> >
> >    return offset;
> > #else
> >    return fdt_path_offset(fdt, stdout_path);
> > #endif
> > }
> >
> > What is the value of stdout_path in your setup? Can you show the
> > relevant parts of the device tree sources?
> >
> > --
> > embedded brains GmbH
> > Herr Sebastian HUBER
> > Dornierstr. 4
> > 82178 Puchheim
> > Germany
> > email: sebastian.huber at embedded-brains.de
> > phone: +49-89-18 94 741 - 16
> > fax:   +49-89-18 94 741 - 08
> >
> > Registergericht: Amtsgericht München
> > Registernummer: HRB 157899
> > Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> > Unsere Datenschutzerklärung finden Sie hier:
> > https://embedded-brains.de/datenschutzerklaerung/
> > _______________________________________________
> > devel mailing list
> > devel at rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210527/aac0fab6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: icicle.dts
Type: audio/vnd.dts
Size: 3219 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210527/aac0fab6/attachment-0001.bin>


More information about the devel mailing list