summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-11-28 13:30:06 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-11-28 13:30:06 -0600
commit1bcbded7141d063cc1732aff2ffe8730ad934820 (patch)
treea9308d0ad7c7f14c6c1ae1e653a97c44a17435df
parent89bb53cf38e7db693ef1b21e071425cbc2e8b999 (diff)
downloadpx4-nuttx-1bcbded7141d063cc1732aff2ffe8730ad934820.tar.gz
px4-nuttx-1bcbded7141d063cc1732aff2ffe8730ad934820.tar.bz2
px4-nuttx-1bcbded7141d063cc1732aff2ffe8730ad934820.zip
LPC31 EHCI: Make stream disable a configurable option
-rw-r--r--nuttx/arch/arm/src/lpc31xx/Kconfig12
-rwxr-xr-xnuttx/arch/arm/src/lpc31xx/lpc31_ehci.c2
-rw-r--r--nuttx/fs/fs_inode.c6
3 files changed, 16 insertions, 4 deletions
diff --git a/nuttx/arch/arm/src/lpc31xx/Kconfig b/nuttx/arch/arm/src/lpc31xx/Kconfig
index 831aca7f2..cde565a2a 100644
--- a/nuttx/arch/arm/src/lpc31xx/Kconfig
+++ b/nuttx/arch/arm/src/lpc31xx/Kconfig
@@ -253,6 +253,18 @@ if LPC31_USBOTG && USBHOST
menu "USB host controller driver (HCD) options"
+config LPC31_EHCI_SDIS
+ bool "Stream disable"
+ default n
+ ---help---
+ Selecting this option ensures that overruns/underruns of the latency
+ FIFO are eliminated for low bandwidth systems where the RX and TX
+ buffers are sufficient to contain the entire packet. Enabling stream
+ disable also has the effect of ensuring the the TX latency is filled
+ to capacity before the packet is launched onto the USB.
+
+ Note: Time duration to pre-fill the FIFO becomes significant when stream disable is active.
+
config LPC31_EHCI_NQHS
int "Number of Queue Head (QH) structures"
default 4
diff --git a/nuttx/arch/arm/src/lpc31xx/lpc31_ehci.c b/nuttx/arch/arm/src/lpc31xx/lpc31_ehci.c
index 8802ef638..cae15166b 100755
--- a/nuttx/arch/arm/src/lpc31xx/lpc31_ehci.c
+++ b/nuttx/arch/arm/src/lpc31xx/lpc31_ehci.c
@@ -4310,7 +4310,7 @@ FAR struct usbhost_connection_s *lpc31_ehci_initialize(int controller)
* VBPS = 1, off-chip power source
*/
- putreg32(USBHOST_USBMODE_CMHOST | USBHOST_USBMODE_SDIS | USBHOST_USBMODE_VBPS,
+ putreg32(USBHOST_USBMODE_CMHOST /* | USBHOST_USBMODE_SDIS */ | USBHOST_USBMODE_VBPS,
LPC31_USBDEV_USBMODE);
/* Host Controller Initialization. Paragraph 4.1 */
diff --git a/nuttx/fs/fs_inode.c b/nuttx/fs/fs_inode.c
index 0fe8689c7..afb88532c 100644
--- a/nuttx/fs/fs_inode.c
+++ b/nuttx/fs/fs_inode.c
@@ -61,7 +61,7 @@
* because there can be cycles. For example, it may be necessary to destroy
* a block driver inode on umount() after a removable block device has been
* removed. In that case umount() hold the inode semaphore, but the block
- * driver may callback to unregister_blockdriver() after the un-mount,
+ * driver may callback to unregister_blockdriver() after the un-mount,
* requiring the seamphore again.
*/
@@ -187,7 +187,7 @@ void fs_initialize(void)
(void)sem_init(&g_inode_sem.sem, 0, 1);
g_inode_sem.holder = NO_HOLDER;
g_inode_sem.count = 0;
-
+
/* Initialize files array (if it is used) */
#ifdef CONFIG_HAVE_WEAKFUNCTIONS
@@ -218,7 +218,7 @@ void inode_semtake(void)
/* Yes... just increment the count */
g_inode_sem.count++;
- DEBUGASSERT(g_inode_sem.count > 0);
+ DEBUGASSERT(g_inode_sem.count > 0);
}
/* Take the semaphore (perhaps waiting) */