Port am335x usb driver to RTEMS.

Add FDT and umass support for am335x USB driver.

Now RTEMS can mount and open USB disk.
This commit is contained in:
Sichen Zhao
2017-07-13 10:24:05 +08:00
committed by Sebastian Huber
parent bd3c01a126
commit 9121570cf2
7 changed files with 75 additions and 0 deletions

View File

@@ -438,7 +438,9 @@ am335x_prcm_attach(device_t dev)
sc->bsh = rman_get_bushandle(sc->res[0]);
am335x_prcm_sc = sc;
#ifndef __rtems__
ti_cpu_reset = am335x_prcm_reset;
#endif /* __rtems__ */
if (am335x_clk_get_sysclk_freq(NULL, &sysclk) != 0)
sysclk = 0;

View File

@@ -29,6 +29,9 @@
#ifndef _TI_CPUID_H_
#define _TI_CPUID_H_
#ifdef __rtems__
#include <bsp.h>
#endif /* __rtems__ */
#define OMAP_MAKEREV(d, a, b, c) \
(uint32_t)(((d) << 16) | (((a) & 0xf) << 8) | (((b) & 0xf) << 4) | ((c) & 0xf))
@@ -70,7 +73,23 @@
#define CHIP_OMAP_4 0
#define CHIP_AM335X 1
#ifdef __rtems__
#ifdef IS_AM335X
#define SOC_TI_AM335X
#else
#warning Unknown SOC.
#endif
#if defined(SOC_TI_AM335X)
#define _ti_chip CHIP_AM335X
#elif defined(SOC_OMAP4)
#define _ti_chip CHIP_OMAP_4
#else
#define _ti_chip -1
#endif
#else /* __rtems__ */
extern int _ti_chip;
#endif /* __rtems__ */
static __inline int ti_chip(void)
{