[PATCH 06/10] fbd : Port to RTEMS
Christian Mauderer
list at c-mauderer.de
Sat Jul 27 13:17:34 UTC 2019
On 27/07/2019 15:15, Christian Mauderer wrote:
> On 26/07/2019 13:22, Vijay Kumar Banerjee wrote:
>> ---
>> freebsd/sys/dev/fb/fbd.c | 3 ++
>> libbsd.py | 4 +++
>> rtemsbsd/include/bsp/nexus-devices.h | 3 ++
>> .../machine/rtems-bsd-kernel-namespace.h | 35 +++++++++++++++++++
>> rtemsbsd/include/rtems/bsd/local/opt_fb.h | 0
>> 5 files changed, 45 insertions(+)
>> create mode 100644 rtemsbsd/include/rtems/bsd/local/opt_fb.h
>>
>> diff --git a/freebsd/sys/dev/fb/fbd.c b/freebsd/sys/dev/fb/fbd.c
>> index 60ce4bc3..33cdc348 100644
>> --- a/freebsd/sys/dev/fb/fbd.c
>> +++ b/freebsd/sys/dev/fb/fbd.c
>> @@ -59,6 +59,9 @@ __FBSDID("$FreeBSD$");
>> #include <vm/pmap.h>
>>
>> #include <rtems/bsd/local/fb_if.h>
>> +#ifdef __rtems__
>> +#define vtophys(a) (a)
>> +#endif /* __rtems__ */
>
> That seems to be already defined in rtemsbsd/include/machine/vm.h which
> should be included via <vm/vm.h>. Why is it necessary?
Just have noted it: You added that to machine/vm.h in your later patch.
So it should be removable here (if you merge the patches) or you should
move the definition in machine/vm.h to this patch (if you don't merge them).
>
>>
>> LIST_HEAD(fb_list_head_t, fb_list_entry) fb_list_head =
>> LIST_HEAD_INITIALIZER(fb_list_head);
>> diff --git a/libbsd.py b/libbsd.py
>> index 4808105b..71eb3577 100644
>> --- a/libbsd.py
>> +++ b/libbsd.py
>> @@ -807,6 +807,8 @@ class display(builder.Module):
>> 'sys/sys/fbio.h',
>> 'sys/sys/consio.h',
>> 'sys/sys/terminal.h',
>> + 'sys/dev/vt/hw/fb/vt_fb.h',
>> + 'sys/dev/vt/colors/vt_termcolors.h',
>> ]
>> )
>> self.addKernelSpaceSourceFiles(
>> @@ -821,6 +823,8 @@ class display(builder.Module):
>> 'sys/arm/ti/am335x/am335x_lcd.c',
>> 'sys/arm/ti/am335x/am335x_pwmss.c',
>> 'sys/arm/ti/am335x/am335x_ecap.c',
>> + 'sys/dev/fb/fb.c',
>> + 'sys/dev/fb/fbd.c',
>> ],
>> mm.generator['source']()
>> )
>> diff --git a/rtemsbsd/include/bsp/nexus-devices.h b/rtemsbsd/include/bsp/nexus-devices.h
>> index 2c718295..313c40d4 100644
>> --- a/rtemsbsd/include/bsp/nexus-devices.h
>> +++ b/rtemsbsd/include/bsp/nexus-devices.h
>> @@ -68,6 +68,9 @@ SYSINIT_DRIVER_REFERENCE(ofw_iicbus, rtems_i2c);
>> SYSINIT_DRIVER_REFERENCE(iic, iicbus);
>> SYSINIT_DRIVER_REFERENCE(tda, iicbus);
>> SYSINIT_DRIVER_REFERENCE(iicbus, rtems_i2c);
>> +SYSINIT_DRIVER_REFERENCE(fbd, fb);
>> +SYSINIT_DRIVER_REFERENCE(fb, fb_mod);
>> +SYSINIT_MODULE_REFERENCE(fb_mod);
>> #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 3951da79..d796d3d1 100644
>> --- a/rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h
>> +++ b/rtemsbsd/include/machine/rtems-bsd-kernel-namespace.h
>> @@ -1266,6 +1266,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
>> @@ -5515,8 +5525,18 @@
>> #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
>> @@ -5533,6 +5553,21 @@
>> #define vsnprintf _bsd_vsnprintf
>> #define vsnrprintf _bsd_vsnrprintf
>> #define vsprintf _bsd_vsprintf
>> +#define vt_fb_attach _bsd_vt_fb_attach
>> +#define vt_fb_bitblt_bitmap _bsd_vt_fb_bitblt_bitmap
>> +#define vt_fb_bitblt_text _bsd_vt_fb_bitblt_text
>> +#define vt_fb_blank _bsd_vt_fb_blank
>> +#define vt_fb_detach _bsd_vt_fb_detach
>> +#define vt_fb_drawrect _bsd_vt_fb_drawrect
>> +#define vt_fb_fini _bsd_vt_fb_fini
>> +#define vt_fb_init _bsd_vt_fb_init
>> +#define vt_fb_invalidate_text _bsd_vt_fb_invalidate_text
>> +#define vt_fb_ioctl _bsd_vt_fb_ioctl
>> +#define vt_fb_mmap _bsd_vt_fb_mmap
>> +#define vt_fb_postswitch _bsd_vt_fb_postswitch
>> +#define vt_fb_resume _bsd_vt_fb_resume
>> +#define vt_fb_setpixel _bsd_vt_fb_setpixel
>> +#define vt_fb_suspend _bsd_vt_fb_suspend
>> #define wakeup _bsd_wakeup
>> #define wakeup_one _bsd_wakeup_one
>> #define window_deflate _bsd_window_deflate
>> diff --git a/rtemsbsd/include/rtems/bsd/local/opt_fb.h b/rtemsbsd/include/rtems/bsd/local/opt_fb.h
>> new file mode 100644
>> index 00000000..e69de29b
>>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
More information about the devel
mailing list