This commit is contained in:
ziggurat29 2016-04-23 14:18:57 -05:00
commit 4f51a83358
2 changed files with 26 additions and 25 deletions

View File

@ -121,7 +121,7 @@
#define DMA_NSAMPLES 5 #define DMA_NSAMPLES 5
#ifdef CONFIG_STM32L4_QSPI_DMA #ifdef CONFIG_STM32L4_QSPI_DMA
# error QSPI DMA support not yet implemented # error QSPI DMA support not yet implemented
#endif #endif
/* QSPI dma is not yet implemented */ /* QSPI dma is not yet implemented */
@ -136,22 +136,22 @@
#if (!defined(GPIO_QSPI_CS) || !defined(GPIO_QSPI_IO0) || !defined(GPIO_QSPI_IO1) || \ #if (!defined(GPIO_QSPI_CS) || !defined(GPIO_QSPI_IO0) || !defined(GPIO_QSPI_IO1) || \
!defined(GPIO_QSPI_IO2) || !defined(GPIO_QSPI_IO3) || !defined(GPIO_QSPI_SCK)) !defined(GPIO_QSPI_IO2) || !defined(GPIO_QSPI_IO3) || !defined(GPIO_QSPI_SCK))
# error you must define QSPI pinmapping options for GPIO_QSPI_CS GPIO_QSPI_IO0 \ # error you must define QSPI pinmapping options for GPIO_QSPI_CS GPIO_QSPI_IO0 \
GPIO_QSPI_IO1 GPIO_QSPI_IO2 GPIO_QSPI_IO3 GPIO_QSPI_SCK in your board.h GPIO_QSPI_IO1 GPIO_QSPI_IO2 GPIO_QSPI_IO3 GPIO_QSPI_SCK in your board.h
#endif #endif
#ifdef CONFIG_STM32L4_QSPI_DMA #ifdef CONFIG_STM32L4_QSPI_DMA
#if !defined(DMACHAN_QUADSPI) # if !defined(DMACHAN_QUADSPI)
# error QSPI DMA channel must be specified via DMACHAN_QUADSPI in your board.h # error QSPI DMA channel must be specified via DMACHAN_QUADSPI in your board.h
#endif # endif
#endif #endif
#ifndef BOARD_AHB_FREQUENCY #ifndef BOARD_AHB_FREQUENCY
# error your board.h needs to define the value of BOARD_AHB_FREQUENCY # error your board.h needs to define the value of BOARD_AHB_FREQUENCY
#endif #endif
#if !defined(CONFIG_STM32L4_QSPI_FLASH_SIZE) || 0 == CONFIG_STM32L4_QSPI_FLASH_SIZE #if !defined(CONFIG_STM32L4_QSPI_FLASH_SIZE) || 0 == CONFIG_STM32L4_QSPI_FLASH_SIZE
# error you must specify a positive flash size via CONFIG_STM32L4_QSPI_FLASH_SIZE # error you must specify a positive flash size via CONFIG_STM32L4_QSPI_FLASH_SIZE
#endif #endif
/* Clocking *****************************************************************/ /* Clocking *****************************************************************/
@ -1355,13 +1355,14 @@ static uint32_t qspi_setfrequency(struct qspi_dev_s *dev, uint32_t frequency)
uint32_t prescaler; uint32_t prescaler;
uint32_t regval; uint32_t regval;
if (priv->memmap) if (priv->memmap)
{ {
/* XXX we have no better return here, but the caller will find out /* XXX we have no better return here, but the caller will find out
* in their subsequent calls. * in their subsequent calls.
*/ */
return 0;
} return 0;
}
qspivdbg("frequency=%d\n", frequency); qspivdbg("frequency=%d\n", frequency);
DEBUGASSERT(priv); DEBUGASSERT(priv);
@ -1555,9 +1556,9 @@ static int qspi_command(struct qspi_dev_s *dev,
*/ */
if (priv->memmap) if (priv->memmap)
{ {
return -EBUSY; return -EBUSY;
} }
/* Set up the transaction descriptor as per command info */ /* Set up the transaction descriptor as per command info */
@ -1736,9 +1737,9 @@ static int qspi_memory(struct qspi_dev_s *dev,
*/ */
if (priv->memmap) if (priv->memmap)
{ {
return -EBUSY; return -EBUSY;
} }
/* Set up the transaction descriptor as per command info */ /* Set up the transaction descriptor as per command info */
@ -2181,10 +2182,10 @@ void stm32l4_qspi_enter_memorymapped(struct qspi_dev_s* dev,
qspi_lock(dev, true); qspi_lock(dev, true);
if (priv->memmap) if (priv->memmap)
{ {
qspi_lock(dev, false); qspi_lock(dev, false);
return; return;
} }
/* Abort anything in-progress */ /* Abort anything in-progress */

View File

@ -489,7 +489,7 @@ static inline int vnc_wait_start(int display)
*/ */
while (g_vnc_sessions[display] == NULL || while (g_vnc_sessions[display] == NULL ||
g_vnc_sessions[display]->state != VNCSERVER_UNINITIALIZED) g_vnc_sessions[display]->state == VNCSERVER_UNINITIALIZED)
{ {
/* The server is not yet running. Wait for the server to post the FB /* The server is not yet running. Wait for the server to post the FB
* semaphore. In certain error situations, the server may post the * semaphore. In certain error situations, the server may post the