From bdbe4a4f25e39bbb0d74a5a26e6c6f6e78109dcc Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 13 Aug 2013 17:43:19 -0600 Subject: [PATCH] Clean up some LP17xx and STM32 USB host configuration compilation errors due to the massive changes to the USB host interfaces needed to support the SAMA5 --- arch/arm/src/lpc17xx/lpc17_usbhost.c | 12 +++++++++--- arch/arm/src/sama5/sam_ohci.c | 3 ++- arch/arm/src/stm32/stm32_otgfshost.c | 8 +++++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/arch/arm/src/lpc17xx/lpc17_usbhost.c b/arch/arm/src/lpc17xx/lpc17_usbhost.c index 0e6c39a7a58..abda1ddf8f4 100644 --- a/arch/arm/src/lpc17xx/lpc17_usbhost.c +++ b/arch/arm/src/lpc17xx/lpc17_usbhost.c @@ -241,7 +241,9 @@ static void lpc17_takesem(sem_t *sem); /* Byte stream access helper functions *****************************************/ static inline uint16_t lpc17_getle16(const uint8_t *val); +#if 0 /* Not used */ static void lpc17_putle16(uint8_t *dest, uint16_t val); +#endif /* OHCI memory pool helper functions *******************************************/ @@ -294,7 +296,8 @@ static int lpc17_usbinterrupt(int irq, FAR void *context); /* USB host controller operations **********************************************/ -static int lpc17_wait(FAR struct usbhost_connection_s *conn, FAR bool *connected); +static int lpc17_wait(FAR struct usbhost_connection_s *conn, + FAR const bool *connected); static int lpc17_enumerate(FAR struct usbhost_connection_s *conn, int rhpndx); static int lpc17_ep0configure(FAR struct usbhost_driver_s *drvr, uint8_t funcaddr, @@ -541,11 +544,13 @@ static inline uint16_t lpc17_getle16(const uint8_t *val) * *******************************************************************************/ +#if 0 /* Not used */ static void lpc17_putle16(uint8_t *dest, uint16_t val) { dest[0] = val & 0xff; /* Little endian means LS byte first in byte stream */ dest[1] = val >> 8; } +#endif /******************************************************************************* * Name: lpc17_edfree @@ -1540,7 +1545,8 @@ static int lpc17_usbinterrupt(int irq, FAR void *context) * *******************************************************************************/ -static int lpc17_wait(FAR struct usbhost_connection_s *conn, FAR bool *connected) +static int lpc17_wait(FAR struct usbhost_connection_s *conn, + FAR const bool *connected) { struct lpc17_usbhost_s *priv = (struct lpc17_usbhost_s *)&g_usbhost; irqstate_t flags; @@ -1630,7 +1636,7 @@ static int lpc17_enumerate(FAR struct usbhost_connection_s *conn, int rphndx) */ uvdbg("Enumerate the device\n"); - return usbhost_enumerate(drvr, 1, &priv->class); + return usbhost_enumerate(&g_usbhost.drvr, 1, &priv->class); } /************************************************************************************ diff --git a/arch/arm/src/sama5/sam_ohci.c b/arch/arm/src/sama5/sam_ohci.c index 3e9bdb29561..0a59faf8677 100644 --- a/arch/arm/src/sama5/sam_ohci.c +++ b/arch/arm/src/sama5/sam_ohci.c @@ -338,7 +338,8 @@ static int sam_ohci_interrupt(int irq, FAR void *context); /* USB host controller operations **********************************************/ -static int sam_wait(FAR struct usbhost_connection_s *conn, FAR const bool *connected); +static int sam_wait(FAR struct usbhost_connection_s *conn, + FAR const bool *connected); static int sam_enumerate(FAR struct usbhost_connection_s *conn, int rhpndx); static int sam_ep0configure(FAR struct usbhost_driver_s *drvr, uint8_t funcaddr, diff --git a/arch/arm/src/stm32/stm32_otgfshost.c b/arch/arm/src/stm32/stm32_otgfshost.c index cb517079db6..315782a7e0e 100644 --- a/arch/arm/src/stm32/stm32_otgfshost.c +++ b/arch/arm/src/stm32/stm32_otgfshost.c @@ -358,7 +358,8 @@ static void stm32_txfe_enable(FAR struct stm32_usbhost_s *priv, int chidx); /* USB host controller operations **********************************************/ -static int stm32_wait(FAR struct usbhost_connection_s *conn, FAR bool *connected); +static int stm32_wait(FAR struct usbhost_connection_s *conn, + FAR const bool *connected); static int stm32_enumerate(FAR struct usbhost_connection_s *conn, int rhpndx); static int stm32_ep0configure(FAR struct usbhost_driver_s *drvr, uint8_t funcaddr, @@ -3035,7 +3036,8 @@ static void stm32_txfe_enable(FAR struct stm32_usbhost_s *priv, int chidx) * *******************************************************************************/ -static int stm32_wait(FAR struct usbhost_connection_s *conn, FAR bool *connected) +static int stm32_wait(FAR struct usbhost_connection_s *conn, + FAR const bool *connected) { FAR struct stm32_usbhost_s *priv = &g_usbhost; irqstate_t flags; @@ -3159,7 +3161,7 @@ static int stm32_enumerate(FAR struct usbhost_connection_s *conn, int rhpndx) uvdbg("Enumerate the device\n"); priv->smstate = SMSTATE_ENUM; - ret = usbhost_enumerate(drvr, 1, &priv->class); + ret = usbhost_enumerate(&g_usbhost.drvr, 1, &priv->class); /* The enumeration may fail either because of some HCD interfaces failure * or because the device class is not supported. In either case, we just