[PATCH 2/6] TDA19988 : Port to RTEMS

Vijay Kumar Banerjee vijaykumar9597 at gmail.com
Sun Jun 30 16:24:52 UTC 2019


On Sun, Jun 30, 2019 at 9:18 PM Christian Mauderer <list at c-mauderer.de>
wrote:

> On 30/06/2019 17:29, Vijay Kumar Banerjee wrote:
> > ---
> >  Makefile.todo                                 | 27 ++++++
> >  buildset/default.ini                          |  1 +
> >  libbsd.py                                     | 46 ++++++++++
> >  rtemsbsd/include/bsp/nexus-devices.h          |  1 +
> >  .../machine/rtems-bsd-kernel-namespace.h      | 65 +++++++++++++
> >  rtemsbsd/include/rtems/bsd/local/clknode_if.h | 92 +++++++++++++++++++
> >  rtemsbsd/include/rtems/bsd/local/hdmi_if.h    | 71 ++++++++++++++
> >  .../include/rtems/bsd/local/opt_videomode.h   |  0
> >  rtemsbsd/local/clknode_if.c                   | 40 ++++++++
> >  rtemsbsd/local/hdmi_if.c                      | 35 +++++++
> >  10 files changed, 378 insertions(+)
> >  create mode 100644 rtemsbsd/include/rtems/bsd/local/clknode_if.h
> >  create mode 100644 rtemsbsd/include/rtems/bsd/local/hdmi_if.h
> >  create mode 100644 rtemsbsd/include/rtems/bsd/local/opt_videomode.h
> >  create mode 100644 rtemsbsd/local/clknode_if.c
> >  create mode 100644 rtemsbsd/local/hdmi_if.c
> >
> > diff --git a/Makefile.todo b/Makefile.todo
> > index 42bedc15..358d6956 100644
> > --- a/Makefile.todo
> > +++ b/Makefile.todo
> > @@ -47,6 +47,10 @@ GENERATED += $(LOCAL_INC)/gpiobus_if.h
> >  GENERATED += $(LOCAL_SRC)/gpiobus_if.c
> >  GENERATED += $(LOCAL_INC)/iicbus_if.h
> >  GENERATED += $(LOCAL_SRC)/iicbus_if.c
> > +GENERATED += $(LOCAL_INC)/clknode_if.h
> > +GENERATED += $(LOCAL_SRC)/clknode_if.c
> > +GENERATED += $(LOCAL_INC)/hdmi_if.h
> > +GENERATED += $(LOCAL_SRC)/hdmi_if.c
> >  GENERATED += rtemsbsd/include/machine/rtems-bsd-regdomain.h
> >  GENERATED += rtemsbsd/rtems/rtems-bsd-regdomain.c
> >
> > @@ -239,6 +243,29 @@ $(LOCAL_SRC)/sdhci_if.c:
> $(FREEBSD_SRC)/sys/dev/sdhci/sdhci_if.m
> >           -e 's|#include "sdhci_if.h"|#include
> <rtems/bsd/local/sdhci_if.h>|'
> >       mv sdhci_if.c $@
> >
> > +
> > +$(LOCAL_INC)/clknode_if.h:
> $(FREEBSD_SRC)/sys/dev/extres/clk/clknode_if.m
> > +     awk -f $(TOOLS)/makeobjops.awk $< -h
> > +     mv clknode_if.h $@
> > +
> > +$(LOCAL_SRC)/clknode_if.c:
> $(FREEBSD_SRC)/sys/dev/extres/clk/clknode_if.m
> > +     awk -f $(TOOLS)/makeobjops.awk $< -c
> > +     sed -i clknode_if.c \
> > +         -e '1 i\#include <machine/rtems-bsd-kernel-space.h>\n' \
> > +         -e 's|#include "clknode_if.h"|#include
> <rtems/bsd/local/clknode_if.h>|'
> > +     mv clknode_if.c $@
> > +
> > +$(LOCAL_INC)/hdmi_if.h: $(FREEBSD_SRC)/sys/dev/hdmi/hdmi_if.m
> > +     awk -f $(TOOLS)/makeobjops.awk $< -h
> > +     mv hdmi_if.h $@
> > +
> > +$(LOCAL_SRC)/hdmi_if.c: $(FREEBSD_SRC)/sys/dev/hdmi/hdmi_if.m
> > +     awk -f $(TOOLS)/makeobjops.awk $< -c
> > +     sed -i hdmi_if.c \
> > +         -e '1 i\#include <machine/rtems-bsd-kernel-space.h>\n' \
> > +         -e 's|#include "hdmi_if.h"|#include
> <rtems/bsd/local/hdmi_if.h>|'
> > +     mv hdmi_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 4acb2368..1d052a48 100644
> > --- a/buildset/default.ini
> > +++ b/buildset/default.ini
> > @@ -37,6 +37,7 @@ dev_usb_storage = on
> >  dev_usb_wlan = off
> >  dev_wlan_rtwn = off
> >  iic = on
> > +display = on
> >  dhcpcd = on
> >  dpaa = on
> >  evdev = on
> > diff --git a/libbsd.py b/libbsd.py
> > index 12d4c2ed..b21ddccf 100644
> > --- a/libbsd.py
> > +++ b/libbsd.py
> > @@ -777,6 +777,51 @@ class iic(builder.Module):
> >              mm.generator['source']()
> >          )
> >
> > +
> > +#
> > +# DISPLAY
> > +#
> > +class display(builder.Module):
> > +
> > +    def __init__(self, manager):
> > +        super(display, self).__init__(manager, type(self).__name__)
> > +
> > +    def generate(self):
> > +        mm = self.manager
> > +        self.addKernelSpaceHeaderFiles(
> > +            [
> > +                'sys/dev/extres/clk/clk.h',
> > +                'sys/dev/hdmi/dwc_hdmi.h',
> > +                'sys/dev/hdmi/dwc_hdmireg.h',
> > +                'sys/dev/videomode/videomode.h',
> > +                'sys/dev/videomode/edidvar.h',
> > +                'sys/dev/videomode/edidreg.h',
> > +                'sys/dev/videomode/ediddevs.h',
> > +                'sys/dev/videomode/ediddevs_data.h',
> > +                'sys/dev/videomode/vesagtf.h',
> > +            ]
> > +        )
> > +        self.addKernelSpaceSourceFiles(
> > +            [
> > +                'sys/arm/ti/am335x/tda19988.c',
> > +                'sys/dev/hdmi/dwc_hdmi.c',
> > +                'sys/dev/hdmi/dwc_hdmi_fdt.c',
> > +                'sys/dev/extres/clk/clk.c',
>
> The clk.c looks like some framework for handling clocks. I would expect
> that you either need some beagle bone specific clock driver too or don't
> need the support at all. Where is it used?
>
> How does it interact with the clock initializations done in the BSP? Can
> a resource conflict happen there?
>
> I have included the clk.c file as some macros from clk.h is used
in dwc_hdmi_fdt.c
I have just tried removing it and it doesn't cause any undefined symbol
reference,
I think I'm lucky here if it can simply be removed in v2 of the patch.

> [...]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190630/0b9209c4/attachment-0002.html>


More information about the devel mailing list