From 62f2bd5fe08707d053f10c6f2b9220723fc868aa Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 24 Aug 2013 14:06:47 -0600 Subject: SAMA5D3x-EK: Fix some backward conditional compilation --- nuttx/arch/arm/src/sama5/sam_ehci.c | 4 +++- nuttx/arch/arm/src/sama5/sam_ohci.c | 4 +++- nuttx/configs/sama5d3x-ek/src/sam_usb.c | 6 +++--- 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 -- cgit v1.2.3