diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-08-26 17:03:52 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-08-26 17:03:52 -0600 |
commit | c75db36d00654de546003aa1ab2f025a76b15320 (patch) | |
tree | fe7bab5eb6b4575c27c1ae76fbfabb67f2683fa0 | |
parent | 0b2262e07db923c1211c9c42e0f9b990262f7820 (diff) | |
download | px4-nuttx-c75db36d00654de546003aa1ab2f025a76b15320.tar.gz px4-nuttx-c75db36d00654de546003aa1ab2f025a76b15320.tar.bz2 px4-nuttx-c75db36d00654de546003aa1ab2f025a76b15320.zip |
SAMA4 EHCI: Correct some backward conditional compilation; fix some warnings
-rwxr-xr-x | nuttx/arch/arm/src/sama5/sam_ehci.c | 12 | ||||
-rw-r--r-- | nuttx/arch/arm/src/sama5/sam_ohci.c | 4 | ||||
-rw-r--r-- | nuttx/configs/sama5d3x-ek/README.txt | 7 |
3 files changed, 18 insertions, 5 deletions
diff --git a/nuttx/arch/arm/src/sama5/sam_ehci.c b/nuttx/arch/arm/src/sama5/sam_ehci.c index 69c13b4ce..3ad06d0e4 100755 --- a/nuttx/arch/arm/src/sama5/sam_ehci.c +++ b/nuttx/arch/arm/src/sama5/sam_ehci.c @@ -2657,7 +2657,9 @@ static int sam_wait(FAR struct usbhost_connection_s *conn, if (g_ehci.rhport[rhpndx].connected != connected[rhpndx]) { - /* Yes.. Return the RH port number */ + /* Yes.. Return the RH port number to inform the caller which + * port has the connection change. + */ irqrestore(flags); @@ -2784,7 +2786,7 @@ static int sam_enumerate(FAR struct usbhost_connection_s *conn, int rhpndx) regval |= EHCI_PORTSC_OWNER; sam_putreg(regval, &HCOR->portsc[rhpndx]); -#ifndef CONFIG_SAMA5_OHCI +#ifdef CONFIG_SAMA5_OHCI /* Give the port to the OHCI controller. Zero is the reset value for * all ports; one makes the corresponding port available to OHCI. */ @@ -2905,7 +2907,7 @@ static int sam_enumerate(FAR struct usbhost_connection_s *conn, int rhpndx) regval |= EHCI_PORTSC_OWNER; sam_putreg(regval, &HCOR->portsc[rhpndx]); -#ifndef CONFIG_SAMA5_OHCI +#ifdef CONFIG_SAMA5_OHCI /* Give the port to the OHCI controller. Zero is the reset value for * all ports; one makes the corresponding port available to OHCI. */ @@ -3007,6 +3009,7 @@ static int sam_ep0configure(FAR struct usbhost_driver_s *drvr, uint8_t funcaddr, static int sam_getdevinfo(FAR struct usbhost_driver_s *drvr, FAR struct usbhost_devinfo_s *devinfo) { +#if 0 struct sam_rhport_s *rhport = (struct sam_rhport_s *)drvr; struct sam_epinfo_s *epinfo; @@ -3017,7 +3020,6 @@ static int sam_getdevinfo(FAR struct usbhost_driver_s *drvr, * low or full speed devices are handed off to the OHCI driver. */ -#if 0 switch (epinfo->speed) { case EHCI_LOW_SPEED: @@ -3035,6 +3037,8 @@ static int sam_getdevinfo(FAR struct usbhost_driver_s *drvr, } #else + DEBUGASSERT(drvr && devinfo); + devinfo->speed = DEVINFO_SPEED_HIGH; #endif diff --git a/nuttx/arch/arm/src/sama5/sam_ohci.c b/nuttx/arch/arm/src/sama5/sam_ohci.c index c2b6ff26d..a1039d7db 100644 --- a/nuttx/arch/arm/src/sama5/sam_ohci.c +++ b/nuttx/arch/arm/src/sama5/sam_ohci.c @@ -2085,7 +2085,9 @@ static int sam_wait(FAR struct usbhost_connection_s *conn, if (g_ohci.rhport[rhpndx].connected != connected[rhpndx]) { - /* Yes.. Return the RH port number ;to inform the call which */ + /* Yes.. Return the RH port number to inform the caller which + * port has the connection change. + */ irqrestore(flags); diff --git a/nuttx/configs/sama5d3x-ek/README.txt b/nuttx/configs/sama5d3x-ek/README.txt index e89d1d9ee..6d76fa25c 100644 --- a/nuttx/configs/sama5d3x-ek/README.txt +++ b/nuttx/configs/sama5d3x-ek/README.txt @@ -1283,6 +1283,13 @@ Configurations 2013-8-20: Added description to add EHCI to the configuration. At present, however, EHCI is still a work in progress and not ready for prime time. + 2013-8-26: EHCI is still non-functional. After days of work, it is + able to exchange a SETUP transfer or two, but it still does not make + it through the full enumeration sequence. + Nor does the hand-off of high speed devices to OHCI work. In this + case, OHCI gets the port, but the port is reset, lost by OCHI and + returned to EHCI. EHCI sees the full-speed port and hands it off + to OHCI and this sequence continues forever. ostest: This configuration directory, performs a simple OS test using |