[PATCH 2/2] fb and tda : port to RTEMS

Vijay Kumar Banerjee vijaykumar9597 at gmail.com
Wed Jun 19 19:10:13 UTC 2019


On Wed, Jun 19, 2019 at 9:14 PM Christian Mauderer <list at c-mauderer.de>
wrote:

> Bit less adaptions than I thought that you have in the code. I assumed
> that I would see some more locations in that patch where you already
> removed code blocks with ifdef __rtems__. I wanted to have a look
> especially at these parts. I expect that you will have some problems
> with memories (like allocating or copying from/to I/O memory or some DMA
> stuff). Please try to be really careful with that stuff. A lot of the
> RTEMS implementations are quite a bit simplified or there have been
> hacks during porting such parts.
>
> There were some other files where I needed to do many adaptations but
I have removed them for now to reduce the number of errors I'm getting,
I'll incrementally add them only on top of working patches.

> For example sometimes you can replace some FreeBSD I/O memory operations
> by just plain memory accesses. But sometimes (like for DMA) it is
> necessary to think about them and add cache handling.
>
> On 18/06/2019 21:53, Vijay Kumar Banerjee wrote:
> > ---
> >  Makefile.todo                                 |  41 +++++++
> >  buildset/default.ini                          |   2 +
> >  libbsd.py                                     | 100 ++++++++++++++++++
> >  rtemsbsd/include/bsp/nexus-devices.h          |  13 ++-
> >  .../machine/rtems-bsd-kernel-namespace.h      |  89 ++++++++++++++++
> >  rtemsbsd/include/rtems/bsd/local/clknode_if.h |  92 ++++++++++++++++
> >  rtemsbsd/include/rtems/bsd/local/fb_if.h      |  45 ++++++++
> >  rtemsbsd/include/rtems/bsd/local/hdmi_if.h    |  71 +++++++++++++
> >  rtemsbsd/local/clknode_if.c                   |  40 +++++++
> >  rtemsbsd/local/fb_if.c                        |  30 ++++++
> >  rtemsbsd/local/hdmi_if.c                      |  35 ++++++
> >  rtemsbsd/sys/dev/iicbus/rtems-i2c.c           |   4 +-
> >  12 files changed, 557 insertions(+), 5 deletions(-)
> >  create mode 100644 rtemsbsd/include/rtems/bsd/local/clknode_if.h
> >  create mode 100644 rtemsbsd/include/rtems/bsd/local/fb_if.h
> >  create mode 100644 rtemsbsd/include/rtems/bsd/local/hdmi_if.h
> >  create mode 100644 rtemsbsd/local/clknode_if.c
> >  create mode 100644 rtemsbsd/local/fb_if.c
> >  create mode 100644 rtemsbsd/local/hdmi_if.c
> >
> > diff --git a/Makefile.todo b/Makefile.todo
> > index 74188531..910f8c95 100644
> > --- a/Makefile.todo
> > +++ b/Makefile.todo
> > @@ -45,6 +45,14 @@ GENERATED += $(LOCAL_INC)/sdhci_if.h
> >  GENERATED += $(LOCAL_SRC)/sdhci_if.c
> >  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 += $(LOCAL_INC)/fb_if.h
> > +GENERATED += $(LOCAL_SRC)/fb_if.c
> >  GENERATED += rtemsbsd/include/machine/rtems-bsd-regdomain.h
> >  GENERATED += rtemsbsd/rtems/rtems-bsd-regdomain.c
> >
> > @@ -226,6 +234,39 @@ $(LOCAL_SRC)/iicbus_if.c:
> $(FREEBSD_SRC)/sys/dev/iicbus/iicbus_if.m
> >           -e 's|#include "iicbus_if.h"|#include
> <rtems/bsd/local/iicbus_if.h>|'
> >       mv iicbus_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_INC)/fb_if.h: $(FREEBSD_SRC)/sys/dev/fb/fb_if.m
> > +     awk -f $(TOOLS)/makeobjops.awk $< -h
> > +     mv fb_if.h $@
> > +
> > +$(LOCAL_SRC)/fb_if.c: $(FREEBSD_SRC)/sys/dev/fb/fb_if.m
> > +     awk -f $(TOOLS)/makeobjops.awk $< -c
> > +     sed -i fb_if.c \
> > +         -e '1 i\#include <machine/rtems-bsd-kernel-space.h>\n' \
> > +         -e 's|#include "fb_if.h"|#include <rtems/bsd/local/fb_if.h>|'
> > +     mv fb_if.c $@
> > +
> >  $(LOCAL_INC)/sdhci_if.h: $(FREEBSD_SRC)/sys/dev/sdhci/sdhci_if.m
> >       awk -f $(TOOLS)/makeobjops.awk $< -h
> >       mv sdhci_if.h $@
> > diff --git a/buildset/default.ini b/buildset/default.ini
> > index 4acb2368..b2ae6f32 100644
> > --- a/buildset/default.ini
> > +++ b/buildset/default.ini
> > @@ -37,6 +37,8 @@ dev_usb_storage = on
> >  dev_usb_wlan = off
> >  dev_wlan_rtwn = off
> >  iic = on
> > +tda = on
> > +fb_ti = on
> >  dhcpcd = on
> >  dpaa = on
> >  evdev = on
> > diff --git a/libbsd.py b/libbsd.py
> > index 12d4c2ed..fab7a05d 100644
> > --- a/libbsd.py
> > +++ b/libbsd.py
> > @@ -758,6 +758,7 @@ class iic(builder.Module):
> >                  'sys/dev/iicbus/iicbus.h',
> >                  'sys/dev/iicbus/iic.h',
> >                  'sys/dev/iicbus/iiconf.h',
> > +                'sys/arm/ti/ti_i2c.h',
> >              ]
> >          )
> >          self.addKernelSpaceSourceFiles(
> > @@ -766,6 +767,7 @@ class iic(builder.Module):
> >                  'sys/dev/iicbus/iicbus.c',
> >                  'sys/dev/iicbus/iiconf.c',
> >                  'sys/dev/iicbus/ofw_iicbus.c',
> > +                'sys/arm/ti/ti_i2c.c',
> >              ],
> >              mm.generator['source']()
> >          )
> > @@ -777,6 +779,102 @@ class iic(builder.Module):
> >              mm.generator['source']()
> >          )
> >
> > +#
> > +# TDA
> > +#
> > +class tda(builder.Module):
>
> Small problem: Naming. Your module does a lot more than just importing
> the TDA driver. You have EDID, Vesa and some other HDMI specific stuff.
> So maybe `display` or `monitor` would be a better description.
>
> OK. Will change that.

> > +
> > +    def __init__(self, manager):
> > +        super(tda, 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',
> > +                'sys/dev/videomode/pickmode.c',
> > +                'sys/dev/videomode/edid.c',
> > +                'sys/dev/videomode/vesagtf.c',
> > +                'sys/dev/videomode/videomode.c',
> > +            ],
> > +            mm.generator['source']()
> > +        )
> > +        self.addRTEMSSourceFiles(
> > +            [
> > +                'local/clknode_if.c',
> > +                'local/hdmi_if.c',
> > +            ],
> > +            mm.generator['source']()
> > +        )
> > +
> > +#
> > +# FB_TI
> > +#
> > +class fb_ti(builder.Module):
>
> Do you see an application where you can use this driver independent of
> the TDA module? Otherwise I would suggest merging them into one.
>
> OK. will merge them into one.

> Note that most of the time adding drivers isn't problematic. They are
> linked in only if the application requests them (or if they are
> referenced via nexus-devices.h). So no problem with a bigger group here.
>
> OK.

> > +
> > +    def __init__(self, manager):
> > +        super(fb_ti, self).__init__(manager, type(self).__name__)
> > +
> > +    def generate(self):
> > +        mm = self.manager
> > +        self.addKernelSpaceHeaderFiles(
> > +            [
> > +                'sys/sys/fbio.h',
> > +                'sys/sys/power.h',
> > +                'sys/sys/_eventhandler.h',
> > +                'sys/sys/consio.h',
> > +                'sys/sys/terminal.h',
> > +                'sys/dev/fb/fbreg.h',
> > +                'sys/dev/syscons/syscons.h',
> > +                'sys/dev/vt/vt.h',
> > +                'sys/arm/ti/am335x/am335x_lcd.h',
> > +                'sys/arm/ti/am335x/am335x_pwm.h',
> > +                'sys/dev/vt/hw/fb/vt_fb.h',
> > +                'sys/arm/include/pmap.h',
> > +                'sys/arm/include/vm.h',
> > +                'sys/vm/vm.h',
> > +                'sys/vm/pmap.h',
> > +                'sys/dev/vt/colors/vt_termcolors.h',
> > +                'sys/teken/teken.h',
> > +                'sys/arm/include/bus.h',
> > +            ]
> > +        )
> > +        self.addKernelSpaceSourceFiles(
> > +            [
> > +                'sys/dev/fb/fb.c',
> > +                'sys/arm/ti/am335x/am335x_lcd.c',
> > +                'sys/arm/ti/am335x/am335x_lcd_syscons.c',
> > +                'sys/arm/ti/am335x/am335x_pwmss.c',
> > +                'sys/arm/ti/am335x/am335x_ecap.c',
> > +                'sys/dev/fb/fbd.c',
> > +                'sys/dev/vt/hw/fb/vt_fb.c',
> > +                'sys/dev/vt/hw/fb/vt_early_fb.c',
> > +            ],
> > +            mm.generator['source']()
> > +        )
> > +        self.addRTEMSSourceFiles(
> > +            [
> > +                'local/fb_if.c',
> > +            ],
> > +            mm.generator['source']()
> > +        )
> > +
> >  #
> >  # USB
> >  #
> > @@ -5134,6 +5232,8 @@ def load(mm):
> >      mm.addModule(dev_input(mm))
> >      mm.addModule(evdev(mm))
> >      mm.addModule(iic(mm))
> > +    mm.addModule(tda(mm))
> > +    mm.addModule(fb_ti(mm))
> >
> >      mm.addModule(dev_usb(mm))
> >      mm.addModule(dev_usb_controller(mm))
> > diff --git a/rtemsbsd/include/bsp/nexus-devices.h
> b/rtemsbsd/include/bsp/nexus-devices.h
> > index 97f6d2b2..27f42f38 100644
> > --- a/rtemsbsd/include/bsp/nexus-devices.h
> > +++ b/rtemsbsd/include/bsp/nexus-devices.h
> > @@ -61,10 +61,17 @@ SYSINIT_DRIVER_REFERENCE(sdhci_ti, simplebus);
> >  SYSINIT_DRIVER_REFERENCE(mmcsd, mmc);
> >  SYSINIT_DRIVER_REFERENCE(cpsw, cpswss);
> >  SYSINIT_DRIVER_REFERENCE(ukphy, miibus);
> > -SYSINIT_DRIVER_REFERENCE(rtems_i2c, simplebus);
> > -SYSINIT_DRIVER_REFERENCE(ofw_iicbus, rtems_i2c);
> > +SYSINIT_DRIVER_REFERENCE(am335x_lcd, simplebus);
> > +SYSINIT_DRIVER_REFERENCE(am335x_pwmss, simplebus);
>
> Where is the PWM module used? To generate some clock?
>
> The am335x_lcd driver seems to be using it.

> > +SYSINIT_DRIVER_REFERENCE(ti_iic, simplebus);
> > +SYSINIT_DRIVER_REFERENCE(iicbus, ti_iic);
> > +SYSINIT_DRIVER_REFERENCE(ofw_iicbus, ti_iic);
> > +//SYSINIT_DRIVER_REFERENCE(rtems_i2c, simplebus);
> > +//SYSINIT_DRIVER_REFERENCE(ofw_iicbus, rtems_i2c);
> > +//SYSINIT_DRIVER_REFERENCE(iicbus, rtems_i2c);
> > +SYSINIT_DRIVER_REFERENCE(fbd, am335x_lcd);
> > +SYSINIT_DRIVER_REFERENCE(tda, iicbus);
> >  SYSINIT_DRIVER_REFERENCE(iic, iicbus);
> > -SYSINIT_DRIVER_REFERENCE(iicbus, rtems_i2c);
> >  #ifdef RTEMS_BSD_MODULE_NET80211
> >  SYSINIT_DRIVER_REFERENCE(rtwn_usb, uhub);
> >  SYSINIT_MODULE_REFERENCE(wlan_ratectl_none);
> > diff --git a/rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h
> b/rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h
> > index 235c9886..45c9f31a 100644
> > --- a/rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h
> > +++ b/rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h
> > @@ -46,6 +46,10 @@
> >  #define      altq_remove _bsd_altq_remove
> >  #define      altq_remove_queue _bsd_altq_remove_queue
> >  #define      altqs_inactive_open _bsd_altqs_inactive_open
> > +#define      am335x_dummysw _bsd_am335x_dummysw
> > +#define      am335x_lcd_syscons_setup _bsd_am335x_lcd_syscons_setup
> > +#define      am335x_pwm_config_ecap _bsd_am335x_pwm_config_ecap
> > +#define      am335x_pwmss_driver _bsd_am335x_pwmss_driver
> >  #define      arp_announce_ifaddr _bsd_arp_announce_ifaddr
> >  #define      arp_ifinit _bsd_arp_ifinit
> >  #define      arprequest _bsd_arprequest
> > @@ -563,7 +567,53 @@
> >  #define      clean_unrhdrl _bsd_clean_unrhdrl
> >  #define      ClearCheckNewLink _bsd_ClearCheckNewLink
> >  #define      clear_unrhdr _bsd_clear_unrhdr
> > +#define      clk_disable _bsd_clk_disable
> > +#define      clkdom_create _bsd_clkdom_create
> > +#define      clkdom_dump _bsd_clkdom_dump
> > +#define      clkdom_finit _bsd_clkdom_finit
> > +#define      clkdom_get_by_dev _bsd_clkdom_get_by_dev
> > +#define      clkdom_set_ofw_mapper _bsd_clkdom_set_ofw_mapper
> > +#define      clkdom_unlock _bsd_clkdom_unlock
> > +#define      clkdom_xlock _bsd_clkdom_xlock
> > +#define      clk_enable _bsd_clk_enable
> > +#define      clk_get_by_id _bsd_clk_get_by_id
> > +#define      clk_get_by_name _bsd_clk_get_by_name
> > +#define      clk_get_by_ofw_index _bsd_clk_get_by_ofw_index
> > +#define      clk_get_by_ofw_index_prop _bsd_clk_get_by_ofw_index_prop
> > +#define      clk_get_by_ofw_name _bsd_clk_get_by_ofw_name
> > +#define      clk_get_freq _bsd_clk_get_freq
> > +#define      clk_get_name _bsd_clk_get_name
> > +#define      clk_get_parent _bsd_clk_get_parent
> >  #define      clk_intr_event _bsd_clk_intr_event
> > +#define      clknode_class _bsd_clknode_class
> > +#define      clknode_create _bsd_clknode_create
> > +#define      clknode_disable _bsd_clknode_disable
> > +#define      clknode_enable _bsd_clknode_enable
> > +#define      clknode_find_by_id _bsd_clknode_find_by_id
> > +#define      clknode_find_by_name _bsd_clknode_find_by_name
> > +#define      clknode_get_device _bsd_clknode_get_device
> > +#define      clknode_get_flags _bsd_clknode_get_flags
> > +#define      clknode_get_freq _bsd_clknode_get_freq
> > +#define      clknode_get_name _bsd_clknode_get_name
> > +#define      clknode_get_parent _bsd_clknode_get_parent
> > +#define      clknode_get_parent_idx _bsd_clknode_get_parent_idx
> > +#define      clknode_get_parent_names _bsd_clknode_get_parent_names
> > +#define      clknode_get_parents_num _bsd_clknode_get_parents_num
> > +#define      clknode_get_softc _bsd_clknode_get_softc
> > +#define      clknode_init_parent_idx _bsd_clknode_init_parent_idx
> > +#define      clknode_register _bsd_clknode_register
> > +#define      clknode_set_freq _bsd_clknode_set_freq
> > +#define      clknode_set_parent_by_idx _bsd_clknode_set_parent_by_idx
> > +#define      clknode_set_parent_by_name _bsd_clknode_set_parent_by_name
> > +#define      clknode_stop _bsd_clknode_stop
> > +#define      clk_parse_ofw_clk_name _bsd_clk_parse_ofw_clk_name
> > +#define      clk_parse_ofw_out_names _bsd_clk_parse_ofw_out_names
> > +#define      clk_release _bsd_clk_release
> > +#define      clk_set_assigned _bsd_clk_set_assigned
> > +#define      clk_set_freq _bsd_clk_set_freq
> > +#define      clk_set_parent_by_clk _bsd_clk_set_parent_by_clk
> > +#define      clk_stop _bsd_clk_stop
> > +#define      clk_test_freq _bsd_clk_test_freq
> >  #define      comp_algo_deflate _bsd_comp_algo_deflate
> >  #define      comp_algorithm_lookup _bsd_comp_algorithm_lookup
> >  #define      config_intrhook_disestablish
> _bsd_config_intrhook_disestablish
> > @@ -775,6 +825,9 @@
> >  #define      drbr_needs_enqueue_drv _bsd_drbr_needs_enqueue_drv
> >  #define      driver_module_handler _bsd_driver_module_handler
> >  #define      dwc_driver _bsd_dwc_driver
> > +#define      dwc_hdmi_get_edid _bsd_dwc_hdmi_get_edid
> > +#define      dwc_hdmi_init _bsd_dwc_hdmi_init
> > +#define      dwc_hdmi_set_videomode _bsd_dwc_hdmi_set_videomode
> >  #define      dwc_otg_attach _bsd_dwc_otg_attach
> >  #define      dwc_otg_detach _bsd_dwc_otg_detach
> >  #define      dwc_otg_driver _bsd_dwc_otg_driver
> > @@ -1087,6 +1140,13 @@
> >  #define      e1000_write_vfta_generic _bsd_e1000_write_vfta_generic
> >  #define      e1000_write_vfta_i350 _bsd_e1000_write_vfta_i350
> >  #define      e1000_write_xmdio_reg _bsd_e1000_write_xmdio_reg
> > +#define      edid_is_valid _bsd_edid_is_valid
> > +#define      edid_nproducts _bsd_edid_nproducts
> > +#define      edid_nvendors _bsd_edid_nvendors
> > +#define      edid_parse _bsd_edid_parse
> > +#define      edid_print _bsd_edid_print
> > +#define      edid_products _bsd_edid_products
> > +#define      edid_vendors _bsd_edid_vendors
> >  #define      ehci_detach _bsd_ehci_detach
> >  #define      ehci_get_port_speed_hostc _bsd_ehci_get_port_speed_hostc
> >  #define      ehci_get_port_speed_portsc _bsd_ehci_get_port_speed_portsc
> > @@ -1208,6 +1268,16 @@
> >  #define      eventhandler_find_list _bsd_eventhandler_find_list
> >  #define      eventhandler_prune_list _bsd_eventhandler_prune_list
> >  #define      eventhandler_register _bsd_eventhandler_register
> > +#define      fb_commonioctl _bsd_fb_commonioctl
> > +#define      fbd_devclass _bsd_fbd_devclass
> > +#define      fbd_driver _bsd_fbd_driver
> > +#define      fbd_list _bsd_fbd_list
> > +#define      fbd_register _bsd_fbd_register
> > +#define      fb_dump_adp_info _bsd_fb_dump_adp_info
> > +#define      fb_dump_mode_info _bsd_fb_dump_mode_info
> > +#define      fbd_unregister _bsd_fbd_unregister
> > +#define      fb_list_head _bsd_fb_list_head
> > +#define      fb_type _bsd_fb_type
> >  #define      fdt_addrsize_cells _bsd_fdt_addrsize_cells
> >  #define      fdt_data_get _bsd_fdt_data_get
> >  #define      fdt_data_to_res _bsd_fdt_data_to_res
> > @@ -2732,6 +2802,7 @@
> >  #define      m_checkalignment _bsd_m_checkalignment
> >  #define      m_clget _bsd_m_clget
> >  #define      m_cljget _bsd_m_cljget
> > +#define      M_CLOCK _bsd_M_CLOCK
> >  #define      m_collapse _bsd_m_collapse
> >  #define      m_copyback _bsd_m_copyback
> >  #define      m_copydata _bsd_m_copydata
> > @@ -3442,6 +3513,8 @@
> >  #define      pgsigio _bsd_pgsigio
> >  #define      phashinit _bsd_phashinit
> >  #define      phashinit_flags _bsd_phashinit_flags
> > +#define      pick_mode_by_dotclock _bsd_pick_mode_by_dotclock
> > +#define      pick_mode_by_ref _bsd_pick_mode_by_ref
> >  #define      pipe_dtor _bsd_pipe_dtor
> >  #define      pipe_named_ctor _bsd_pipe_named_ctor
> >  #define      pipeselwakeup _bsd_pipeselwakeup
> > @@ -4614,6 +4687,7 @@
> >  #define      soreceive_generic _bsd_soreceive_generic
> >  #define      soreserve _bsd_soreserve
> >  #define      sorflush _bsd_sorflush
> > +#define      sort_modes _bsd_sort_modes
> >  #define      sosend _bsd_sosend
> >  #define      sosend_dgram _bsd_sosend_dgram
> >  #define      sosend_generic _bsd_sosend_generic
> > @@ -4722,6 +4796,7 @@
> >  #define      sysctl_handle_uma_zone_max _bsd_sysctl_handle_uma_zone_max
> >  #define      sysctl___hw _bsd_sysctl___hw
> >  #define      sysctl___hw_bus _bsd_sysctl___hw_bus
> > +#define      sysctl___hw_clock _bsd_sysctl___hw_clock
> >  #define      sysctl___hw_fdt _bsd_sysctl___hw_fdt
> >  #define      sysctl___hw_pci _bsd_sysctl___hw_pci
> >  #define      sysctl___hw_sdhci _bsd_sysctl___hw_sdhci
> > @@ -5450,6 +5525,20 @@
> >  #define      uuid_ether_add _bsd_uuid_ether_add
> >  #define      uuid_ether_del _bsd_uuid_ether_del
> >  #define      vht80_chan_ranges _bsd_vht80_chan_ranges
> > +#define      vesagtf_mode _bsd_vesagtf_mode
> > +#define      vesagtf_mode_params _bsd_vesagtf_mode_params
> > +#define      vid_allocate _bsd_vid_allocate
> > +#define      vid_configure _bsd_vid_configure
> > +#define      videomode_count _bsd_videomode_count
> > +#define      videomode_list _bsd_videomode_list
> > +#define      vid_find_adapter _bsd_vid_find_adapter
> > +#define      vid_get_adapter _bsd_vid_get_adapter
> > +#define      vid_get_switch _bsd_vid_get_switch
> > +#define      vid_init_struct _bsd_vid_init_struct
> > +#define      vid_register _bsd_vid_register
> > +#define      vid_release _bsd_vid_release
> > +#define      vidsw _bsd_vidsw
> > +#define      vid_unregister _bsd_vid_unregister
> >  #define      vlan_cookie_p _bsd_vlan_cookie_p
> >  #define      vlan_devat_p _bsd_vlan_devat_p
> >  #define      vlan_input_p _bsd_vlan_input_p
> > diff --git a/rtemsbsd/include/rtems/bsd/local/clknode_if.h
> b/rtemsbsd/include/rtems/bsd/local/clknode_if.h
> > new file mode 100644
> > index 00000000..97f4c956
> > --- /dev/null
> > +++ b/rtemsbsd/include/rtems/bsd/local/clknode_if.h
> > @@ -0,0 +1,92 @@
> > +/*
> > + * This file is @generated automatically.
> > + * Do not modify anything in here by hand.
> > + *
> > + * Created from source file
> > + *   freebsd-org/sys/dev/extres/clk/clknode_if.m
> > + * with
> > + *   makeobjops.awk
> > + *
> > + * See the source file for legal information
> > + */
> > +
> > +
> > +#ifndef _clknode_if_h_
> > +#define _clknode_if_h_
> > +
> > +
> > +struct clknode;
> > +
> > +/** @brief Unique descriptor for the CLKNODE_INIT() method */
> > +extern struct kobjop_desc clknode_init_desc;
> > +/** @brief A function implementing the CLKNODE_INIT() method */
> > +typedef int clknode_init_t(struct clknode *clk, device_t dev);
> > +
> > +static __inline int CLKNODE_INIT(struct clknode *clk, device_t dev)
> > +{
> > +     kobjop_t _m;
> > +     int rc;
> > +     KOBJOPLOOKUP(((kobj_t)clk)->ops,clknode_init);
> > +     rc = ((clknode_init_t *) _m)(clk, dev);
> > +     return (rc);
> > +}
> > +
> > +/** @brief Unique descriptor for the CLKNODE_RECALC_FREQ() method */
> > +extern struct kobjop_desc clknode_recalc_freq_desc;
> > +/** @brief A function implementing the CLKNODE_RECALC_FREQ() method */
> > +typedef int clknode_recalc_freq_t(struct clknode *clk, uint64_t *freq);
> > +
> > +static __inline int CLKNODE_RECALC_FREQ(struct clknode *clk, uint64_t
> *freq)
> > +{
> > +     kobjop_t _m;
> > +     int rc;
> > +     KOBJOPLOOKUP(((kobj_t)clk)->ops,clknode_recalc_freq);
> > +     rc = ((clknode_recalc_freq_t *) _m)(clk, freq);
> > +     return (rc);
> > +}
> > +
> > +/** @brief Unique descriptor for the CLKNODE_SET_FREQ() method */
> > +extern struct kobjop_desc clknode_set_freq_desc;
> > +/** @brief A function implementing the CLKNODE_SET_FREQ() method */
> > +typedef int clknode_set_freq_t(struct clknode *clk, uint64_t fin,
> > +                               uint64_t *fout, int flags, int *done);
> > +
> > +static __inline int CLKNODE_SET_FREQ(struct clknode *clk, uint64_t fin,
> > +                                     uint64_t *fout, int flags, int
> *done)
> > +{
> > +     kobjop_t _m;
> > +     int rc;
> > +     KOBJOPLOOKUP(((kobj_t)clk)->ops,clknode_set_freq);
> > +     rc = ((clknode_set_freq_t *) _m)(clk, fin, fout, flags, done);
> > +     return (rc);
> > +}
> > +
> > +/** @brief Unique descriptor for the CLKNODE_SET_GATE() method */
> > +extern struct kobjop_desc clknode_set_gate_desc;
> > +/** @brief A function implementing the CLKNODE_SET_GATE() method */
> > +typedef int clknode_set_gate_t(struct clknode *clk, bool enable);
> > +
> > +static __inline int CLKNODE_SET_GATE(struct clknode *clk, bool enable)
> > +{
> > +     kobjop_t _m;
> > +     int rc;
> > +     KOBJOPLOOKUP(((kobj_t)clk)->ops,clknode_set_gate);
> > +     rc = ((clknode_set_gate_t *) _m)(clk, enable);
> > +     return (rc);
> > +}
> > +
> > +/** @brief Unique descriptor for the CLKNODE_SET_MUX() method */
> > +extern struct kobjop_desc clknode_set_mux_desc;
> > +/** @brief A function implementing the CLKNODE_SET_MUX() method */
> > +typedef int clknode_set_mux_t(struct clknode *clk, int idx);
> > +
> > +static __inline int CLKNODE_SET_MUX(struct clknode *clk, int idx)
> > +{
> > +     kobjop_t _m;
> > +     int rc;
> > +     KOBJOPLOOKUP(((kobj_t)clk)->ops,clknode_set_mux);
> > +     rc = ((clknode_set_mux_t *) _m)(clk, idx);
> > +     return (rc);
> > +}
> > +
> > +#endif /* _clknode_if_h_ */
> > diff --git a/rtemsbsd/include/rtems/bsd/local/fb_if.h
> b/rtemsbsd/include/rtems/bsd/local/fb_if.h
> > new file mode 100644
> > index 00000000..7b97028f
> > --- /dev/null
> > +++ b/rtemsbsd/include/rtems/bsd/local/fb_if.h
> > @@ -0,0 +1,45 @@
> > +/*
> > + * This file is @generated automatically.
> > + * Do not modify anything in here by hand.
> > + *
> > + * Created from source file
> > + *   freebsd-org/sys/dev/fb/fb_if.m
> > + * with
> > + *   makeobjops.awk
> > + *
> > + * See the source file for legal information
> > + */
> > +
> > +
> > +#ifndef _fb_if_h_
> > +#define _fb_if_h_
> > +
> > +/** @brief Unique descriptor for the FB_PIN_MAX() method */
> > +extern struct kobjop_desc fb_pin_max_desc;
> > +/** @brief A function implementing the FB_PIN_MAX() method */
> > +typedef int fb_pin_max_t(device_t dev, int *npins);
> > +
> > +static __inline int FB_PIN_MAX(device_t dev, int *npins)
> > +{
> > +     kobjop_t _m;
> > +     int rc;
> > +     KOBJOPLOOKUP(((kobj_t)dev)->ops,fb_pin_max);
> > +     rc = ((fb_pin_max_t *) _m)(dev, npins);
> > +     return (rc);
> > +}
> > +
> > +/** @brief Unique descriptor for the FB_GETINFO() method */
> > +extern struct kobjop_desc fb_getinfo_desc;
> > +/** @brief A function implementing the FB_GETINFO() method */
> > +typedef struct fb_info * fb_getinfo_t(device_t dev);
> > +
> > +static __inline struct fb_info * FB_GETINFO(device_t dev)
> > +{
> > +     kobjop_t _m;
> > +     struct fb_info * rc;
> > +     KOBJOPLOOKUP(((kobj_t)dev)->ops,fb_getinfo);
> > +     rc = ((fb_getinfo_t *) _m)(dev);
> > +     return (rc);
> > +}
> > +
> > +#endif /* _fb_if_h_ */
> > diff --git a/rtemsbsd/include/rtems/bsd/local/hdmi_if.h
> b/rtemsbsd/include/rtems/bsd/local/hdmi_if.h
> > new file mode 100644
> > index 00000000..fc23c801
> > --- /dev/null
> > +++ b/rtemsbsd/include/rtems/bsd/local/hdmi_if.h
> > @@ -0,0 +1,71 @@
> > +/*
> > + * This file is @generated automatically.
> > + * Do not modify anything in here by hand.
> > + *
> > + * Created from source file
> > + *   freebsd-org/sys/dev/hdmi/hdmi_if.m
> > + * with
> > + *   makeobjops.awk
> > + *
> > + * See the source file for legal information
> > + */
> > +
> > +
> > +#ifndef _hdmi_if_h_
> > +#define _hdmi_if_h_
> > +
> > +
> > +#include <sys/eventhandler.h>
> > +
> > +typedef void (*hdmi_event_hook)(void *, device_t, int);
> > +EVENTHANDLER_DECLARE(hdmi_event, hdmi_event_hook);
> > +
> > +#define HDMI_EVENT_CONNECTED 0
> > +
> > +/** @brief Unique descriptor for the HDMI_GET_EDID() method */
> > +extern struct kobjop_desc hdmi_get_edid_desc;
> > +/** @brief A function implementing the HDMI_GET_EDID() method */
> > +typedef int hdmi_get_edid_t(device_t dev, uint8_t **edid,
> > +                            uint32_t *edid_length);
> > +
> > +static __inline int HDMI_GET_EDID(device_t dev, uint8_t **edid,
> > +                                  uint32_t *edid_length)
> > +{
> > +     kobjop_t _m;
> > +     int rc;
> > +     KOBJOPLOOKUP(((kobj_t)dev)->ops,hdmi_get_edid);
> > +     rc = ((hdmi_get_edid_t *) _m)(dev, edid, edid_length);
> > +     return (rc);
> > +}
> > +
> > +/** @brief Unique descriptor for the HDMI_SET_VIDEOMODE() method */
> > +extern struct kobjop_desc hdmi_set_videomode_desc;
> > +/** @brief A function implementing the HDMI_SET_VIDEOMODE() method */
> > +typedef int hdmi_set_videomode_t(device_t dev,
> > +                                 const struct videomode *videomode);
> > +
> > +static __inline int HDMI_SET_VIDEOMODE(device_t dev,
> > +                                       const struct videomode
> *videomode)
> > +{
> > +     kobjop_t _m;
> > +     int rc;
> > +     KOBJOPLOOKUP(((kobj_t)dev)->ops,hdmi_set_videomode);
> > +     rc = ((hdmi_set_videomode_t *) _m)(dev, videomode);
> > +     return (rc);
> > +}
> > +
> > +/** @brief Unique descriptor for the HDMI_ENABLE() method */
> > +extern struct kobjop_desc hdmi_enable_desc;
> > +/** @brief A function implementing the HDMI_ENABLE() method */
> > +typedef int hdmi_enable_t(device_t dev, int onoff);
> > +
> > +static __inline int HDMI_ENABLE(device_t dev, int onoff)
> > +{
> > +     kobjop_t _m;
> > +     int rc;
> > +     KOBJOPLOOKUP(((kobj_t)dev)->ops,hdmi_enable);
> > +     rc = ((hdmi_enable_t *) _m)(dev, onoff);
> > +     return (rc);
> > +}
> > +
> > +#endif /* _hdmi_if_h_ */
> > diff --git a/rtemsbsd/local/clknode_if.c b/rtemsbsd/local/clknode_if.c
> > new file mode 100644
> > index 00000000..6f1c0ba3
> > --- /dev/null
> > +++ b/rtemsbsd/local/clknode_if.c
> > @@ -0,0 +1,40 @@
> > +#include <machine/rtems-bsd-kernel-space.h>
> > +
> > +/*
> > + * This file is @generated automatically.
> > + * Do not modify anything in here by hand.
> > + *
> > + * Created from source file
> > + *   freebsd-org/sys/dev/extres/clk/clknode_if.m
> > + * with
> > + *   makeobjops.awk
> > + *
> > + * See the source file for legal information
> > + */
> > +
> > +#include <sys/param.h>
> > +#include <sys/queue.h>
> > +#include <sys/kernel.h>
> > +#include <sys/kobj.h>
> > +#include <rtems/bsd/local/clknode_if.h>
> > +
> > +struct kobjop_desc clknode_init_desc = {
> > +     0, { &clknode_init_desc, (kobjop_t)kobj_error_method }
> > +};
> > +
> > +struct kobjop_desc clknode_recalc_freq_desc = {
> > +     0, { &clknode_recalc_freq_desc, (kobjop_t)kobj_error_method }
> > +};
> > +
> > +struct kobjop_desc clknode_set_freq_desc = {
> > +     0, { &clknode_set_freq_desc, (kobjop_t)kobj_error_method }
> > +};
> > +
> > +struct kobjop_desc clknode_set_gate_desc = {
> > +     0, { &clknode_set_gate_desc, (kobjop_t)kobj_error_method }
> > +};
> > +
> > +struct kobjop_desc clknode_set_mux_desc = {
> > +     0, { &clknode_set_mux_desc, (kobjop_t)kobj_error_method }
> > +};
> > +
> > diff --git a/rtemsbsd/local/fb_if.c b/rtemsbsd/local/fb_if.c
> > new file mode 100644
> > index 00000000..ceb57e4b
> > --- /dev/null
> > +++ b/rtemsbsd/local/fb_if.c
> > @@ -0,0 +1,30 @@
> > +#include <machine/rtems-bsd-kernel-space.h>
> > +
> > +/*
> > + * This file is @generated automatically.
> > + * Do not modify anything in here by hand.
> > + *
> > + * Created from source file
> > + *   freebsd-org/sys/dev/fb/fb_if.m
> > + * with
> > + *   makeobjops.awk
> > + *
> > + * See the source file for legal information
> > + */
> > +
> > +#include <sys/param.h>
> > +#include <sys/queue.h>
> > +#include <sys/kernel.h>
> > +#include <sys/kobj.h>
> > +#include <sys/bus.h>
> > +#include <sys/fbio.h>
> > +#include <rtems/bsd/local/fb_if.h>
> > +
> > +struct kobjop_desc fb_pin_max_desc = {
> > +     0, { &fb_pin_max_desc, (kobjop_t)kobj_error_method }
> > +};
> > +
> > +struct kobjop_desc fb_getinfo_desc = {
> > +     0, { &fb_getinfo_desc, (kobjop_t)kobj_error_method }
> > +};
> > +
> > diff --git a/rtemsbsd/local/hdmi_if.c b/rtemsbsd/local/hdmi_if.c
> > new file mode 100644
> > index 00000000..847f7d4d
> > --- /dev/null
> > +++ b/rtemsbsd/local/hdmi_if.c
> > @@ -0,0 +1,35 @@
> > +#include <machine/rtems-bsd-kernel-space.h>
> > +
> > +/*
> > + * This file is @generated automatically.
> > + * Do not modify anything in here by hand.
> > + *
> > + * Created from source file
> > + *   freebsd-org/sys/dev/hdmi/hdmi_if.m
> > + * with
> > + *   makeobjops.awk
> > + *
> > + * See the source file for legal information
> > + */
> > +
> > +#include <sys/param.h>
> > +#include <sys/queue.h>
> > +#include <sys/kernel.h>
> > +#include <sys/kobj.h>
> > +#include <sys/bus.h>
> > +#include <dev/videomode/videomode.h>
> > +#include <dev/videomode/edidvar.h>
> > +#include <rtems/bsd/local/hdmi_if.h>
> > +
> > +struct kobjop_desc hdmi_get_edid_desc = {
> > +     0, { &hdmi_get_edid_desc, (kobjop_t)kobj_error_method }
> > +};
> > +
> > +struct kobjop_desc hdmi_set_videomode_desc = {
> > +     0, { &hdmi_set_videomode_desc, (kobjop_t)kobj_error_method }
> > +};
> > +
> > +struct kobjop_desc hdmi_enable_desc = {
> > +     0, { &hdmi_enable_desc, (kobjop_t)kobj_error_method }
> > +};
> > +
> > diff --git a/rtemsbsd/sys/dev/iicbus/rtems-i2c.c
> b/rtemsbsd/sys/dev/iicbus/rtems-i2c.c
> > index 61881e74..5dfd4ab8 100644
> > --- a/rtemsbsd/sys/dev/iicbus/rtems-i2c.c
> > +++ b/rtemsbsd/sys/dev/iicbus/rtems-i2c.c
> > @@ -211,5 +211,5 @@ static driver_t rtems_i2c_driver = {
> >
> >  static devclass_t rtems_i2c_devclass;
> >  DRIVER_MODULE(rtems_i2c, simplebus, rtems_i2c_driver,
> rtems_i2c_devclass, 0, 0);
> > -DRIVER_MODULE(iicbus, rtems_i2c, iicbus_driver, iicbus_devclass, 0, 0);
> > -DRIVER_MODULE(ofw_iicbus, rtems_i2c, ofw_iicbus_driver,
> ofw_iicbus_devclass, 0, 0);
> > +//DRIVER_MODULE(iicbus, rtems_i2c, iicbus_driver, iicbus_devclass, 0,
> 0);
> > +//DRIVER_MODULE(ofw_iicbus, rtems_i2c, ofw_iicbus_driver,
> ofw_iicbus_devclass, 0, 0);
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190620/628db0ef/attachment-0002.html>


More information about the devel mailing list