Hello Husni,

Am 27.07.21 um 22:37 schrieb Ahamed Husni:
Hello Christian,

On Wed, Jul 28, 2021 at 12:34 AM Christian Mauderer <o...@c-mauderer.de <mailto:o...@c-mauderer.de>> wrote:

    Hello Husni,

    On 27/07/2021 17:04, Ahamed Husni wrote:
     >
     >
     > On Fri, Jul 16, 2021 at 1:25 AM Christian Mauderer
    <o...@c-mauderer.de <mailto:o...@c-mauderer.de>
     > <mailto:o...@c-mauderer.de <mailto:o...@c-mauderer.de>>> wrote:
     >
     >     On 06/07/2021 19:00, Husni Faiz wrote:
     >      > Configure bus for CDC Ethernet
     >      > Include CDC Ethernet in Beagle BSP
     >      >
     >      > Signed-off-by: Husni Faiz <ahamedhusn...@gmail.com
    <mailto:ahamedhusn...@gmail.com>
     >     <mailto:ahamedhusn...@gmail.com
    <mailto:ahamedhusn...@gmail.com>>>
     >      > ---
     >      >   rtemsbsd/include/bsp/nexus-devices.h           |  5 +++++
     >      >   rtemsbsd/include/machine/rtems-bsd-nexus-bus.h | 17
     >     +++++++++++++++++
     >      >   2 files changed, 22 insertions(+)
     >      >
     >      > diff --git a/rtemsbsd/include/bsp/nexus-devices.h
     >     b/rtemsbsd/include/bsp/nexus-devices.h
     >      > index e6487470..6a35632e 100644
     >      > --- a/rtemsbsd/include/bsp/nexus-devices.h
     >      > +++ b/rtemsbsd/include/bsp/nexus-devices.h
     >      > @@ -83,6 +83,11 @@ SYSINIT_REFERENCE(rtwn_rtl8188eufw);
     >      >   RTEMS_BSD_DRIVER_USB;
     >      >   RTEMS_BSD_DRIVER_USB_MASS;
     >      >
     >      > +#ifdef RTEMS_BSD_MODULE_DEV_USB_TEMPLATE
     >      > +RTEMS_BSD_DRIVER_USB_TEMPLATE;
     >      > +RTEMS_BSD_DRIVER_CDCE;
     >      > +#endif
     >      > +
     >
     >     Same like in patch 2: Shouldn't there be an include for
     >     rtems/bsd/modules.h somewhere?
     >
     > I checked the nexus-devices.h and it already has the modules.h
    included.

    Sorry. Might have missed that that include in nexus-devices.h. But For
    patch 2 it is still necessary, isn't it?

I manually removed the  RTEMS_BSD_MODULE_DEV_USB_TEMPLATE
from the modules.h file and rebuilt the libbsd and looked for the symbols to
see if they are included. The symbols weren't there as expected.

So I thought that the rtems/bsd/modules.h is included in the usb_devices.c indirectly.
I couldn't track down where it came from. So I might be wrong.

Shall I include the rtems/bsd/modules.h the PATCH V2?

Possible that it is included indirectly somewhere. But I wouldn't say that this is reliable. If it is used in some other header and someone changes something there, modules.h might isn't necessary for that header any more. In that case it might is removed and that indirect include might suddenly doesn't work any more.

So yes: If you use the defines from modules.h, please include the modules.h directly.


     >
     >      >   #elif defined(LIBBSP_ARM_LPC32XX_BSP_H)
     >      >
     >      >   #include <bsp/irq.h>
     >      > diff --git a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
     >     b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
     >      > index 50a43873..84f561f5 100644
     >      > --- a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
     >      > +++ b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
     >      > @@ -282,6 +282,15 @@ extern "C" {
     >      >       SYSINIT_DRIVER_REFERENCE(umass, uhub)
     >      >   #endif /* RTEMS_BSD_DRIVER_USB_MASS */
     >      >
     >      > +/*
     >      > + * USB Template base driver.
     >      > + */
     >      > +#if !defined(RTEMS_BSD_DRIVER_USB_TEMPLATE)
     >      > +  #define RTEMS_BSD_DRIVER_USB_TEMPLATE           \
     >      > +    SYSINIT_REFERENCE(usb_temp_init);             \
     >      > +    SYSINIT_DRIVER_REFERENCE(usb_template, usb)
     >      > +#endif /* RTEMS_BSD_DRIVER_USB_TEMPLATE */
     >      > +
     >      >   /*
     >      >    * USB SAF1761 host controller driver.
     >      >    */
     >      > @@ -490,6 +499,14 @@ extern "C" {
     >      >       SYSINIT_DRIVER_REFERENCE(re, pci);
     >      >   #endif /* RTEMS_BSD_DRIVER_PCI_RE */
     >      >
     >      > +/*
     >      > + * CDC Ethernet Driver.
     >      > + */
     >      > +#if !defined(RTEMS_BSD_DRIVER_CDCE)
     >      > +  #define RTEMS_BSD_DRIVER_CDCE                   \
     >      > +    SYSINIT_DRIVER_REFERENCE(cdce, uhub);
     >      > +#endif /* RTEMS_BSD_DRIVER_FEC */
     >      > +
     >      >   /**
     >      >    ** MMI Physical Layer Support.
     >      >    **/
     >      >
     >


_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


--
--------------------------------------------
embedded brains GmbH
Herr Christian MAUDERER
Dornierstr. 4
82178 Puchheim
Germany
email: christian.maude...@embedded-brains.de
phone: +49-89-18 94 741 - 18
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to