[PATCH 10/10] TI Pinmux : Port to RTEMS

Vijay Kumar Banerjee vijaykumar9597 at gmail.com
Sun Jul 28 10:45:23 UTC 2019


On Sat, Jul 27, 2019 at 7:35 PM Christian Mauderer <list at c-mauderer.de>
wrote:

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


More information about the devel mailing list