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