Changeset 9121570 in rtems-libbsd


Ignore:
Timestamp:
Jul 13, 2017, 2:24:05 AM (2 years ago)
Author:
Sichen Zhao <1473996754@…>
Branches:
5283630d2c9d40deb0183696d278e02644fe4326, bc2ba9a9cdc7381c2a4f2ae6ee303be636f31368
Children:
658f9b8
Parents:
bd3c01a
git-author:
Sichen Zhao <1473996754@…> (07/13/17 02:24:05)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/13/17 05:30:06)
Message:

Port am335x usb driver to RTEMS.

Add FDT and umass support for am335x USB driver.

Now RTEMS can mount and open USB disk.

Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/arm/ti/am335x/am335x_prcm.c

    rbd3c01a r9121570  
    439439
    440440        am335x_prcm_sc = sc;
     441#ifndef __rtems__
    441442        ti_cpu_reset = am335x_prcm_reset;
     443#endif /* __rtems__ */
    442444
    443445        if (am335x_clk_get_sysclk_freq(NULL, &sysclk) != 0)
  • freebsd/sys/arm/ti/ti_cpuid.h

    rbd3c01a r9121570  
    3030#ifndef _TI_CPUID_H_
    3131#define _TI_CPUID_H_
     32#ifdef __rtems__
     33#include <bsp.h>
     34#endif /* __rtems__ */
    3235
    3336#define OMAP_MAKEREV(d, a, b, c) \
     
    7174#define CHIP_AM335X     1
    7275
     76#ifdef __rtems__
     77#ifdef IS_AM335X
     78#define SOC_TI_AM335X
     79#else
     80#warning Unknown SOC.
     81#endif
     82
     83#if defined(SOC_TI_AM335X)
     84#define _ti_chip CHIP_AM335X
     85#elif defined(SOC_OMAP4)
     86#define _ti_chip CHIP_OMAP_4
     87#else
     88#define _ti_chip -1
     89#endif
     90#else /* __rtems__ */
    7391extern int _ti_chip;
     92#endif /* __rtems__ */
    7493
    7594static __inline int ti_chip(void)
  • libbsd.py

    rbd3c01a r9121570  
    885885            'sys/dev/usb/storage/urio.c',
    886886            'sys/dev/usb/storage/ustorage_fs.c',
     887        ],
     888        mm.generator['source']()
     889    )
     890    return mod
     891
     892#
     893# BBB USB
     894#
     895def dev_usb_controller_bbb(mm):
     896    mod = builder.Module('dev_usb_controller_bbb')
     897    mod.addDependency(mm['dev_usb'])
     898    mod.addKernelSpaceHeaderFiles(
     899        [
     900            'sys/arm/ti/ti_cpuid.h',
     901            'sys/arm/ti/ti_prcm.h',
     902            'sys/arm/ti/ti_scm.h',
     903            'sys/arm/ti/tivar.h',
     904            'sys/arm/ti/am335x/am335x_scm.h',
     905            'sys/dev/usb/controller/musb_otg.h',
     906            'sys/sys/timeet.h',
     907            'sys/sys/watchdog.h',
     908            'sys/dev/fdt/fdt_pinctrl.h',
     909
     910        ]
     911    )
     912    mod.addKernelSpaceSourceFiles(
     913        [
     914            'sys/arm/ti/ti_scm.c',
     915            'sys/arm/ti/am335x/am335x_prcm.c',
     916            'sys/arm/ti/am335x/am335x_usbss.c',
     917            'sys/arm/ti/ti_prcm.c',
     918            'sys/arm/ti/am335x/am335x_musb.c',
     919            'sys/dev/usb/controller/musb_otg.c',
    887920        ],
    888921        mm.generator['source']()
     
    31963229    mm.addModule(dev_usb_storage(mm))
    31973230    #mm.addModule(dev_usb_storage_add_on(mm))
     3231    mm.addModule(dev_usb_controller_bbb(mm))
    31983232
    31993233    #mm.addModule(dev_usb_template(mm))
  • libbsd_waf.py

    rbd3c01a r9121570  
    732732    source = ['freebsd/sys/arm/lpc/if_lpe.c',
    733733              'freebsd/sys/arm/lpc/lpc_pwr.c',
     734              'freebsd/sys/arm/ti/am335x/am335x_musb.c',
     735              'freebsd/sys/arm/ti/am335x/am335x_prcm.c',
     736              'freebsd/sys/arm/ti/am335x/am335x_usbss.c',
     737              'freebsd/sys/arm/ti/ti_prcm.c',
     738              'freebsd/sys/arm/ti/ti_scm.c',
    734739              'freebsd/sys/arm/xilinx/zy7_slcr.c',
    735740              'freebsd/sys/cam/cam.c',
     
    897902              'freebsd/sys/dev/usb/controller/dwc_otg.c',
    898903              'freebsd/sys/dev/usb/controller/ehci.c',
     904              'freebsd/sys/dev/usb/controller/musb_otg.c',
    899905              'freebsd/sys/dev/usb/controller/ohci.c',
    900906              'freebsd/sys/dev/usb/controller/usb_controller.c',
  • rtemsbsd/include/bsp/nexus-devices.h

    rbd3c01a r9121570  
    4646
    4747RTEMS_BSD_DRIVER_SMC0(0x4e000000,  RVPBXA9_IRQ_ETHERNET);
     48
     49#elif defined(LIBBSP_ARM_BEAGLE_BSP_H)
     50
     51#include <bsp/irq.h>
     52
     53RTEMS_BSD_DEFINE_NEXUS_DEVICE(ofwbus, 0, 0, NULL);
     54SYSINIT_DRIVER_REFERENCE(simplebus, ofwbus);
     55SYSINIT_DRIVER_REFERENCE(ti_scm, simplebus);
     56SYSINIT_DRIVER_REFERENCE(am335x_prcm, simplebus);
     57SYSINIT_DRIVER_REFERENCE(usbss, simplebus);
     58SYSINIT_DRIVER_REFERENCE(musbotg, usbss);
     59
     60RTEMS_BSD_DRIVER_USB;
     61RTEMS_BSD_DRIVER_USB_MASS;
    4862
    4963#elif defined(LIBBSP_ARM_LPC32XX_BSP_H)
Note: See TracChangeset for help on using the changeset viewer.