Dear Deval Shah, I found email thread(name: GSoC 2015 RPi USB Support) which is related with my problem. https://lists.rtems.org/pipermail/devel/2015-August/012218.html
Because rtems and libbsd version is not matched with last year version, some description is not matched. but, this email thread's problem is same with my case. On referencing, I attached my modified code. At this time, even though I changed according to GSoC 2015 RPi USB Support, my problem is not resolved. Current my idea is that I should modify linkscript for resolving this as like below example. .rtemsroset : ALIGN_WITH_INPUT { /* Special FreeBSD linker set sections */ __start_set_sysctl_set = .; *(set_sysctl_*); __stop_set_sysctl_set = .; *(set_domain_*); *(set_pseudo_*); #if 1 // Thomas added __start_set_nexus = .; /* some description should be added in here */ __stop_set_nexus = .; #endif ... But, I don't know that which description should be addded between __start_set_nexus and __stop_set_nexus. Is this right method ? Please advise me. Best Regards. Thomas Kim 2016-08-11 19:01 GMT+09:00 Thomas Kim <thomas73....@gmail.com>: > Dear Deval, > > No problem. > > If I find addtional something, I will let you know. > > Best Regards, > Thomas Kim > > 2016-08-11 18:57 GMT+09:00 Deval Shah <deval.ma...@gmail.com>: > >> Hello Thomas Kim, >> >> I am actually going out of station for a week. I will look when I get >> some time. >> >> Sorry for not being able to help immediately. >> >> Deval Shah >> >> On Thursday 11 August 2016, Thomas Kim <thomas73....@gmail.com> wrote: >> >>> Dear Deval Shah, >>> >>> I found reason about "why dwcotg probe & attach function is not called". >>> >>> Even though DRIVER_MODULE is declared in below, _bsd__start_set_nexus & >>> _bsd__stop_set_nexus is not initialized. >>> >>> DRIVER_MODULE(bcm283x_dwcotg, nexus, bcm283x_dwc_otg_driver, >>> bcm283x_dwc_otg_devclass, 0, 0); >>> >>> I checked symbol information by arm-rtems4.12-nm command. >>> >>> 00225fac D _bsd__start_set_nexus >>> 00225fac D _bsd__start_set_sysctl_set >>> 0022ca10 D _bsd__start_set_sysinit_set >>> 0022974c D _bsd_start_softclock_sys_init >>> 00225fac D _bsd__stop_set_modmetadata_set >>> 00225fac D _bsd__stop_set_nexus >>> 002260a4 D _bsd__stop_set_sysctl_set >>> 0022cb04 D _bsd__stop_set_sysinit_set >>> >>> But, I was failed for finding location for initializing >>> _bsd__start_set_nexus and _bsd__stop_set_nexus. >>> >>> Please advise me. >>> >>> Best Regards, >>> Thomas Kim. >>> >>> 2016-08-11 11:40 GMT+09:00 Thomas Kim <thomas73....@gmail.com>: >>> >>>> Dear Deval Shah, >>>> >>>> I found something. >>>> >>>> At this time, I am analyzing libbsd subsystem call procedure. >>>> I added additional information on verbose log file for referencing >>>> kernel.h (in rtems-libbsd/freebsd/sys/sys) and symbol file which is >>>> generated by arm-rtems4.12-nm. >>>> I attached this log file(libbsd-verbose-log.txt). >>>> >>>> As you see in this log file, my surmmary is below; >>>> >>>> 1) subsystem 310000 is SI_SUB_DRIVERS. also, I checked that >>>> dwcotg_nexus_mod, usbus_ehci_mod, umass_uhub_mod, uhub_uhub_mod, >>>> uhub_usbus_mod are registered by _bsd_module_register_init(). >>>> - I think that it is okay. >>>> >>>> 2) subsystem 3800000 is SI_SUB_CONFIGURE. I checked nexus_probe() in >>>> rtems-kernel-nexus.c is called in this phase. >>>> but, device_add_child() is not called in below step of nexus_probe(). >>>> >>>> SET_FOREACH(nd, nexus) { >>>> device_add_child(dev, nd->name, nd->unit); >>>> } >>>> >>>> Finally, I am guessing that device_add_child() for DWCOTG should be >>>> called. >>>> At this time, I don't know why device_add_child() for DWCOTG controller >>>> is not called. >>>> >>>> Please advise me. >>>> >>>> Best Regards, >>>> Thomas Kim >>>> >>>> >>>> 2016-08-11 8:51 GMT+09:00 Thomas Kim <thomas73....@gmail.com>: >>>> >>>>> Dear Deval Shah, >>>>> >>>>> I checked my rasberry board. my board is rasberry Pi B+. (It is not >>>>> RPI2 B+) >>>>> I am sorry. I returned to rtems, libbsd version for Pi B+. >>>>> >>>>> Anyway, I guess that both bcm283x_dwc_otg_probe() and >>>>> bcm283x_dwc_otg_attach() function should be called. >>>>> I don't know how to call bcm283x_dwc_otg_probe() and >>>>> bcm283x_dwc_otg_attach(). >>>>> >>>>> Please advsie me. >>>>> >>>>> Best Regards, >>>>> Thomas Kim. >>>>> >>>>> 2016-08-10 22:06 GMT+09:00 Deval Shah <deval.ma...@gmail.com>: >>>>> >>>>>> I saw the files which you have attached. I found one quick mistake. >>>>>> >>>>>> In your nexus-devices.h file "RTEMS_BSD_DRIVER_BCM283X_DWCOTG(0x20980000, >>>>>> 17);", base and irq used are wrong. I had corrected the irq in my >>>>>> other commit. They will be 0x3F980000 (since you are using Raspberry pi >>>>>> 2) >>>>>> and 9. >>>>>> >>>>>> It would be easier to use the macros. i.e. >>>>>> RTEMS_BSD_DRIVER_BCM283X_DWCOTG(BCM2835_USB_BASE, BCM2835_IRQ_ID_USB >>>>>> ); >>>>>> >>>>>> >>>>>> ᐧ >>>>>> >>>>>> On Wed, Aug 10, 2016 at 1:11 PM, Thomas Kim <thomas73....@gmail.com> >>>>>> wrote: >>>>>> >>>>>>> Dear Deval Shah, >>>>>>> >>>>>>> Thank you very much for your reply. >>>>>>> I checked this again. >>>>>>> Because there is not your code in currrent git system, I patched >>>>>>> your code in current libbsd code. >>>>>>> As I know in current libbsd source tree, your nexus_devices.h should >>>>>>> be sperated into rtems-bsd-nexus-bus.h. I attached this. >>>>>>> >>>>>>> First of all, I completed to test RTEMS testsuites/sample/ticker.exe >>>>>>> on RPI2 B+ board. >>>>>>> I am tring to test rtems-libbsd/rtemsbsd/testsuite/usb01. >>>>>>> also, I try to test two cases in usb01/init.c >>>>>>> case 1 does not include NEED_USB_EHCI. case 2 include NEED_USB_EHCI. >>>>>>> >>>>>>> #if defined(LIBBSP_ARM_LPC24XX_BSP_H) || >>>>>>> defined(LIBBSP_ARM_LPC32XX_BSP_H) >>>>>>> #define NEED_USB_OHCI >>>>>>> (CASE1) #elif defined(__GEN83xx_BSP_h) || >>>>>>> defined(LIBBSP_POWERPC_QORIQ_BSP_H) >>>>>>> (CASE2) #elif defined(__GEN83xx_BSP_h) || >>>>>>> defined(LIBBSP_ARM_RASPBERRYPI_BSP_H) >>>>>>> #define NEED_USB_EHCI >>>>>>> #endif >>>>>>> SYSINIT_NEED_USB_CORE; >>>>>>> #ifdef NEED_USB_OHCI >>>>>>> SYSINIT_NEED_USB_OHCI; >>>>>>> #endif >>>>>>> #ifdef NEED_USB_EHCI >>>>>>> SYSINIT_NEED_USB_EHCI; >>>>>>> #endif >>>>>>> >>>>>>> also, I added "#define VERBOSE_SYSINIT 1" in init_main.c for >>>>>>> checking SYS_INIT functional call. >>>>>>> >>>>>>> At this time, usb_quirk_init() only is called when I test two cases. >>>>>>> I attached serial log file, too. >>>>>>> >>>>>>> Please let me know my missing point. >>>>>>> >>>>>>> Best Regards, >>>>>>> JunBeom >>>>>>> >>>>>>> 2016-08-10 5:31 GMT+09:00 Deval Shah <deval.ma...@gmail.com>: >>>>>>> >>>>>>>> Hello Thomas Kim, >>>>>>>> >>>>>>>> It is the same code which you downloaded will work for the >>>>>>>> raspberry pi. You can test the libbsd version of raspberry pi by >>>>>>>> configuring waf with the following arguments. >>>>>>>> >>>>>>>> waf configure --prefix=/opt/rtems/4.12/bsps \ >>>>>>>> --rtems=/opt/rtems/4.12/bsps \ >>>>>>>> --rtems-tools=/opt/rtems/4.12/tools \ >>>>>>>> --rtems-bsps=arm/raspberrypi >>>>>>>> >>>>>>>> You can find more at this link. https://git.rtems.org/rt >>>>>>>> ems-libbsd/tree/README.waf >>>>>>>> >>>>>>>> Deval Shah >>>>>>>> >>>>>>>> ᐧ >>>>>>>> >>>>>>>> On Tue, Aug 9, 2016 at 11:48 AM, Thomas Kim <thomas73....@gmail.com >>>>>>>> > wrote: >>>>>>>> >>>>>>>>> Dear Sir, >>>>>>>>> >>>>>>>>> I am sorry. >>>>>>>>> >>>>>>>>> I want to test this libbsd version for Rasberry Pi. >>>>>>>>> When I check "git://git.rtems.org/rtems-libbsd.git", there is not >>>>>>>>> any code for Rasberry pi. >>>>>>>>> >>>>>>>>> Please could you let me know git URL for downloading this libbsd >>>>>>>>> version ? >>>>>>>>> >>>>>>>>> Best Regards, >>>>>>>>> Thomas Kim >>>>>>>>> >>>>>>>>> 2016-08-09 14:52 GMT+09:00 Sebastian Huber < >>>>>>>>> sebastian.hu...@embedded-brains.de>: >>>>>>>>> >>>>>>>>>> From which FreeBSD version are these files? >>>>>>>>>> >>>>>>>>>> On 05/08/16 18:32, Deval Shah wrote: >>>>>>>>>> >>>>>>>>>>> --- >>>>>>>>>>> freebsd/sys/arm/broadcom/bcm2835/bcm283x_dwc_fdt.c | 127 >>>>>>>>>>> ++++++++++++ >>>>>>>>>>> freebsd/sys/dev/usb/controller/dwc_otg_fdt.c | 228 >>>>>>>>>>> +++++++++++++++++++++ >>>>>>>>>>> freebsd/sys/dev/usb/controller/dwc_otg_fdt.h | 39 ++++ >>>>>>>>>>> libbsd.py | 3 + >>>>>>>>>>> libbsd_waf.py | 4 +- >>>>>>>>>>> rtemsbsd/include/bsp/nexus-devices.h | 21 ++ >>>>>>>>>>> 6 files changed, 421 insertions(+), 1 deletion(-) >>>>>>>>>>> create mode 100644 freebsd/sys/arm/broadcom/bcm28 >>>>>>>>>>> 35/bcm283x_dwc_fdt.c >>>>>>>>>>> create mode 100644 freebsd/sys/dev/usb/controller >>>>>>>>>>> /dwc_otg_fdt.c >>>>>>>>>>> create mode 100644 freebsd/sys/dev/usb/controller >>>>>>>>>>> /dwc_otg_fdt.h >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Sebastian Huber, embedded brains GmbH >>>>>>>>>> >>>>>>>>>> Address : Dornierstr. 4, D-82178 Puchheim, Germany >>>>>>>>>> Phone : +49 89 189 47 41-16 >>>>>>>>>> Fax : +49 89 189 47 41-09 >>>>>>>>>> E-Mail : sebastian.hu...@embedded-brains.de >>>>>>>>>> PGP : Public key available on request. >>>>>>>>>> >>>>>>>>>> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des >>>>>>>>>> EHUG. >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> devel mailing list >>>>>>>>>> devel@rtems.org >>>>>>>>>> http://lists.rtems.org/mailman/listinfo/devel >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Deval Shah >>>>>>>> Graduate Student, >>>>>>>> B.E. (Hons.) Electrical and Electronics Engineering >>>>>>>> BITS Pilani Hyderabad Campus >>>>>>>> <http://www.bits-pilani.ac.in/hyderabad/> >>>>>>>> >>>>>>>> Github Profile <https://github.com/deval-maker> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Deval Shah >>>>>> Graduate Student, >>>>>> B.E. (Hons.) Electrical and Electronics Engineering >>>>>> BITS Pilani Hyderabad Campus >>>>>> <http://www.bits-pilani.ac.in/hyderabad/> >>>>>> >>>>>> Github Profile <https://github.com/deval-maker> >>>>>> >>>>> >>>>> >>>> >>> >> >> -- >> Deval Shah >> Graduate Student, >> B.E. (Hons.) Electrical and Electronics Engineering >> BITS Pilani Hyderabad Campus <http://www.bits-pilani.ac.in/hyderabad/> >> >> Github Profile <https://github.com/deval-maker> >> >> >
/** * @file * * @ingroup demo * * @brief USB system initialization. */ /* * Copyright (c) 2009-2012 embedded brains GmbH. All rights reserved. * * embedded brains GmbH * Obere Lagerstr. 30 * 82178 Puchheim * Germany * <rt...@embedded-brains.de> * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://www.rtems.com/license/LICENSE. */ #include <machine/rtems-bsd-sysinit.h> #include <bsp.h> #ifdef USB_SYSINIT_INIT #if defined(LIBBSP_ARM_LPC24XX_BSP_H) || defined(LIBBSP_ARM_LPC32XX_BSP_H) #define NEED_USB_OHCI #elif defined(__GEN83xx_BSP_h) || defined(LIBBSP_POWERPC_QORIQ_BSP_H) #define NEED_USB_EHCI #elif defined(LIBBSP_ARM_RASPBERRYPI_BSP_H) #define NEED_USB_OTG #endif SYSINIT_NEED_USB_CORE; #ifdef NEED_USB_OHCI SYSINIT_NEED_USB_OHCI; #endif #ifdef NEED_USB_EHCI SYSINIT_NEED_USB_EHCI; #endif #ifdef NEED_USB_OTG SYSINIT_NEED_USB_BCM283x_DWC_OTG; #endif SYSINIT_NEED_USB_MASS_STORAGE; #endif /* USB_SYSINIT_INIT */
/* * Copyright (c) 2013-2015 embedded brains GmbH. All rights reserved. * * embedded brains GmbH * Dornierstr. 4 * 82178 Puchheim * Germany * <rt...@embedded-brains.de> * * Copyright (c) 2016 Chris Johns <chr...@rtems.org> All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(BSP_NEXUS_DEVICES_h) #define BSP_NEXUS_DEVICES_h #include <bsp.h> #include <rtems/bsd/bsd.h> #include <machine/rtems-bsd-nexus-bus.h> #if defined(LIBBSP_ARM_REALVIEW_PBX_A9_BSP_H) #include <bsp/irq.h> RTEMS_BSD_DRIVER_SMC0(0x4e000000, RVPBXA9_IRQ_ETHERNET); #elif defined(LIBBSP_M68K_GENMCF548X_BSP_H) RTEMS_BSD_DRIVER_FEC; #elif defined(LIBBSP_ARM_XILINX_ZYNQ_BSP_H) #include <bsp/irq.h> RTEMS_BSD_DRIVER_XILINX_ZYNQ_SLCR0; RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM0(ZYNQ_IRQ_ETHERNET_0); RTEMS_BSD_DRIVER_E1000PHY; #elif defined(LIBBSP_ARM_ALTERA_CYCLONE_V_BSP_H) #include <bsp/socal/hps.h> #include <bsp/irq.h> RTEMS_BSD_DRIVER_DWC0((unsigned long) ALT_EMAC1_ADDR, ALT_INT_INTERRUPT_EMAC1_IRQ); RTEMS_BSD_DRIVER_MIPHY; RTEMS_BSD_DRIVER_DWCOTG0((unsigned long) ALT_USB1_ADDR, ALT_INT_INTERRUPT_USB1_IRQ); RTEMS_BSD_DRIVER_DWC_MMC; RTEMS_BSD_DRIVER_MMC; RTEMS_BSD_DRIVER_USB; RTEMS_BSD_DRIVER_USB_MASS; #elif defined(LIBBSP_ARM_RASPBERRYPI_BSP_H) #include <bsp/irq.h> RTEMS_BSD_DRIVER_BCM283X_DWCOTG(BCM2835_USB_BASE, BCM2835_IRQ_ID_USB); RTEMS_BSD_DRIVER_USB; RTEMS_BSD_DRIVER_USB_MASS; #elif defined(LIBBSP_I386_PC386_BSP_H) RTEMS_BSD_DRIVER_PC_LEGACY; RTEMS_BSD_DRIVER_PCI_LEM; RTEMS_BSD_DRIVER_PCI_IGB; RTEMS_BSD_DRIVER_PCI_EM; RTEMS_BSD_DRIVER_PCI_RE; RTEMS_BSD_DRIVER_REPHY; #elif defined(LIBBSP_POWERPC_QORIQ_BSP_H) #if !QORIQ_CHIP_IS_T_VARIANT(QORIQ_CHIP_VARIANT) #include <bsp/irq.h> RTEMS_BSD_DRIVER_TSEC(0xffeb0000, QORIQ_IRQ_ETSEC_TX_1, QORIQ_IRQ_ETSEC_RX_1, QORIQ_IRQ_ETSEC_ER_1); #endif /* !QORIQ_CHIP_IS_T_VARIANT(QORIQ_CHIP_VARIANT) */ #endif #endif
/* * Copyright (c) 2013-2015 embedded brains GmbH. All rights reserved. * * embedded brains GmbH * Dornierstr. 4 * 82178 Puchheim * Germany * <rt...@embedded-brains.de> * * Copyright (c) 2016 Chris Johns <chr...@rtems.org> All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * The Nexus bus devices. * * Driver Summary is: * * Devices: * RTEMS_BSD_DRIVER_XILINX_ZYNQ_SLCR0 * * Buses: * RTEMS_BSD_DRIVER_PC_LEGACY * * USB: * RTEMS_BSD_DRIVER_DWCOTG0 * RTEMS_BSD_DRIVER_DWCOTG0_BASE_ADDR * RTEMS_BSD_DRIVER_DWCOTG0_IRQ * RTEMS_BSD_DRIVER_DWC_MMC * RTEMS_BSD_DRIVER_MMC * RTEMS_BSD_DRIVER_USB * RTEMS_BSD_DRIVER_USB_MASS * * Networking: * RTEMS_BSD_DRIVER_SMC0 * RTEMS_BSD_DRIVER_SMC0_BASE_ADDR * RTEMS_BSD_DRIVER_SMC0_IRQ * RTEMS_BSD_DRIVER_FEC * RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM0 * RTEMS_BSD_DRIVER_CGEM0_IRQ * RTEMS_BSD_DRIVER_DWC0 * RTEMS_BSD_DRIVER_DWC0_BASE_ADDR * RTEMS_BSD_DRIVER_DWC0_IRQ * RTEMS_BSD_DRIVER_TSEC * RTEMS_BSD_DRIVER_TSEC_BASE_ADDR * RTEMS_BSD_DRIVER_TSEC_TX_IRQ * RTEMS_BSD_DRIVER_TSEC_RX_IRQ * RTEMS_BSD_DRIVER_TSEC_ER_IRQ * RTEMS_BSD_DRIVER_PCI_LEM * RTEMS_BSD_DRIVER_PCI_IGB * RTEMS_BSD_DRIVER_PCI_EM * RTEMS_BSD_DRIVER_PCI_RE * * MMI PHY: * RTEMS_BSD_DRIVER_E1000PHY * RTEMS_BSD_DRIVER_REPHY * RTEMS_BSD_DRIVER_MIPHY */ #if !defined(RTEMS_BSD_NEXUS_BUS_h) #define RTEMS_BSD_NEXUS_BUS_h #include <rtems/bsd/bsd.h> #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * Keep the order of the groups. **/ /** ** Devices ** **/ /* * Xilinx Zynq System Level Control Core 0 (SLCR0). */ #if !defined(RTEMS_BSD_DRIVER_XILINX_ZYNQ_SLCR) /* * Hard IP part of the Zynq so a fixed address. */ #define RTEMS_BSD_DRIVER_XILINX_ZYNQ_SLCR0 \ static const rtems_bsd_device_resource zy7_slcr0_res[] = { \ { \ .type = RTEMS_BSD_RES_MEMORY, \ .start_request = 0, \ .start_actual = 0xf8000000 \ } \ }; \ RTEMS_BSD_DEFINE_NEXUS_DEVICE(zy7_slcr, 0, \ RTEMS_ARRAY_SIZE(zy7_slcr0_res), \ &zy7_slcr0_res[0]) #endif /* RTEMS_BSD_DRIVER_XILINX_ZYNQ_SLCR0 */ /** ** Physical Buses **/ /* * PC legacy bus. */ #if !defined(RTEMS_BSD_DRIVER_PC_LEGACY) #define RTEMS_BSD_DRIVER_PC_LEGACY \ RTEMS_BSD_DEFINE_NEXUS_DEVICE(legacy, 0, 0, NULL); \ SYSINIT_DRIVER_REFERENCE(pcib, legacy); \ SYSINIT_DRIVER_REFERENCE(pci, pcib) #endif /* RTEMS_BSD_DRIVER_PC_LEGACY */ /** ** USB **/ /* * Designware/Synopsys OTG USB Controller. */ #if !defined(RTEMS_BSD_DRIVER_DWCOTG0) #define RTEMS_BSD_DRIVER_DWCOTG0(_base, _irq) \ static const rtems_bsd_device_resource dwcotg0_res[] = { \ { \ .type = RTEMS_BSD_RES_MEMORY, \ .start_request = 0, \ .start_actual = (_base) \ }, { \ .type = RTEMS_BSD_RES_IRQ, \ .start_request = 0, \ .start_actual = (_irq) \ } \ }; \ RTEMS_BSD_DEFINE_NEXUS_DEVICE(dwcotg, 0, \ RTEMS_ARRAY_SIZE(dwcotg0_res), \ &dwcotg0_res[0]) #endif /* RTEMS_BSD_DRIVER_DWCOTG0 */ /* * RaspberryPi OTG USB Controller. */ #if !defined(RTEMS_BSD_DRIVER_BCM283X_DWCOTG) #define RTEMS_BSD_DRIVER_BCM283X_DWCOTG(_base, _irq) \ static const rtems_bsd_device_resource bcm283x_dwcotg_res[] = { \ { \ .type = RTEMS_BSD_RES_MEMORY, \ .start_request = 0, \ .start_actual = (_base) \ }, { \ .type = RTEMS_BSD_RES_IRQ, \ .start_request = 0, \ .start_actual = (_irq) \ } \ }; \ RTEMS_BSD_DEFINE_NEXUS_DEVICE(bcm283x_dwcotg, 0, \ RTEMS_ARRAY_SIZE(bcm283x_dwcotg_res), \ &bcm283x_dwcotg_res[0]) #endif /* RTEMS_BSD_DRIVER_BCM283X_DWCOTG */ /* * Designware/Synopsys MMC. */ #if !defined(RTEMS_BSD_DRIVER_DWC_MMC) #define RTEMS_BSD_DRIVER_DWC_MMC \ RTEMS_BSD_DEFINE_NEXUS_DEVICE(dw_mmc, 0, 0, NULL); \ SYSINIT_DRIVER_REFERENCE(mmc, dw_mmc) #endif /* RTEMS_BSD_DRIVER_DWC_MMC */ /* * MMC Driver. */ #if !defined(RTEMS_BSD_DRIVER_MMC) #define RTEMS_BSD_DRIVER_MMC \ SYSINIT_DRIVER_REFERENCE(mmcsd, mmc) #endif /* RTEMS_BSD_DRIVER_MMC */ /* * USB Drivers. */ #if !defined(RTEMS_BSD_DRIVER_USB) #define RTEMS_BSD_DRIVER_USB \ SYSINIT_REFERENCE(usb_quirk_init); \ SYSINIT_DRIVER_REFERENCE(uhub, usbus) #endif /* RTEMS_BSD_DRIVER_USB */ /* * USB Mass Storage Class driver. */ #if !defined(RTEMS_BSD_DRIVER_USB_MASS) #define RTEMS_BSD_DRIVER_USB_MASS \ SYSINIT_DRIVER_REFERENCE(umass, uhub) #endif /* RTEMS_BSD_DRIVER_USB_MASS */ /** ** Networking **/ /* * SMC0 driver */ #if !defined(RTEMS_BSD_DRIVER_SMC0) #define RTEMS_BSD_DRIVER_SMC0(_base, _irq) \ static const rtems_bsd_device_resource smc0_res[] = { \ { \ .type = RTEMS_BSD_RES_MEMORY, \ .start_request = 0, \ .start_actual = (_base) \ }, { \ .type = RTEMS_BSD_RES_IRQ, \ .start_request = 0, \ .start_actual = (_irq) \ } \ }; \ RTEMS_BSD_DEFINE_NEXUS_DEVICE(smc, 0, \ RTEMS_ARRAY_SIZE(smc0_res), \ &smc0_res[0]) #endif /* RTEMS_BSD_DRIVER_SMC */ /* * Coldfire Fast Ethernet Controller (FEC) driver. */ #if !defined(RTEMS_BSD_DRIVER_FEC) #define RTEMS_BSD_DRIVER_FEC \ RTEMS_BSD_DEFINE_NEXUS_DEVICE(fec, 0, 0, NULL); #endif /* RTEMS_BSD_DRIVER_FEC */ /* * Xilinx Zynq Cadence Gigbit Ethernet MAC (CGEM). */ #if !defined(RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM) #define RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM(_num, _base, _irq) \ static const rtems_bsd_device_resource cgem ## _num ## _res[] = { \ { \ .type = RTEMS_BSD_RES_MEMORY, \ .start_request = 0, \ .start_actual = (_base) \ }, { \ .type = RTEMS_BSD_RES_IRQ, \ .start_request = 0, \ .start_actual = (_irq) \ } \ }; \ RTEMS_BSD_DEFINE_NEXUS_DEVICE(cgem, _num, \ RTEMS_ARRAY_SIZE(cgem ## _num ## _res), \ &cgem ## _num ## _res[0]) #endif /* RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM */ #if !defined(RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM0) #define RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM0(_irq) \ RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM(0, 0xe000b000, _irq) #endif /* RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM0 */ #if !defined(RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM1) #define RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM1(_irq) \ RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM(1, 0xe000c000, _irq) #endif /* RTEMS_BSD_DRIVER_XILINX_ZYNQ_CGEM1 */ /* * Designware/Synopsys Ethernet MAC Controller. */ #if !defined(RTEMS_BSD_DRIVER_DWC0) #define RTEMS_BSD_DRIVER_DWC0(_base, _irq) \ static const rtems_bsd_device_resource dwc0_res[] = { \ { \ .type = RTEMS_BSD_RES_MEMORY, \ .start_request = 0, \ .start_actual = (_base) \ }, { \ .type = RTEMS_BSD_RES_IRQ, \ .start_request = 0, \ .start_actual = (_irq) \ } \ }; \ RTEMS_BSD_DEFINE_NEXUS_DEVICE(dwc, 0, \ RTEMS_ARRAY_SIZE(dwc0_res), \ &dwc0_res[0]) #endif /* RTEMS_BSD_DRIVER_DWC0 */ /* * NXP QorIQ Network Driver. */ #if !defined(RTEMS_BSD_DRIVER_TSEC) #define RTEMS_BSD_DRIVER_TSEC(_base, _tx_irq, _rx_irq, _er_irq) \ static const rtems_bsd_device_resource tsec0_res[] = { \ { \ .type = RTEMS_BSD_RES_MEMORY, \ .start_request = 0, \ .start_actual = (_base) \ }, { \ .type = RTEMS_BSD_RES_IRQ, \ .start_request = 0, \ .start_actual = (_tx_irq) \ }, { \ .type = RTEMS_BSD_RES_IRQ, \ .start_request = 1, \ .start_actual = (_rx_irq) \ }, { \ .type = RTEMS_BSD_RES_IRQ, \ .start_request = 2, \ .start_actual = (_er_irq) \ } \ }; \ RTEMS_BSD_DEFINE_NEXUS_DEVICE(tsec, 0, \ RTEMS_ARRAY_SIZE(tsec0_res), \ &tsec0_res[0]) #endif /* RTEMS_BSD_DRIVER_TSEC */ /* * Intel's Legacy EM driver. */ #if !defined(RTEMS_BSD_DRIVER_PCI_LEM) #define RTEMS_BSD_DRIVER_PCI_LEM \ SYSINIT_DRIVER_REFERENCE(lem, pci); #endif /* RTEMS_BSD_DRIVER_PCI_LEM */ /* * Intel's Gigabit Driver. */ #if !defined(RTEMS_BSD_DRIVER_PCI_IGB) #define RTEMS_BSD_DRIVER_PCI_IGB \ SYSINIT_DRIVER_REFERENCE(igb, pci); #endif /* RTEMS_BSD_DRIVER_PCI_IGB */ /* * Intel's EM Driver. */ #if !defined(RTEMS_BSD_DRIVER_PCI_EM) #define RTEMS_BSD_DRIVER_PCI_EM \ SYSINIT_DRIVER_REFERENCE(em, pci); #endif /* RTEMS_BSD_DRIVER_PCI_EM */ /* * Realtek Driver */ #if !defined(RTEMS_BSD_DRIVER_PCI_RE) #define RTEMS_BSD_DRIVER_PCI_RE \ SYSINIT_DRIVER_REFERENCE(re, pci); #endif /* RTEMS_BSD_DRIVER_PCI_RE */ /** ** MMI Physical Layer Support. **/ /* * E1000 PHY */ #if !defined(RTEMS_BSD_DRIVER_E1000PHY) #define RTEMS_BSD_DRIVER_E1000PHY \ SYSINIT_DRIVER_REFERENCE(e1000phy, miibus); #endif /* RTEMS_BSD_DRIVER_E1000PHY */ /* * Reltek PHY */ #if !defined(RTEMS_BSD_DRIVER_REPHY) #define RTEMS_BSD_DRIVER_REPHY \ SYSINIT_DRIVER_REFERENCE(rgephy, miibus); #endif /* RTEMS_BSD_DRIVER_REPHY */ /* * MI PHY. */ #if !defined(RTEMS_BSD_DRIVER_MIPHY) #define RTEMS_BSD_DRIVER_MIPHY \ SYSINIT_DRIVER_REFERENCE(micphy, miibus); #endif /* RTEMS_BSD_DRIVER_MIPHY */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif
/** * @file * * @ingroup rtems_bsd_machine * * @brief TODO. */ /* * Copyright (c) 2009, 2010 embedded brains GmbH. All rights reserved. * * embedded brains GmbH * Dornierstr. 4 * 82178 Puchheim * Germany * <rt...@embedded-brains.de> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _RTEMS_BSD_MACHINE_RTEMS_BSD_SYSINIT_H_ #define _RTEMS_BSD_MACHINE_RTEMS_BSD_SYSINIT_H_ #include <sys/cdefs.h> #include <sys/queue.h> #include <sys/kernel.h> #define SYSINIT_NEED_USB_CORE \ SYSINIT_REFERENCE(usb_quirk_init); \ SYSINIT_DRIVER_REFERENCE(uhub, usbus) #define SYSINIT_NEED_USB_OHCI \ SYSINIT_DRIVER_REFERENCE(ohci, nexus); \ SYSINIT_DRIVER_REFERENCE(usbus, ohci) #define SYSINIT_NEED_USB_EHCI \ SYSINIT_DRIVER_REFERENCE(ehci, nexus); \ SYSINIT_DRIVER_REFERENCE(usbus, ehci) #if 1 // Thomas added #define SYSINIT_NEED_USB_BCM283x_DWC_OTG \ SYSINIT_DRIVER_REFERENCE(bcm283x_dwcotg, nexus); #endif #define SYSINIT_NEED_USB_MASS_STORAGE \ SYSINIT_DRIVER_REFERENCE(umass, uhub) #define SYSINIT_NEED_USB_MOUSE \ SYSINIT_DRIVER_REFERENCE(umass, uhub) #define SYSINIT_NEED_SDHC \ SYSINIT_DRIVER_REFERENCE(sdhci, nexus); \ SYSINIT_DRIVER_REFERENCE(mmc, sdhci); \ SYSINIT_DRIVER_REFERENCE(mmcsd, mmc) #define SYSINIT_NEED_PCIB \ SYSINIT_DRIVER_REFERENCE(legacy, nexus); \ SYSINIT_DRIVER_REFERENCE(pcib, legacy); \ SYSINIT_DRIVER_REFERENCE(pci, pcib); #define SYSINIT_NEED_NET_PF_UNIX \ SYSINIT_DOMAIN_REFERENCE(local) #define SYSINIT_NEED_NET_IF_BFE \ SYSINIT_DRIVER_REFERENCE(bfe, pci) #define SYSINIT_NEED_NET_IF_RE \ SYSINIT_DRIVER_REFERENCE(re, pci) #define SYSINIT_NEED_NET_IF_EM \ SYSINIT_DRIVER_REFERENCE(em, pci) #define SYSINIT_NEED_NET_IF_IGB \ SYSINIT_DRIVER_REFERENCE(igb, pci) #define SYSINIT_NEED_NET_IF_LEM \ SYSINIT_DRIVER_REFERENCE(lem, pci) #define SYSINIT_NEED_NET_IF_BCE \ SYSINIT_DRIVER_REFERENCE(bce, pci) #define SYSINIT_NEED_NET_IF_BGE \ SYSINIT_DRIVER_REFERENCE(bge, pci) #define SYSINIT_NEED_NET_IF_FXP \ SYSINIT_DRIVER_REFERENCE(fxp, pci) #define SYSINIT_NEED_NET_IF_DC \ SYSINIT_DRIVER_REFERENCE(dc, pci) #define SYSINIT_NEED_NET_IF_LAGG \ SYSINIT_MODULE_REFERENCE(if_lagg) #define SYSINIT_NEED_NET_IF_VLAN \ SYSINIT_MODULE_REFERENCE(if_vlan) #endif /* _RTEMS_BSD_MACHINE_RTEMS_BSD_SYSINIT_H_ */
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel