<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jul 27, 2019 at 7:35 PM Christian Mauderer <<a href="mailto:list@c-mauderer.de">list@c-mauderer.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Does this initialize only the pins for drivers that are registered in<br>
libbsd or all pins? I think you had an extended boot log where you might<br>
could see it.<br>
<br>
If it is all pins, this might interfere with RTEMS drivers that are not<br>
libbsd based. In that case we need some kind of solution (not sure yet<br>
which one).<br>
<br>
Beneath that: I added some comments in the code below.<br>
<br>
On 26/07/2019 13:22, Vijay Kumar Banerjee wrote:<br>
> ---<br>
> Makefile.todo | 13 ++++++<br>
> buildset/default.ini | 1 +<br>
> libbsd.py | 33 +++++++++++++++<br>
> rtemsbsd/include/bsp/nexus-devices.h | 1 +<br>
> .../machine/rtems-bsd-kernel-namespace.h | 9 +++++<br>
> .../include/rtems/bsd/local/fdt_pinctrl_if.h | 40 +++++++++++++++++++<br>
> rtemsbsd/local/fdt_pinctrl_if.c | 27 +++++++++++++<br>
> 7 files changed, 124 insertions(+)<br>
> create mode 100644 rtemsbsd/local/fdt_pinctrl_if.c<br>
> <br>
> diff --git a/Makefile.todo b/Makefile.todo<br>
> index ed1e428e..1bf61432 100644<br>
> --- a/Makefile.todo<br>
> +++ b/Makefile.todo<br>
> @@ -53,6 +53,8 @@ GENERATED += $(LOCAL_INC)/hdmi_if.h<br>
> GENERATED += $(LOCAL_SRC)/hdmi_if.c<br>
> GENERATED += $(LOCAL_INC)/fb_if.h<br>
> GENERATED += $(LOCAL_SRC)/fb_if.c<br>
> +GENERATED += $(LOCAL_INC)/fdt_pinctrl_if.h<br>
> +GENERATED += $(LOCAL_SRC)/fdt_pinctrl_if.c<br>
> GENERATED += rtemsbsd/include/machine/rtems-bsd-regdomain.h<br>
> GENERATED += rtemsbsd/rtems/rtems-bsd-regdomain.c<br>
> <br>
> @@ -279,6 +281,17 @@ $(LOCAL_SRC)/fb_if.c: $(FREEBSD_SRC)/sys/dev/fb/fb_if.m<br>
> -e 's|#include "fb_if.h"|#include <rtems/bsd/local/fb_if.h>|'<br>
> mv fb_if.c $@<br>
> <br>
> +$(LOCAL_INC)/fdt_pinctrl_if.h: $(FREEBSD_SRC)/sys/dev/fdt/fdt_pinctrl_if.m<br>
> + awk -f $(TOOLS)/makeobjops.awk $< -h<br>
> + mv fdt_pinctrl_if.h $@<br>
> +<br>
> +$(LOCAL_SRC)/fdt_pinctrl_if.c: $(FREEBSD_SRC)/sys/dev/fdt/fdt_pinctrl_if.m<br>
> + awk -f $(TOOLS)/makeobjops.awk $< -c<br>
> + sed -i fdt_pinctrl_if.c \<br>
> + -e '1 i\#include <machine/rtems-bsd-kernel-space.h>\n' \<br>
> + -e 's|#include "fdt_pinctrl_if.h"|#include <rtems/bsd/local/fdt_pinctrl_if.h>|'<br>
> + mv fdt_pinctrl_if.c $@<br>
> +<br>
> $(LOCAL_SRC)/gpio_if.c: $(FREEBSD_SRC)/sys/dev/gpio/gpio_if.m<br>
> awk -f $(TOOLS)/makeobjops.awk $< -c<br>
> mv gpio_if.c $@<br>
> diff --git a/buildset/default.ini b/buildset/default.ini<br>
> index 1d052a48..eed5cb75 100644<br>
> --- a/buildset/default.ini<br>
> +++ b/buildset/default.ini<br>
> @@ -38,6 +38,7 @@ dev_usb_wlan = off<br>
> dev_wlan_rtwn = off<br>
> iic = on<br>
> display = on<br>
> +ti_pinmux = on<br>
> dhcpcd = on<br>
> dpaa = on<br>
> evdev = on<br>
> diff --git a/libbsd.py b/libbsd.py<br>
> index 775eeeac..cdd97010 100644<br>
> --- a/libbsd.py<br>
> +++ b/libbsd.py<br>
> @@ -840,6 +840,38 @@ class display(builder.Module):<br>
> mm.generator['source']()<br>
> )<br>
> <br>
> +#<br>
> +# TI PINMUX<br>
> +#<br>
> +class ti_pinmux(builder.Module):<br>
> +<br>
> + def __init__(self, manager):<br>
> + super(ti_pinmux, self).__init__(manager, type(self).__name__)<br>
> +<br>
> + def generate(self):<br>
> + mm = self.manager<br>
> + self.addKernelSpaceHeaderFiles(<br>
> + [<br>
> + 'sys/arm/ti/ti_pinmux.h',<br>
> + 'sys/arm/ti/omap4/omap4_scm_padconf.h',<br>
> + 'sys/arm/ti/am335x/am335x_scm_padconf.h',<br>
> + ]<br>
> + )<br>
> + self.addKernelSpaceSourceFiles(<br>
> + [<br>
> + 'sys/arm/ti/ti_pinmux.c',<br>
> + 'sys/dev/fdt/fdt_pinctrl.c',<br>
<br>
That looks like a general file. So either this module isn't ti_pinmux<br>
but pinmux or the pinctrl should be somewhere else.<br>
<br>
> + 'sys/arm/ti/am335x/am335x_scm_padconf.c',<br>
> + ],<br>
> + mm.generator['source']()<br>
> + )<br>
> + self.addRTEMSSourceFiles(<br>
> + [<br>
> + 'local/fdt_pinctrl_if.c',<br>
<br>
Same for that.<br><br></blockquote><div>OK. I think it can be renamed to pinmux as I didn't find any other heading to put it</div><div>under. Would you suggest some other section? </div></div></div>