summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-08-24 14:06:47 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-08-24 14:06:47 -0600
commit62f2bd5fe08707d053f10c6f2b9220723fc868aa (patch)
tree54ed4d9b930ccf49298249d64c46260a8b3131d3
parentc072e1d1b7c1c6d2f0fffae0b75bc07d2b688baf (diff)
downloadnuttx-62f2bd5fe08707d053f10c6f2b9220723fc868aa.tar.gz
nuttx-62f2bd5fe08707d053f10c6f2b9220723fc868aa.tar.bz2
nuttx-62f2bd5fe08707d053f10c6f2b9220723fc868aa.zip
SAMA5D3x-EK: Fix some backward conditional compilation
-rwxr-xr-xnuttx/arch/arm/src/sama5/sam_ehci.c4
-rw-r--r--nuttx/arch/arm/src/sama5/sam_ohci.c4
-rw-r--r--nuttx/configs/sama5d3x-ek/src/sam_usb.c6
3 files changed, 9 insertions, 5 deletions
diff --git a/nuttx/arch/arm/src/sama5/sam_ehci.c b/nuttx/arch/arm/src/sama5/sam_ehci.c
index e42d2c7c6..6f25e3cf6 100755
--- a/nuttx/arch/arm/src/sama5/sam_ehci.c
+++ b/nuttx/arch/arm/src/sama5/sam_ehci.c
@@ -3872,7 +3872,9 @@ FAR struct usbhost_connection_s *sam_ehci_initialize(int controller)
*
* REVISIT:
* - Should be done elsewhere in OTG mode.
- * - Can we postpone enabling VBUS to save power?
+ * - Can we postpone enabling VBUS to save power? I think it can be
+ * done in sam_enumerate() and can probably be disabled when the
+ * port is disconnected.
* - Some EHCI implementations require setting the power bit in the
* PORTSC register to enable power.
*/
diff --git a/nuttx/arch/arm/src/sama5/sam_ohci.c b/nuttx/arch/arm/src/sama5/sam_ohci.c
index a02d7a474..b8926277d 100644
--- a/nuttx/arch/arm/src/sama5/sam_ohci.c
+++ b/nuttx/arch/arm/src/sama5/sam_ohci.c
@@ -3207,7 +3207,9 @@ FAR struct usbhost_connection_s *sam_ohci_initialize(int controller)
*
* REVISIT:
* - Should be done elsewhere in OTG mode.
- * - Can we postpone enabling VBUS to save power?
+ * - Can we postpone enabling VBUS to save power? I think it can be
+ * done in sam_enumerate() and can probably be disabled when the
+ * port is disconnected.
*/
#ifdef CONFIG_SAMA5_UHPHS_RHPORT1
diff --git a/nuttx/configs/sama5d3x-ek/src/sam_usb.c b/nuttx/configs/sama5d3x-ek/src/sam_usb.c
index b8cc73d21..22083b159 100644
--- a/nuttx/configs/sama5d3x-ek/src/sam_usb.c
+++ b/nuttx/configs/sama5d3x-ek/src/sam_usb.c
@@ -393,7 +393,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable)
switch (rhport)
{
case SAM_RHPORT1:
-#ifdef CONFIG_SAMA5_UHPHS_RHPORT1
+#ifndef CONFIG_SAMA5_UHPHS_RHPORT1
udbg("ERROR: RHPort1 is not available in this configuration\n");
return;
#else
@@ -402,7 +402,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable)
#endif
case SAM_RHPORT2:
-#ifdef CONFIG_SAMA5_UHPHS_RHPORT2
+#ifndef CONFIG_SAMA5_UHPHS_RHPORT2
udbg("ERROR: RHPort2 is not available in this configuration\n");
return;
#else
@@ -411,7 +411,7 @@ void sam_usbhost_vbusdrive(int rhport, bool enable)
#endif
case SAM_RHPORT3:
-#ifdef CONFIG_SAMA5_UHPHS_RHPORT3
+#ifndef CONFIG_SAMA5_UHPHS_RHPORT3
udbg("ERROR: RHPort3 is not available in this configuration\n");
return;
#else