Re: [PATCH] riscv/console: console-config.c update
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.almat...@cl.cam.ac.uk> wrote: > Hello Somesh, > > This patch will break other existing BSPs that don't have > "stdout-path" (in your case serial@x) 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@ 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 > 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.hu...@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@rtems.org > > http://lists.rtems.org/mailman/listinfo/devel > icicle.dts Description: audio/vnd.dts ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] riscv/console: console-config.c update
Hello Somesh, This patch will break other existing BSPs that don't have "stdout-path" (in your case serial@x) 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@ in the stdout-path. On Tue, 18 May 2021 at 20:43, Sebastian Huber 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.hu...@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@rtems.org > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] riscv/console: console-config.c update
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.hu...@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@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] riscv/console: console-config.c update
This patch will help use Microchip PolarFire SoC icicle kit with RTEMS mainline...any plan on when this will be available? On Tue, May 11, 2021 at 11:35 AM somesh deshmukh wrote: > Gentle Reminder. > > Hi All, > Can you please review this patch and let me know if there are any > suggestions/comments. > > Regards, > Somesh > > -- Forwarded message - > From: Somesh Deshmukh > Date: Wed, May 5, 2021 at 11:26 PM > Subject: [PATCH] riscv/console: console-config.c update > To: > Cc: Somesh Deshmukh > > > - 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, "/"); > -- > 2.25.1 > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Fwd: [PATCH] riscv/console: console-config.c update
Gentle Reminder. Hi All, Can you please review this patch and let me know if there are any suggestions/comments. Regards, Somesh -- Forwarded message - From: Somesh Deshmukh Date: Wed, May 5, 2021 at 11:26 PM Subject: [PATCH] riscv/console: console-config.c update To: Cc: Somesh Deshmukh - 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, "/"); -- 2.25.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH] riscv/console: console-config.c update
- 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, "/"); -- 2.25.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH] riscv/console: console-config.c update
- 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. - Restored ns16550_handler_interrupt in console_initialize() as per review comments. --- 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, "/"); -- 2.25.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel