From fba425c168da0a617644b4955704858a35a450b6 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Tue, 18 Apr 2017 10:20:39 -1000 Subject: [PATCH] Updated patch list for rebase on PX4/Firmware master --- ...BACKPORT-stm32fX-serial-fix-freezing.patch | 133 ------ ...ACKPORT-stm32-sdio-1-bit-and-16G-fix.patch | 56 --- .../00028-BACKPORT-mtd-FLASH-corruption.patch | 187 -------- ...KPORT-stm32-serial-upstream-sans-IRQ.patch | 429 ------------------ ...x-arm-none-eabi-gcc-7-warnings-nuttx.patch | 330 -------------- ...ix-arm-none-eabi-gcc-7-warnings-apps.patch | 71 --- ...CKPORT-stm32f7-pinmap-FMC-I2C4-fixes.patch | 258 ----------- ...33-BACKPORT-stm32f7-sdmmc-dcache-fix.patch | 139 ------ .../00034-BACKPORT-stm32f4-I2C-fix.patch | 41 -- nuttx-patches/CMakeLists.txt | 25 +- 10 files changed, 2 insertions(+), 1667 deletions(-) delete mode 100644 nuttx-patches/00026-BACKPORT-stm32fX-serial-fix-freezing.patch delete mode 100644 nuttx-patches/00027-BACKPORT-stm32-sdio-1-bit-and-16G-fix.patch delete mode 100644 nuttx-patches/00028-BACKPORT-mtd-FLASH-corruption.patch delete mode 100644 nuttx-patches/00029-BACKPORT-stm32-serial-upstream-sans-IRQ.patch delete mode 100644 nuttx-patches/00030-BACKPORT-fix-arm-none-eabi-gcc-7-warnings-nuttx.patch delete mode 100644 nuttx-patches/00031-BACKPORT-fix-arm-none-eabi-gcc-7-warnings-apps.patch delete mode 100644 nuttx-patches/00032-BACKPORT-stm32f7-pinmap-FMC-I2C4-fixes.patch delete mode 100644 nuttx-patches/00033-BACKPORT-stm32f7-sdmmc-dcache-fix.patch delete mode 100644 nuttx-patches/00034-BACKPORT-stm32f4-I2C-fix.patch diff --git a/nuttx-patches/00026-BACKPORT-stm32fX-serial-fix-freezing.patch b/nuttx-patches/00026-BACKPORT-stm32fX-serial-fix-freezing.patch deleted file mode 100644 index ebdaafbe1d..0000000000 --- a/nuttx-patches/00026-BACKPORT-stm32fX-serial-fix-freezing.patch +++ /dev/null @@ -1,133 +0,0 @@ -diff --git NuttX/nuttx/arch/arm/src/stm32f7/stm32_serial.c NuttX/nuttx/arch/arm/src/stm32f7/stm32_serial.c -index 1f5445a..faae72a 100644 ---- NuttX/nuttx/arch/arm/src/stm32f7/stm32_serial.c -+++ NuttX/nuttx/arch/arm/src/stm32f7/stm32_serial.c -@@ -1070,10 +1070,10 @@ static inline void up_serialout(struct up_dev_s *priv, int offset, uint32_t valu - } - - /**************************************************************************** -- * Name: up_restoreusartint -+ * Name: up_setusartint - ****************************************************************************/ - --static void up_restoreusartint(struct up_dev_s *priv, uint16_t ie) -+static inline void up_setusartint(struct up_dev_s *priv, uint16_t ie) - { - uint32_t cr; - -@@ -1095,11 +1095,30 @@ static void up_restoreusartint(struct up_dev_s *priv, uint16_t ie) - } - - /**************************************************************************** -+ * Name: up_restoreusartint -+ ****************************************************************************/ -+ -+static void up_restoreusartint(struct up_dev_s *priv, uint16_t ie) -+{ -+ irqstate_t flags; -+ -+ flags = enter_critical_section(); -+ -+ up_setusartint(priv, ie); -+ -+ leave_critical_section(flags); -+} -+ -+/**************************************************************************** - * Name: up_disableusartint - ****************************************************************************/ - --static inline void up_disableusartint(struct up_dev_s *priv, uint16_t *ie) -+static void up_disableusartint(struct up_dev_s *priv, uint16_t *ie) - { -+ irqstate_t flags; -+ -+ flags = enter_critical_section(); -+ - if (ie) - { - uint32_t cr1; -@@ -1136,7 +1155,9 @@ static inline void up_disableusartint(struct up_dev_s *priv, uint16_t *ie) - - /* Disable all interrupts */ - -- up_restoreusartint(priv, 0); -+ up_setusartint(priv, 0); -+ -+ leave_critical_section(flags); - } - - /**************************************************************************** -@@ -2928,6 +2949,7 @@ int up_putc(int ch) - - up_lowputc(ch); - up_restoreusartint(priv, ie); -+ - #endif - return ch; - } -diff --git NuttX/nuttx/arch/arm/src/stm32l4/stm32l4_serial.c NuttX/nuttx/arch/arm/src/stm32l4/stm32l4_serial.c -index dfef76a..8f1fa77 100644 ---- NuttX/nuttx/arch/arm/src/stm32l4/stm32l4_serial.c -+++ NuttX/nuttx/arch/arm/src/stm32l4/stm32l4_serial.c -@@ -783,11 +783,11 @@ static inline void stm32l4serial_putreg(FAR struct stm32l4_serial_s *priv, - } - - /**************************************************************************** -- * Name: stm32l4serial_restoreusartint -+ * Name: stm32l4serial_setusartint - ****************************************************************************/ - --static void stm32l4serial_restoreusartint(FAR struct stm32l4_serial_s *priv, -- uint16_t ie) -+static inline void stm32l4serial_setusartint(FAR struct stm32l4_serial_s *priv, -+ uint16_t ie) - { - uint32_t cr; - -@@ -809,12 +809,32 @@ static void stm32l4serial_restoreusartint(FAR struct stm32l4_serial_s *priv, - } - - /**************************************************************************** -+ * Name: up_restoreusartint -+ ****************************************************************************/ -+ -+static void stm32l4serial_restoreusartint(FAR struct stm32l4_serial_s *priv, -+ uint16_t ie) -+{ -+ irqstate_t flags; -+ -+ flags = enter_critical_section(); -+ -+ stm32l4serial_setusartint(priv, ie); -+ -+ leave_critical_section(flags); -+} -+ -+/**************************************************************************** - * Name: stm32l4serial_disableusartint - ****************************************************************************/ - --static inline void stm32l4serial_disableusartint(FAR struct stm32l4_serial_s *priv, -- FAR uint16_t *ie) -+static void stm32l4serial_disableusartint(FAR struct stm32l4_serial_s *priv, -+ FAR uint16_t *ie) - { -+ irqstate_t flags; -+ -+ flags = enter_critical_section(); -+ - if (ie) - { - uint32_t cr1; -@@ -851,7 +871,9 @@ static inline void stm32l4serial_disableusartint(FAR struct stm32l4_serial_s *pr - - /* Disable all interrupts */ - -- stm32l4serial_restoreusartint(priv, 0); -+ stm32l4serial_setusartint(priv, 0); -+ -+ leave_critical_section(flags); - } - - /**************************************************************************** diff --git a/nuttx-patches/00027-BACKPORT-stm32-sdio-1-bit-and-16G-fix.patch b/nuttx-patches/00027-BACKPORT-stm32-sdio-1-bit-and-16G-fix.patch deleted file mode 100644 index b234e0b4cf..0000000000 --- a/nuttx-patches/00027-BACKPORT-stm32-sdio-1-bit-and-16G-fix.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff --git NuttX/nuttx/arch/arm/src/stm32/stm32_sdio.c NuttX/nuttx/arch/arm/src/stm32/stm32_sdio.c -index 9d93a43..737f42f 100644 ---- NuttX/nuttx/arch/arm/src/stm32/stm32_sdio.c -+++ NuttX/nuttx/arch/arm/src/stm32/stm32_sdio.c -@@ -2573,6 +2573,7 @@ static bool stm32_dmasupported(FAR struct sdio_dev_s *dev) - static int stm32_dmapreflight(FAR struct sdio_dev_s *dev, - FAR const uint8_t *buffer, size_t buflen) - { -+#if !defined(CONFIG_STM32_STM32F40XX) - struct stm32_dev_s *priv = (struct stm32_dev_s *)dev; - - DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0); -@@ -2583,7 +2584,7 @@ static int stm32_dmapreflight(FAR struct sdio_dev_s *dev, - { - return -EINVAL; - } -- -+#endif - /* DMA must be possible to the buffer */ - - if (!stm32_dmacapable((uintptr_t)buffer, (buflen + 3) >> 2, SDIO_RXDMA32_CONFIG)) -diff --git NuttX/nuttx/drivers/mmcsd/mmcsd_sdio.c NuttX/nuttx/drivers/mmcsd/mmcsd_sdio.c -index dbdf4e9..9c93cef 100644 ---- NuttX/nuttx/drivers/mmcsd/mmcsd_sdio.c -+++ NuttX/nuttx/drivers/mmcsd/mmcsd_sdio.c -@@ -857,7 +857,7 @@ static void mmcsd_decodeCID(FAR struct mmcsd_state_s *priv, uint32_t cid[4]) - */ - - decoded.mid = cid[0] >> 24; -- decoded.oid = (cid[0] >> 16) & 0xffff; -+ decoded.oid = (cid[0] >> 8) & 0xffff; - decoded.pnm[0] = cid[0] & 0xff; - - /* Word 2: Bits 64:95 -@@ -893,9 +893,9 @@ static void mmcsd_decodeCID(FAR struct mmcsd_state_s *priv, uint32_t cid[4]) - decoded.mdt = (cid[3] >> 8) & 0x0fff; - decoded.crc = (cid[3] >> 1) & 0x7f; - -- finfo("mid: %02x oid: %04x pnm: %s prv: %d psn: %d mdt: %02x crc: %02x\n", -+ finfo("mid: %02x oid: %04x pnm: %s prv: %d psn: %lu mdt: %02x crc: %02x\n", - decoded.mid, decoded.oid, decoded.pnm, decoded.prv, -- decoded.psn, decoded.mdt, decoded.crc); -+ (unsigned long)decoded.psn, decoded.mdt, decoded.crc); - } - #endif - -@@ -2234,7 +2234,8 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry) - geometry->geo_mediachanged ? "true" : "false", - geometry->geo_writeenabled ? "true" : "false"); - finfo("nsectors: %lu sectorsize: %d\n", -- (long)geometry->geo_nsectors, geometry->geo_sectorsize); -+ ((unsigned long))geometry->geo_nsectors, -+ geometry->geo_sectorsize); - - priv->mediachanged = false; - ret = OK; diff --git a/nuttx-patches/00028-BACKPORT-mtd-FLASH-corruption.patch b/nuttx-patches/00028-BACKPORT-mtd-FLASH-corruption.patch deleted file mode 100644 index 0a06a9c731..0000000000 --- a/nuttx-patches/00028-BACKPORT-mtd-FLASH-corruption.patch +++ /dev/null @@ -1,187 +0,0 @@ -diff --git NuttX/nuttx/drivers/mtd/at25.c NuttX/nuttx/drivers/mtd/at25.c -index 777ff38..c775e52 100644 ---- NuttX/nuttx/drivers/mtd/at25.c -+++ NuttX/nuttx/drivers/mtd/at25.c -@@ -524,6 +524,12 @@ static ssize_t at25_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, - - finfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); - -+ /* Lock the SPI bus NOW because the following call must be executed with -+ * the bus locked. -+ */ -+ -+ at25_lock(priv->dev); -+ - /* Wait for any preceding write to complete. We could simplify things by - * perform this wait at the end of each write operation (rather than at - * the beginning of ALL operations), but have the wait first will slightly -@@ -532,9 +538,8 @@ static ssize_t at25_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes, - - at25_waitwritecomplete(priv); - -- /* Lock the SPI bus and select this FLASH part */ -+ /* Select this FLASH part */ - -- at25_lock(priv->dev); - SPI_SELECT(priv->dev, SPIDEV_FLASH, true); - - /* Send "Read from Memory " instruction */ -diff --git NuttX/nuttx/drivers/mtd/is25xp.c NuttX/nuttx/drivers/mtd/is25xp.c -index 55b677b..4919344 100644 ---- NuttX/nuttx/drivers/mtd/is25xp.c -+++ NuttX/nuttx/drivers/mtd/is25xp.c -@@ -748,6 +748,12 @@ static ssize_t is25xp_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyte - - finfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); - -+ /* Lock the SPI bus NOW because the following call must be executed with -+ * the bus locked. -+ */ -+ -+ is25xp_lock(priv->dev); -+ - /* Wait for any preceding write to complete. We could simplify things by - * perform this wait at the end of each write operation (rather than at - * the beginning of ALL operations), but have the wait first will slightly -@@ -759,9 +765,8 @@ static ssize_t is25xp_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyte - is25xp_waitwritecomplete(priv); - } - -- /* Lock the SPI bus and select this FLASH part */ -+ /* Select this FLASH part */ - -- is25xp_lock(priv->dev); - SPI_SELECT(priv->dev, SPIDEV_FLASH, true); - - /* Send "Read from Memory " instruction */ -@@ -782,6 +787,7 @@ static ssize_t is25xp_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyte - - SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - is25xp_unlock(priv->dev); -+ - finfo("return nbytes: %d\n", (int)nbytes); - return nbytes; - } -diff --git NuttX/nuttx/drivers/mtd/ramtron.c NuttX/nuttx/drivers/mtd/ramtron.c -index ad448c8..23e4ad1 100644 ---- NuttX/nuttx/drivers/mtd/ramtron.c -+++ NuttX/nuttx/drivers/mtd/ramtron.c -@@ -532,14 +532,14 @@ static inline void ramtron_sendaddr(const struct ramtron_dev_s *priv, uint32_t a - * Name: ramtron_pagewrite - ************************************************************************************/ - --static inline int ramtron_pagewrite(struct ramtron_dev_s *priv, FAR const uint8_t *buffer, -- off_t page) -+static inline int ramtron_pagewrite(struct ramtron_dev_s *priv, -+ FAR const uint8_t *buffer, off_t page) - { - off_t offset = page << priv->pageshift; - - finfo("page: %08lx offset: %08lx\n", (long)page, (long)offset); - --#ifndef RAMTRON_WRITEWAIT -+#ifndef CONFIG_RAMTRON_WRITEWAIT - /* Wait for any preceding write to complete. We could simplify things by - * perform this wait at the end of each write operation (rather than at - * the beginning of ALL operations), but have the wait first will slightly -@@ -574,7 +574,7 @@ static inline int ramtron_pagewrite(struct ramtron_dev_s *priv, FAR const uint8_ - SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - finfo("Written\n"); - --#ifdef RAMTRON_WRITEWAIT -+#ifdef CONFIG_RAMTRON_WRITEWAIT - /* Wait for write completion now so we can report any errors to the caller. Thus - * the caller will know whether or not if the data is on stable storage - */ -@@ -657,13 +657,19 @@ static ssize_t ramtron_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyt - FAR uint8_t *buffer) - { - FAR struct ramtron_dev_s *priv = (FAR struct ramtron_dev_s *)dev; --#ifdef RAMTRON_WRITEWAIT -+#ifdef CONFIG_RAMTRON_WRITEWAIT - uint8_t status; - #endif - - finfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); - --#ifndef RAMTRON_WRITEWAIT -+ /* Lock the SPI bus NOW because the ramtron_waitwritecomplete call must be -+ * executed with the bus locked. -+ */ -+ -+ ramtron_lock(priv); -+ -+#ifndef CONFIG_RAMTRON_WRITEWAIT - /* Wait for any preceding write to complete. We could simplify things by - * perform this wait at the end of each write operation (rather than at - * the beginning of ALL operations), but have the wait first will slightly -@@ -673,9 +679,8 @@ static ssize_t ramtron_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyt - (void)ramtron_waitwritecomplete(priv); - #endif - -- /* Lock the SPI bus and select this FLASH part */ -+ /* Select this FLASH part */ - -- ramtron_lock(priv); - SPI_SELECT(priv->dev, SPIDEV_FLASH, true); - - /* Send "Read from Memory " instruction */ -@@ -690,7 +695,7 @@ static ssize_t ramtron_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyt - - SPI_RECVBLOCK(priv->dev, buffer, nbytes); - --#ifdef RAMTRON_WRITEWAIT -+#ifdef CONFIG_RAMTRON_WRITEWAIT - /* Read the status register. This isn't strictly needed, but it gives us a - * chance to detect if SPI transactions are operating correctly, which - * allows us to catch complete device failures in the read path. We expect -diff --git NuttX/nuttx/drivers/mtd/sst25xx.c NuttX/nuttx/drivers/mtd/sst25xx.c -index 9f88348..22d71cc 100644 ---- NuttX/nuttx/drivers/mtd/sst25xx.c -+++ NuttX/nuttx/drivers/mtd/sst25xx.c -@@ -679,7 +679,8 @@ static ssize_t sst25xx_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t - - /* On this device, we can handle the block read just like the byte-oriented read */ - -- nbytes = sst25xx_read(dev, startblock << priv->pageshift, nblocks << priv->pageshift, buffer); -+ nbytes = sst25xx_read(dev, startblock << priv->pageshift, -+ nblocks << priv->pageshift, buffer); - if (nbytes > 0) - { - return nbytes >> priv->pageshift; -@@ -726,6 +727,12 @@ static ssize_t sst25xx_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyt - - finfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); - -+ /* Lock the SPI bus NOW because the following conditional call to -+ * sst25xx_waitwritecomplete must be executed with the bus locked. -+ */ -+ -+ sst25xx_lock(priv->dev); -+ - /* Wait for any preceding write to complete. We could simplify things by - * perform this wait at the end of each write operation (rather than at - * the beginning of ALL operations), but have the wait first will slightly -@@ -737,9 +744,8 @@ static ssize_t sst25xx_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyt - sst25xx_waitwritecomplete(priv); - } - -- /* Lock the SPI bus and select this FLASH part */ -+ /* Select this FLASH part */ - -- sst25xx_lock(priv->dev); - SPI_SELECT(priv->dev, SPIDEV_FLASH, true); - - /* Send "Read from Memory " instruction */ -diff --git NuttX/nuttx/drivers/mtd/w25.c NuttX/nuttx/drivers/mtd/w25.c -index 279525e..22e7ea5 100644 ---- NuttX/nuttx/drivers/mtd/w25.c -+++ NuttX/nuttx/drivers/mtd/w25.c -@@ -1004,6 +1004,7 @@ static ssize_t w25_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t nbl - { - nbytes >>= W25_SECTOR512_SHIFT; - } -+ - #else - nbytes = w25_read(dev, startblock << W25_PAGE_SHIFT, nblocks << W25_PAGE_SHIFT, buffer); - if (nbytes > 0) diff --git a/nuttx-patches/00029-BACKPORT-stm32-serial-upstream-sans-IRQ.patch b/nuttx-patches/00029-BACKPORT-stm32-serial-upstream-sans-IRQ.patch deleted file mode 100644 index ca52ed655f..0000000000 --- a/nuttx-patches/00029-BACKPORT-stm32-serial-upstream-sans-IRQ.patch +++ /dev/null @@ -1,429 +0,0 @@ -diff --git NuttX/nuttx/arch/arm/src/stm32/stm32_serial.c NuttX/nuttx/arch/arm/src/stm32/stm32_serial.c -index 644c810..c3b08b8 100644 ---- NuttX/nuttx/arch/arm/src/stm32/stm32_serial.c -+++ NuttX/nuttx/arch/arm/src/stm32/stm32_serial.c -@@ -1,7 +1,7 @@ - /**************************************************************************** - * arch/arm/src/stm32/stm32_serial.c - * -- * Copyright (C) 2009-2014, 2016 Gregory Nutt. All rights reserved. -+ * Copyright (C) 2009-2014, 2016, 2017 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Redistribution and use in source and binary forms, with or without -@@ -70,6 +70,7 @@ - /**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -+ - /* Some sanity checks *******************************************************/ - /* DMA configuration */ - -@@ -150,7 +151,8 @@ - # endif - - # elif defined(CONFIG_STM32_STM32L15XX) || defined(CONFIG_STM32_STM32F10XX) || \ -- defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F30XX) -+ defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F33XX) || \ -+ defined(CONFIG_STM32_STM32F37XX) - - # if defined(CONFIG_USART1_RXDMA) || defined(CONFIG_USART2_RXDMA) || \ - defined(CONFIG_USART3_RXDMA) -@@ -180,14 +182,21 @@ - * When streaming data, the generic serial layer will be called - * every time the FIFO receives half this number of bytes. - */ -- --# define RXDMA_BUFFER_SIZE 32 -+# if !defined(CONFIG_STM32_SERIAL_RXDMA_BUFFER_SIZE) -+# define CONFIG_STM32_SERIAL_RXDMA_BUFFER_SIZE 32 -+# endif -+# define RXDMA_MUTIPLE 4 -+# define RXDMA_MUTIPLE_MASK (RXDMA_MUTIPLE -1) -+# define RXDMA_BUFFER_SIZE ((CONFIG_STM32_SERIAL_RXDMA_BUFFER_SIZE \ -+ + RXDMA_MUTIPLE_MASK) \ -+ & ~RXDMA_MUTIPLE_MASK) - - /* DMA priority */ - - # ifndef CONFIG_USART_DMAPRIO - # if defined(CONFIG_STM32_STM32L15XX) || defined(CONFIG_STM32_STM32F10XX) || \ -- defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) -+ defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F33XX) || \ -+ defined(CONFIG_STM32_STM32F37XX) - # define CONFIG_USART_DMAPRIO DMA_CCR_PRIMED - # elif defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX) - # define CONFIG_USART_DMAPRIO DMA_SCR_PRIMED -@@ -196,7 +205,8 @@ - # endif - # endif - # if defined(CONFIG_STM32_STM32L15XX) || defined(CONFIG_STM32_STM32F10XX) || \ -- defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) -+ defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F33XX) || \ -+ defined(CONFIG_STM32_STM32F37XX) - # if (CONFIG_USART_DMAPRIO & ~DMA_CCR_PL_MASK) != 0 - # error "Illegal value for CONFIG_USART_DMAPRIO" - # endif -@@ -208,7 +218,7 @@ - # error "Unknown STM32 DMA" - # endif - --/* DMA control words */ -+/* DMA control word */ - - # if defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX) - # define SERIAL_DMA_CONTROL_WORD \ -@@ -220,16 +230,6 @@ - CONFIG_USART_DMAPRIO | \ - DMA_SCR_PBURST_SINGLE | \ - DMA_SCR_MBURST_SINGLE) --# ifdef CONFIG_SERIAL_IFLOWCONTROL --# define SERIAL_DMA_IFLOW_CONTROL_WORD \ -- (DMA_SCR_DIR_P2M | \ -- DMA_SCR_MINC | \ -- DMA_SCR_PSIZE_8BITS | \ -- DMA_SCR_MSIZE_8BITS | \ -- CONFIG_USART_DMAPRIO | \ -- DMA_SCR_PBURST_SINGLE | \ -- DMA_SCR_MBURST_SINGLE) --# endif - # else - # define SERIAL_DMA_CONTROL_WORD \ - (DMA_CCR_CIRC | \ -@@ -237,13 +237,6 @@ - DMA_CCR_PSIZE_8BITS | \ - DMA_CCR_MSIZE_8BITS | \ - CONFIG_USART_DMAPRIO) --# ifdef CONFIG_SERIAL_IFLOWCONTROL --# define SERIAL_DMA_IFLOW_CONTROL_WORD \ -- (DMA_CCR_MINC | \ -- DMA_CCR_PSIZE_8BITS | \ -- DMA_CCR_MSIZE_8BITS | \ -- CONFIG_USART_DMAPRIO) --# endif - # endif - - #endif -@@ -556,7 +549,11 @@ static struct up_dev_s g_usart1priv = - .bits = CONFIG_USART1_BITS, - .stopbits2 = CONFIG_USART1_2STOP, - .baud = CONFIG_USART1_BAUD, -+#if defined(CONFIG_STM32_STM32F33XX) -+ .apbclock = STM32_PCLK1_FREQUENCY, /* Errata 2.5.1 */ -+#else - .apbclock = STM32_PCLK2_FREQUENCY, -+#endif - .usartbase = STM32_USART1_BASE, - .tx_gpio = GPIO_USART1_TX, - .rx_gpio = GPIO_USART1_RX, -@@ -1088,10 +1085,10 @@ static inline void up_serialout(struct up_dev_s *priv, int offset, uint32_t valu - } - - /**************************************************************************** -- * Name: up_restoreusartint -+ * Name: up_setusartint - ****************************************************************************/ - --static void up_restoreusartint(struct up_dev_s *priv, uint16_t ie) -+static inline void up_setusartint(struct up_dev_s *priv, uint16_t ie) - { - uint32_t cr; - -@@ -1113,11 +1110,30 @@ static void up_restoreusartint(struct up_dev_s *priv, uint16_t ie) - } - - /**************************************************************************** -+ * Name: up_restoreusartint -+ ****************************************************************************/ -+ -+static void up_restoreusartint(struct up_dev_s *priv, uint16_t ie) -+{ -+ irqstate_t flags; -+ -+ flags = enter_critical_section(); -+ -+ up_setusartint(priv, ie); -+ -+ leave_critical_section(flags); -+} -+ -+/**************************************************************************** - * Name: up_disableusartint - ****************************************************************************/ - --static inline void up_disableusartint(struct up_dev_s *priv, uint16_t *ie) -+static void up_disableusartint(struct up_dev_s *priv, uint16_t *ie) - { -+ irqstate_t flags; -+ -+ flags = enter_critical_section(); -+ - if (ie) - { - uint32_t cr1; -@@ -1154,7 +1170,9 @@ static inline void up_disableusartint(struct up_dev_s *priv, uint16_t *ie) - - /* Disable all interrupts */ - -- up_restoreusartint(priv, 0); -+ up_setusartint(priv, 0); -+ -+ leave_critical_section(flags); - } - - /**************************************************************************** -@@ -1189,7 +1207,8 @@ static int up_dma_nextrx(struct up_dev_s *priv) - static void up_set_format(struct uart_dev_s *dev) - { - struct up_dev_s *priv = (struct up_dev_s *)dev->priv; --#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) -+#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F33XX) || \ -+ defined(CONFIG_STM32_STM32F37XX) - uint32_t usartdiv8; - #else - uint32_t usartdiv32; -@@ -1203,7 +1222,8 @@ static void up_set_format(struct uart_dev_s *dev) - - regval = up_serialin(priv, STM32_USART_CR1_OFFSET); - --#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) -+#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F33XX)|| \ -+ defined(CONFIG_STM32_STM32F37XX) - /* This first implementation is for U[S]ARTs that support oversampling - * by 8 in additional to the standard oversampling by 16. - * With baud rate of fCK / Divider for oversampling by 16. -@@ -1608,28 +1628,13 @@ static int up_dma_setup(struct uart_dev_s *dev) - - priv->rxdma = stm32_dmachannel(priv->rxdma_channel); - --#ifdef CONFIG_SERIAL_IFLOWCONTROL -- if (priv->iflow) -- { -- /* Configure for non-circular DMA reception into the RX FIFO */ -- -- stm32_dmasetup(priv->rxdma, -- priv->usartbase + STM32_USART_RDR_OFFSET, -- (uint32_t)priv->rxfifo, -- RXDMA_BUFFER_SIZE, -- SERIAL_DMA_IFLOW_CONTROL_WORD); -- } -- else --#endif -- { -- /* Configure for circular DMA reception into the RX FIFO */ -+ /* Configure for circular DMA reception into the RX fifo */ - -- stm32_dmasetup(priv->rxdma, -- priv->usartbase + STM32_USART_RDR_OFFSET, -- (uint32_t)priv->rxfifo, -- RXDMA_BUFFER_SIZE, -- SERIAL_DMA_CONTROL_WORD); -- } -+ stm32_dmasetup(priv->rxdma, -+ priv->usartbase + STM32_USART_RDR_OFFSET, -+ (uint32_t)priv->rxfifo, -+ RXDMA_BUFFER_SIZE, -+ SERIAL_DMA_CONTROL_WORD); - - /* Reset our DMA shadow pointer to match the address just - * programmed above. -@@ -1643,26 +1648,12 @@ static int up_dma_setup(struct uart_dev_s *dev) - regval |= USART_CR3_DMAR; - up_serialout(priv, STM32_USART_CR3_OFFSET, regval); - --#ifdef CONFIG_SERIAL_IFLOWCONTROL -- if (priv->iflow) -- { -- /* Start the DMA channel, and arrange for callbacks at the full point -- * in the FIFO. After buffer gets full, hardware flow-control kicks -- * in and DMA transfer is stopped. -- */ -- -- stm32_dmastart(priv->rxdma, up_dma_rxcallback, (void *)priv, false); -- } -- else --#endif -- { -- /* Start the DMA channel, and arrange for callbacks at the half and -- * full points in the FIFO. This ensures that we have half a FIFO -- * worth of time to claim bytes before they are overwritten. -- */ -+ /* Start the DMA channel, and arrange for callbacks at the half and -+ * full points in the FIFO. This ensures that we have half a FIFO -+ * worth of time to claim bytes before they are overwritten. -+ */ - -- stm32_dmastart(priv->rxdma, up_dma_rxcallback, (void *)priv, true); -- } -+ stm32_dmastart(priv->rxdma, up_dma_rxcallback, (void *)priv, true); - - return OK; - } -@@ -1789,6 +1780,7 @@ static int up_attach(struct uart_dev_s *dev) - - up_enable_irq(priv->irq); - } -+ - return ret; - } - -@@ -1900,7 +1892,8 @@ static int up_interrupt_common(struct up_dev_s *priv) - - else if ((priv->sr & (USART_SR_ORE | USART_SR_NE | USART_SR_FE)) != 0) - { --#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) -+#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F33XX) || \ -+ defined(CONFIG_STM32_STM32F37XX) - /* These errors are cleared by writing the corresponding bit to the - * interrupt clear register (ICR). - */ -@@ -1945,11 +1938,11 @@ static int up_interrupt_common(struct up_dev_s *priv) - static int up_ioctl(struct file *filep, int cmd, unsigned long arg) - { - #if defined(CONFIG_SERIAL_TERMIOS) || defined(CONFIG_SERIAL_TIOCSERGSTRUCT) \ -- || defined(CONFIG_STM32F7_SERIALBRK_BSDCOMPAT) -+ || defined(CONFIG_STM32_SERIALBRK_BSDCOMPAT) - struct inode *inode = filep->f_inode; - struct uart_dev_s *dev = inode->i_private; - #endif --#if defined(CONFIG_SERIAL_TERMIOS) || defined(CONFIG_STM32F7_SERIALBRK_BSDCOMPAT) -+#if defined(CONFIG_SERIAL_TERMIOS) || defined(CONFIG_STM32_SERIALBRK_BSDCOMPAT) - struct up_dev_s *priv = (struct up_dev_s *)dev->priv; - #endif - int ret = OK; -@@ -2316,9 +2309,11 @@ static bool up_rxflowcontrol(struct uart_dev_s *dev, - unsigned int nbuffered, bool upper) - { - struct up_dev_s *priv = (struct up_dev_s *)dev->priv; -+#if !(defined(CONFIG_SERIAL_IFLOWCONTROL_WATERMARKS) && defined(CONFIG_STM32_FLOWCONTROL_BROKEN)) -+ uint16_t ie; -+#endif - --#if defined(CONFIG_SERIAL_IFLOWCONTROL_WATERMARKS) && \ -- defined(CONFIG_STM32_FLOWCONTROL_BROKEN) -+#if defined(CONFIG_SERIAL_IFLOWCONTROL_WATERMARKS) && defined(CONFIG_STM32_FLOWCONTROL_BROKEN) - if (priv->iflow && (priv->rts_gpio != 0)) - { - /* Assert/de-assert nRTS set it high resume/stop sending */ -@@ -2346,7 +2341,9 @@ static bool up_rxflowcontrol(struct uart_dev_s *dev, - * enable Rx interrupts. - */ - -- uart_disablerxint(dev); -+ ie = priv->ie; -+ ie &= ~USART_CR1_RXNEIE; -+ up_restoreusartint(priv, ie); - return true; - } - -@@ -2359,7 +2356,7 @@ static bool up_rxflowcontrol(struct uart_dev_s *dev, - * received. - */ - -- uart_enablerxint(dev); -+ up_rxint(dev, true); - } - } - #endif -@@ -2391,18 +2388,7 @@ static int up_dma_receive(struct uart_dev_s *dev, unsigned int *status) - priv->rxdmanext++; - if (priv->rxdmanext == RXDMA_BUFFER_SIZE) - { --#ifdef CONFIG_SERIAL_IFLOWCONTROL -- if (priv->iflow) -- { -- /* RX DMA buffer full. RX paused, RTS line pulled up to prevent -- * more input data from other end. -- */ -- } -- else --#endif -- { -- priv->rxdmanext = 0; -- } -+ priv->rxdmanext = 0; - } - } - -@@ -2411,40 +2397,6 @@ static int up_dma_receive(struct uart_dev_s *dev, unsigned int *status) - #endif - - /**************************************************************************** -- * Name: up_dma_reenable -- * -- * Description: -- * Call to re-enable RX DMA. -- * -- ****************************************************************************/ -- --#if defined(SERIAL_HAVE_DMA) && defined(CONFIG_SERIAL_IFLOWCONTROL) --static void up_dma_reenable(struct up_dev_s *priv) --{ -- /* Configure for non-circular DMA reception into the RX fifo */ -- -- stm32_dmasetup(priv->rxdma, -- priv->usartbase + STM32_USART_RDR_OFFSET, -- (uint32_t)priv->rxfifo, -- RXDMA_BUFFER_SIZE, -- SERIAL_DMA_IFLOW_CONTROL_WORD); -- -- /* Reset our DMA shadow pointer to match the address just -- * programmed above. -- */ -- -- priv->rxdmanext = 0; -- -- /* Start the DMA channel, and arrange for callbacks at the full point in -- * the FIFO. After buffer gets full, hardware flow-control kicks in and -- * DMA transfer is stopped. -- */ -- -- stm32_dmastart(priv->rxdma, up_dma_rxcallback, (void *)priv, false); --} --#endif -- --/**************************************************************************** - * Name: up_dma_rxint - * - * Description: -@@ -2466,15 +2418,6 @@ static void up_dma_rxint(struct uart_dev_s *dev, bool enable) - */ - - priv->rxenable = enable; -- --#ifdef CONFIG_SERIAL_IFLOWCONTROL -- if (priv->iflow && priv->rxenable && (priv->rxdmanext == RXDMA_BUFFER_SIZE)) -- { -- /* Re-enable RX DMA. */ -- -- up_dma_reenable(priv); -- } --#endif - } - #endif - -@@ -2683,16 +2626,6 @@ static void up_dma_rxcallback(DMA_HANDLE handle, uint8_t status, void *arg) - if (priv->rxenable && up_dma_rxavailable(&priv->dev)) - { - uart_recvchars(&priv->dev); -- --#ifdef CONFIG_SERIAL_IFLOWCONTROL -- if (priv->iflow && priv->rxenable && -- (priv->rxdmanext == RXDMA_BUFFER_SIZE)) -- { -- /* Re-enable RX DMA. */ -- -- up_dma_reenable(priv); -- } --#endif - } - } - #endif -@@ -2791,6 +2724,7 @@ static void up_pm_notify(struct pm_callback_s *cb, int domain, - * return non-zero values when reverting back to higher power - * consumption modes! - * -+ * - ****************************************************************************/ - - #ifdef CONFIG_PM diff --git a/nuttx-patches/00030-BACKPORT-fix-arm-none-eabi-gcc-7-warnings-nuttx.patch b/nuttx-patches/00030-BACKPORT-fix-arm-none-eabi-gcc-7-warnings-nuttx.patch deleted file mode 100644 index f49abc80ef..0000000000 --- a/nuttx-patches/00030-BACKPORT-fix-arm-none-eabi-gcc-7-warnings-nuttx.patch +++ /dev/null @@ -1,330 +0,0 @@ -diff --git NuttX/nuttx/fs/vfs/fs_lseek.c NuttX/nuttx/fs/vfs/fs_lseek.c -index be74239eca..bea398c0a3 100644 ---- NuttX/nuttx/fs/vfs/fs_lseek.c -+++ NuttX/nuttx/fs/vfs/fs_lseek.c -@@ -99,7 +99,7 @@ off_t file_seek(FAR struct file *filep, off_t offset, int whence) - { - case SEEK_CUR: - offset += filep->f_pos; -- -+ /* FALLTHROUGH */ - case SEEK_SET: - if (offset >= 0) - { -diff --git NuttX/nuttx/libc/stdio/lib_sscanf.c NuttX/nuttx/libc/stdio/lib_sscanf.c -index 0bc413295b..f2b9a8d4e8 100644 ---- NuttX/nuttx/libc/stdio/lib_sscanf.c -+++ NuttX/nuttx/libc/stdio/lib_sscanf.c -@@ -417,6 +417,7 @@ int vsscanf(FAR const char *buf, FAR const char *fmt, va_list ap) - default: - case 'd': - sign = true; -+ /* FALLTHROUGH */ - case 'u': - base = 10; - break; -diff --git NuttX/nuttx/libc/stdlib/lib_strtod.c NuttX/nuttx/libc/stdlib/lib_strtod.c -index 62da9e0f6e..af830abf50 100644 ---- NuttX/nuttx/libc/stdlib/lib_strtod.c -+++ NuttX/nuttx/libc/stdlib/lib_strtod.c -@@ -113,8 +113,10 @@ double strtod(FAR const char *str, FAR char **endptr) - { - case '-': - negative = 1; /* Fall through to increment position */ -+ /* FALLTHROUGH */ - case '+': - p++; -+ /* FALLTHROUGH */ - default: - break; - } -@@ -175,8 +177,10 @@ double strtod(FAR const char *str, FAR char **endptr) - { - case '-': - negative = 1; /* Fall through to increment pos */ -+ /* FALLTHROUGH */ - case '+': - p++; -+ /* FALLTHROUGH */ - default: - break; - } -diff --git NuttX/nuttx/libc/stdlib/lib_strtof.c NuttX/nuttx/libc/stdlib/lib_strtof.c -index 467842f4e6..6571e2d77e 100644 ---- NuttX/nuttx/libc/stdlib/lib_strtof.c -+++ NuttX/nuttx/libc/stdlib/lib_strtof.c -@@ -115,8 +115,10 @@ float strtof(FAR const char *str, FAR char **endptr) - { - case '-': - negative = 1; /* Fall through to increment position */ -+ /* FALLTHROUGH */ - case '+': - p++; -+ /* FALLTHROUGH */ - default: - break; - } -@@ -177,8 +179,10 @@ float strtof(FAR const char *str, FAR char **endptr) - { - case '-': - negative = 1; /* Fall through to increment pos */ -+ /* FALLTHROUGH */ - case '+': - p++; -+ /* FALLTHROUGH */ - default: - break; - } -diff --git NuttX/nuttx/libc/stdlib/lib_strtold.c NuttX/nuttx/libc/stdlib/lib_strtold.c -index c306392cec..ac9368e893 100644 ---- NuttX/nuttx/libc/stdlib/lib_strtold.c -+++ NuttX/nuttx/libc/stdlib/lib_strtold.c -@@ -113,8 +113,10 @@ long double strtold(FAR const char *str, FAR char **endptr) - { - case '-': - negative = 1; /* Fall through to increment position */ -+ /* FALLTHROUGH */ - case '+': - p++; -+ /* FALLTHROUGH */ - default: - break; - } -@@ -175,8 +177,10 @@ long double strtold(FAR const char *str, FAR char **endptr) - { - case '-': - negative = 1; /* Fall through to increment pos */ -+ /* FALLTHROUGH */ - case '+': - p++; -+ /* FALLTHROUGH */ - default: - break; - } -diff --git NuttX/nuttx/libc/stdio/lib_dtoa.c NuttX/nuttx/libc/stdio/lib_dtoa.c -index 8ddc3bfd35..0cc3b48fdd 100644 ---- NuttX/nuttx/libc/stdio/lib_dtoa.c -+++ NuttX/nuttx/libc/stdio/lib_dtoa.c -@@ -591,6 +591,7 @@ static int cmp(Bigint * a, Bigint * b) - break; - } - } -+ - return 0; - } - -@@ -784,6 +785,7 @@ static Bigint *d2b(double d, int *e, int *bits) - } - while (!x[i]) - --i; -+ - b->wds = i + 1; - #endif - if (de) -@@ -817,11 +819,6 @@ static const double bigtens[] = - 1e16, 1e32, 1e64, 1e128, 1e256 - }; - --static const double tinytens[] = --{ -- 1e-16, 1e-32, 1e-64, 1e-128, 1e-256 --}; -- - # define n_bigtens 5 - #else - static const double bigtens[] = -@@ -829,11 +826,6 @@ static const double bigtens[] = - 1e16, 1e32 - }; - --static const double tinytens[] = --{ -- 1e-16, 1e-32 --}; -- - # define n_bigtens 2 - #endif - -@@ -849,12 +841,14 @@ static int quorem(Bigint * b, Bigint * S) - #endif - - n = S->wds; -+ - #ifdef CONFIG_DEBUG_LIB - if (b->wds > n) - { - lerr("ERROR: oversize b in quorem\n"); - } - #endif -+ - if (b->wds < n) - { - return 0; -@@ -865,17 +859,19 @@ static int quorem(Bigint * b, Bigint * S) - bx = b->x; - bxe = bx + n; - q = *bxe / (*sxe + 1); /* ensure q <= true quotient */ -+ - #ifdef CONFIG_DEBUG_LIB - if (q > 9) -- { -- lerr("ERROR: oversized quotient in quorem\n"); -- } -+ { -+ lerr("ERROR: oversized quotient in quorem\n"); -+ } - #endif - - if (q) - { - borrow = 0; - carry = 0; -+ - do - { - #ifdef Pack_32 -@@ -912,6 +908,7 @@ static int quorem(Bigint * b, Bigint * S) - b->wds = n; - } - } -+ - if (cmp(b, S) >= 0) - { - q++; -@@ -919,6 +916,7 @@ static int quorem(Bigint * b, Bigint * S) - carry = 0; - bx = b->x; - sx = S->x; -+ - do - { - #ifdef Pack_32 -@@ -943,12 +941,14 @@ static int quorem(Bigint * b, Bigint * S) - #endif - } - while (sx <= sxe); -+ - bx = b->x; - bxe = bx + n; - if (!*bxe) - { - while (--bxe > bx && !*bxe) - --n; -+ - b->wds = n; - } - } -@@ -1041,7 +1041,8 @@ char *__dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve) - - if (word0(d) & Sign_bit) - { -- /* set sign for everything, including 0's and NaNs */ -+ /* Set sign for everything, including 0's and NaNs */ -+ - *sign = 1; - word0(d) &= ~Sign_bit; /* clear sign bit */ - } -@@ -1058,6 +1059,7 @@ char *__dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve) - #endif - { - /* Infinity or NaN */ -+ - *decpt = 9999; - s = - #ifdef IEEE_Arith -@@ -1076,6 +1078,7 @@ char *__dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve) - return s; - } - #endif -+ - if (!d) - { - *decpt = 1; -@@ -1190,7 +1193,7 @@ char *__dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve) - - case 2: - leftright = 0; -- /* no break */ -+ /* FALLTHROUGH */ - case 4: - if (ndigits <= 0) - { -@@ -1202,7 +1205,7 @@ char *__dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve) - - case 3: - leftright = 0; -- /* no break */ -+ /* FALLTHROUGH */ - case 5: - i = ndigits + k + 1; - ilim = i; -@@ -1241,7 +1244,8 @@ char *__dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve) - - if (j & Bletch) - { -- /* prevent overflows */ -+ /* Prevent overflows */ -+ - j &= Bletch - 1; - d /= bigtens[n_bigtens - 1]; - ieps++; -@@ -1292,8 +1296,10 @@ char *__dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve) - d -= 5.; - if (d > eps) - goto one_digit; -+ - if (d < -eps) - goto no_digits; -+ - goto fast_failed; - } - -@@ -1357,6 +1363,7 @@ char *__dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve) - #ifndef No_leftright - } - #endif -+ - fast_failed: - s = s0; - d = d2; -@@ -1386,8 +1393,10 @@ char *__dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve) - { - L = (int)(d / ds); - d -= L * ds; -+ - #ifdef Check_FLT_ROUNDS - /* If FLT_ROUNDS == 2, L will usually be high by 1 */ -+ - if (d < 0) - { - L--; -@@ -1411,6 +1420,7 @@ char *__dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve) - - ++*s++; - } -+ - break; - } - -@@ -1500,6 +1510,7 @@ char *__dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve) - if (!word1(d) && !(word0(d) & Bndry_mask) && word0(d) & Exp_mask) - { - /* The special case */ -+ - b2 += Log2P; - s2 += Log2P; - spec_case = 1; -diff --git NuttX/nuttx/drivers/mmcsd/mmcsd_spi.c NuttX/nuttx/drivers/mmcsd/mmcsd_spi.c -index 2a4cdee73d..c50c3b1456 100644 ---- NuttX/nuttx/drivers/mmcsd/mmcsd_spi.c -+++ b/drivers/mmcsd/mmcsd_spi.c -@@ -326,7 +326,9 @@ static const struct mmcsd_cmdinfo_s g_cmd0 = {CMD0, MMCSD_CMDRESP_R1, 0x95}; - static const struct mmcsd_cmdinfo_s g_cmd1 = {CMD1, MMCSD_CMDRESP_R1, 0xff}; - static const struct mmcsd_cmdinfo_s g_cmd8 = {CMD8, MMCSD_CMDRESP_R7, 0x87}; - static const struct mmcsd_cmdinfo_s g_cmd9 = {CMD9, MMCSD_CMDRESP_R1, 0xff}; -+#if 0 /*not used */ - static const struct mmcsd_cmdinfo_s g_cmd10 = {CMD10, MMCSD_CMDRESP_R1, 0xff}; -+#endif - static const struct mmcsd_cmdinfo_s g_cmd12 = {CMD12, MMCSD_CMDRESP_R1, 0xff}; - static const struct mmcsd_cmdinfo_s g_cmd16 = {CMD16, MMCSD_CMDRESP_R1, 0xff}; - static const struct mmcsd_cmdinfo_s g_cmd17 = {CMD17, MMCSD_CMDRESP_R1, 0xff}; diff --git a/nuttx-patches/00031-BACKPORT-fix-arm-none-eabi-gcc-7-warnings-apps.patch b/nuttx-patches/00031-BACKPORT-fix-arm-none-eabi-gcc-7-warnings-apps.patch deleted file mode 100644 index 3cf50b9fef..0000000000 --- a/nuttx-patches/00031-BACKPORT-fix-arm-none-eabi-gcc-7-warnings-apps.patch +++ /dev/null @@ -1,71 +0,0 @@ ---- NuttX/apps/nshlib/nsh_syscmds.c -+++ NuttX/apps/nshlib/nsh_syscmds.c -@@ -86,7 +86,9 @@ - * Private Data - ****************************************************************************/ - -+#ifndef CONFIG_NSH_DISABLE_UNAME - static const char g_unknown[] = "unknown"; -+#endif - - /**************************************************************************** - * Public Functions -diff --git NuttX/apps/nshlib/nsh_proccmds.c b/nshlib/nsh_proccmds.c -index 116dd96d..abd37970 100644 ---- NuttX/apps/nshlib/nsh_proccmds.c -+++ NuttX/apps/nshlib/nsh_proccmds.c -@@ -108,24 +108,30 @@ struct nsh_taskstatus_s - - /* Status strings */ - -+#ifndef CONFIG_NSH_DISABLE_PS - #if 0 /* Not used */ - static const char g_name[] = "Name:"; - #endif -+ - static const char g_type[] = "Type:"; -+ - #ifdef CONFIG_SCHED_HAVE_PARENT - #ifdef HAVE_GROUPID - static const char g_groupid[] = "Group:"; - #else - static const char g_ppid[] = "PPID:"; - #endif --#endif -+#endif /* CONFIG_SCHED_HAVE_PARENT */ -+ - #ifdef CONFIG_SMP - static const char g_cpu[] = "CPU:"; - #endif -+ - static const char g_state[] = "State:"; - static const char g_flags[] = "Flags:"; - static const char g_priority[] = "Priority:"; - static const char g_scheduler[] = "Scheduler:"; -+ - #ifndef CONFIG_DISABLE_SIGNALS - static const char g_sigmask[] = "SigMask:"; - #endif -@@ -135,7 +141,8 @@ static const char g_stacksize[] = "StackSize:"; - #ifdef CONFIG_STACK_COLORATION - static const char g_stackused[] = "StackUsed:"; - #endif --#endif -+#endif /* !CONFIG_NSH_DISABLE_PSSTACKUSAGE */ -+#endif /* !CONFIG_NSH_DISABLE_PS */ - - /**************************************************************************** - * Private Functions -@@ -471,10 +478,10 @@ static int ps_callback(FAR struct nsh_vtbl_s *vtbl, FAR const char *dirpath, - } - } - -- nsh_output(vtbl, "%6.6u ", (unsigned int)stack_size); -+ nsh_output(vtbl, "%06u ", (unsigned int)stack_size); - - #ifdef CONFIG_STACK_COLORATION -- nsh_output(vtbl, "%6.6u ", (unsigned int)stack_used); -+ nsh_output(vtbl, "%06u ", (unsigned int)stack_used); - - stack_filled = 0; - if (stack_size > 0 && stack_used > 0) diff --git a/nuttx-patches/00032-BACKPORT-stm32f7-pinmap-FMC-I2C4-fixes.patch b/nuttx-patches/00032-BACKPORT-stm32f7-pinmap-FMC-I2C4-fixes.patch deleted file mode 100644 index 2b4a7c66e9..0000000000 --- a/nuttx-patches/00032-BACKPORT-stm32f7-pinmap-FMC-I2C4-fixes.patch +++ /dev/null @@ -1,258 +0,0 @@ -diff --git NuttX/nuttx/arch/arm/src/stm32f7/chip/stm32f74xx75xx_pinmap.h NuttX/nuttx/arch/arm/src/stm32f7/chip/stm32f74xx75xx_pinmap.h -index efc3b1c..aaa3875 100644 ---- NuttX/nuttx/arch/arm/src/stm32f7/chip/stm32f74xx75xx_pinmap.h -+++ NuttX/nuttx/arch/arm/src/stm32f7/chip/stm32f74xx75xx_pinmap.h -@@ -552,12 +552,12 @@ - #define GPIO_I2C3_SMBA_1 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN9) - #define GPIO_I2C3_SMBA_2 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN9) - --#define GPIO_I2C4_SCL_1 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN12) --#define GPIO_I2C4_SCL_2 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN14) --#define GPIO_I2C4_SCL_3 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN11) --#define GPIO_I2C4_SDA_1 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN13) --#define GPIO_I2C4_SDA_2 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN15) --#define GPIO_I2C4_SDA_3 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN12) -+#define GPIO_I2C4_SCL_1 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTD|GPIO_PIN12) -+#define GPIO_I2C4_SCL_2 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTF|GPIO_PIN14) -+#define GPIO_I2C4_SCL_3 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTH|GPIO_PIN11) -+#define GPIO_I2C4_SDA_1 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTD|GPIO_PIN13) -+#define GPIO_I2C4_SDA_2 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTF|GPIO_PIN15) -+#define GPIO_I2C4_SDA_3 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTH|GPIO_PIN12) - #define GPIO_I2C4_SMBA_1 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN11) - #define GPIO_I2C4_SMBA_2 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN13) - #define GPIO_I2C4_SMBA_3 (GPIO_ALT|GPIO_AF4|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN10) -diff --git NuttX/nuttx/arch/arm/src/stm32f7/chip/stm32f76xx77xx_pinmap.h NuttX/nuttx/arch/arm/src/stm32f7/chip/stm32f76xx77xx_pinmap.h -index c5d1b50..7d6ac46 100644 ---- NuttX/nuttx/arch/arm/src/stm32f7/chip/stm32f76xx77xx_pinmap.h -+++ NuttX/nuttx/arch/arm/src/stm32f7/chip/stm32f76xx77xx_pinmap.h -@@ -492,105 +492,105 @@ - #define GPIO_PK6_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTK|GPIO_PIN6) - #define GPIO_PK7_EVENTOUT (GPIO_ALT|GPIO_AF15|GPIO_PORTK|GPIO_PIN7) - --/* Flexible Static Memory Controller (FSMC) */ -- --#define GPIO_FSMC_A0 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN0) --#define GPIO_FSMC_A1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN1) --#define GPIO_FSMC_A2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN2) --#define GPIO_FSMC_A3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN3) --#define GPIO_FSMC_A4 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN4) --#define GPIO_FSMC_A5 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN5) --#define GPIO_FSMC_A6 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN12) --#define GPIO_FSMC_A7 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN13) --#define GPIO_FSMC_A8 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN14) --#define GPIO_FSMC_A9 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN15) --#define GPIO_FSMC_A10 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN0) --#define GPIO_FSMC_A11 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN1) --#define GPIO_FSMC_A12 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN2) --#define GPIO_FSMC_A13 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN3) --#define GPIO_FSMC_A14 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN4) --#define GPIO_FSMC_A15 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN5) --#define GPIO_FSMC_A16 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN11) --#define GPIO_FSMC_A17 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN12) --#define GPIO_FSMC_A18 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN13) --#define GPIO_FSMC_A19 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN3) --#define GPIO_FSMC_A20 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN4) --#define GPIO_FSMC_A21 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN5) --#define GPIO_FSMC_A22 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN6) --#define GPIO_FSMC_A23 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN2) --#define GPIO_FSMC_A24 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN13) --#define GPIO_FSMC_A25 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN14) --#define GPIO_FSMC_ALE (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN12) --#define GPIO_FSMC_BA0 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN4) --#define GPIO_FSMC_BA1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN5) --#define GPIO_FSMC_CLE (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN11) --#define GPIO_FSMC_CLK (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN3) --#define GPIO_FSMC_D0 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN14) --#define GPIO_FSMC_D1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN15) --#define GPIO_FSMC_D2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN0) --#define GPIO_FSMC_D3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN1) --#define GPIO_FSMC_D4 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN7) --#define GPIO_FSMC_D5 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN8) --#define GPIO_FSMC_D6 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN9) --#define GPIO_FSMC_D7 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN10) --#define GPIO_FSMC_D8 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN11) --#define GPIO_FSMC_D9 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN12) --#define GPIO_FSMC_D10 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN13) --#define GPIO_FSMC_D11 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN14) --#define GPIO_FSMC_D12 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN15) --#define GPIO_FSMC_D13 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN8) --#define GPIO_FSMC_D14 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN9) --#define GPIO_FSMC_D15 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN10) --#define GPIO_FSMC_D16 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN8) --#define GPIO_FSMC_D17 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN9) --#define GPIO_FSMC_D18 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN10) --#define GPIO_FSMC_D19 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN11) --#define GPIO_FSMC_D20 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN12) --#define GPIO_FSMC_D21 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN13) --#define GPIO_FSMC_D22 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN14) --#define GPIO_FSMC_D23 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN15) --#define GPIO_FSMC_D24 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN0) --#define GPIO_FSMC_D25 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN1) --#define GPIO_FSMC_D26 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN2) --#define GPIO_FSMC_D27 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN3) --#define GPIO_FSMC_D28 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN6) --#define GPIO_FSMC_D29 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN7) --#define GPIO_FSMC_D30 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN9) --#define GPIO_FSMC_D31 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN10) --#define GPIO_FSMC_INT (GPIO_ALT|GPIO_AF12|GPIO_PORTG|GPIO_PIN7) --#define GPIO_FSMC_NBL0 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN0) --#define GPIO_FSMC_NBL1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN1) --#define GPIO_FSMC_NBL2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN4) --#define GPIO_FSMC_NBL3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN5) --#define GPIO_FSMC_NCE_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN9) --#define GPIO_FSMC_NCE_2 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN8) --#define GPIO_FSMC_NE1_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN7) --#define GPIO_FSMC_NE1_2 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN7) --#define GPIO_FSMC_NE2_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN9) --#define GPIO_FSMC_NE2_2 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN8) --#define GPIO_FSMC_NE3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN10) --#define GPIO_FSMC_NE4 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN12) --#define GPIO_FSMC_NL (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTB|GPIO_PIN7) --#define GPIO_FSMC_NOE (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN4) --#define GPIO_FSMC_NWAIT_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN6) --#define GPIO_FSMC_NWAIT_2 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN6) --#define GPIO_FSMC_NWE (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN5) --#define GPIO_FSMC_SDCKE0_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN3) --#define GPIO_FSMC_SDCKE0_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN5) --#define GPIO_FSMC_SDCKE0_3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN2) --#define GPIO_FSMC_SDCKE1_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTB|GPIO_PIN5) --#define GPIO_FSMC_SDCKE1_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN7) --#define GPIO_FSMC_SDCLK (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN8) --#define GPIO_FSMC_SDNCAS (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN15) --#define GPIO_FSMC_SDNE0_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN2) --#define GPIO_FSMC_SDNE0_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN4) --#define GPIO_FSMC_SDNE0_3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN3) --#define GPIO_FSMC_SDNE1_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTB|GPIO_PIN6) --#define GPIO_FSMC_SDNE1_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN6) --#define GPIO_FSMC_SDNRAS (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN11) --#define GPIO_FSMC_SDNWE_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTA|GPIO_PIN7) --#define GPIO_FSMC_SDNWE_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN0) --#define GPIO_FSMC_SDNWE_3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN5) -+/* Flexible Static Memory Controller (FMC) */ -+ -+#define GPIO_FMC_A0 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN0) -+#define GPIO_FMC_A1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN1) -+#define GPIO_FMC_A2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN2) -+#define GPIO_FMC_A3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN3) -+#define GPIO_FMC_A4 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN4) -+#define GPIO_FMC_A5 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN5) -+#define GPIO_FMC_A6 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN12) -+#define GPIO_FMC_A7 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN13) -+#define GPIO_FMC_A8 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN14) -+#define GPIO_FMC_A9 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN15) -+#define GPIO_FMC_A10 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN0) -+#define GPIO_FMC_A11 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN1) -+#define GPIO_FMC_A12 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN2) -+#define GPIO_FMC_A13 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN3) -+#define GPIO_FMC_A14 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN4) -+#define GPIO_FMC_A15 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN5) -+#define GPIO_FMC_A16 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN11) -+#define GPIO_FMC_A17 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN12) -+#define GPIO_FMC_A18 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN13) -+#define GPIO_FMC_A19 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN3) -+#define GPIO_FMC_A20 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN4) -+#define GPIO_FMC_A21 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN5) -+#define GPIO_FMC_A22 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN6) -+#define GPIO_FMC_A23 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN2) -+#define GPIO_FMC_A24 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN13) -+#define GPIO_FMC_A25 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN14) -+#define GPIO_FMC_ALE (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN12) -+#define GPIO_FMC_BA0 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN4) -+#define GPIO_FMC_BA1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN5) -+#define GPIO_FMC_CLE (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN11) -+#define GPIO_FMC_CLK (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN3) -+#define GPIO_FMC_D0 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN14) -+#define GPIO_FMC_D1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN15) -+#define GPIO_FMC_D2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN0) -+#define GPIO_FMC_D3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN1) -+#define GPIO_FMC_D4 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN7) -+#define GPIO_FMC_D5 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN8) -+#define GPIO_FMC_D6 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN9) -+#define GPIO_FMC_D7 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN10) -+#define GPIO_FMC_D8 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN11) -+#define GPIO_FMC_D9 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN12) -+#define GPIO_FMC_D10 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN13) -+#define GPIO_FMC_D11 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN14) -+#define GPIO_FMC_D12 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN15) -+#define GPIO_FMC_D13 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN8) -+#define GPIO_FMC_D14 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN9) -+#define GPIO_FMC_D15 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN10) -+#define GPIO_FMC_D16 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN8) -+#define GPIO_FMC_D17 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN9) -+#define GPIO_FMC_D18 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN10) -+#define GPIO_FMC_D19 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN11) -+#define GPIO_FMC_D20 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN12) -+#define GPIO_FMC_D21 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN13) -+#define GPIO_FMC_D22 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN14) -+#define GPIO_FMC_D23 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN15) -+#define GPIO_FMC_D24 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN0) -+#define GPIO_FMC_D25 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN1) -+#define GPIO_FMC_D26 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN2) -+#define GPIO_FMC_D27 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN3) -+#define GPIO_FMC_D28 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN6) -+#define GPIO_FMC_D29 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN7) -+#define GPIO_FMC_D30 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN9) -+#define GPIO_FMC_D31 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN10) -+#define GPIO_FMC_INT (GPIO_ALT|GPIO_AF12|GPIO_PORTG|GPIO_PIN7) -+#define GPIO_FMC_NBL0 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN0) -+#define GPIO_FMC_NBL1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN1) -+#define GPIO_FMC_NBL2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN4) -+#define GPIO_FMC_NBL3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTI|GPIO_PIN5) -+#define GPIO_FMC_NCE_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN9) -+#define GPIO_FMC_NCE_2 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN8) -+#define GPIO_FMC_NE1_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN7) -+#define GPIO_FMC_NE1_2 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN7) -+#define GPIO_FMC_NE2_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN9) -+#define GPIO_FMC_NE2_2 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN8) -+#define GPIO_FMC_NE3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN10) -+#define GPIO_FMC_NE4 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN12) -+#define GPIO_FMC_NL (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTB|GPIO_PIN7) -+#define GPIO_FMC_NOE (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN4) -+#define GPIO_FMC_NWAIT_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN6) -+#define GPIO_FMC_NWAIT_2 (GPIO_ALT|GPIO_AF9 |GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN6) -+#define GPIO_FMC_NWE (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTD|GPIO_PIN5) -+#define GPIO_FMC_SDCKE0_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN3) -+#define GPIO_FMC_SDCKE0_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN5) -+#define GPIO_FMC_SDCKE0_3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN2) -+#define GPIO_FMC_SDCKE1_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTB|GPIO_PIN5) -+#define GPIO_FMC_SDCKE1_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN7) -+#define GPIO_FMC_SDCLK (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN8) -+#define GPIO_FMC_SDNCAS (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTG|GPIO_PIN15) -+#define GPIO_FMC_SDNE0_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN2) -+#define GPIO_FMC_SDNE0_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN4) -+#define GPIO_FMC_SDNE0_3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN3) -+#define GPIO_FMC_SDNE1_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTB|GPIO_PIN6) -+#define GPIO_FMC_SDNE1_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN6) -+#define GPIO_FMC_SDNRAS (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTF|GPIO_PIN11) -+#define GPIO_FMC_SDNWE_1 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTA|GPIO_PIN7) -+#define GPIO_FMC_SDNWE_2 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTC|GPIO_PIN0) -+#define GPIO_FMC_SDNWE_3 (GPIO_ALT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PORTH|GPIO_PIN5) - - /* HDMI-CEC Controller */ - -@@ -622,15 +622,16 @@ - #define GPIO_I2C3_SMBA_1 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN9) - #define GPIO_I2C3_SMBA_2 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN9) - --#define GPIO_I2C4_SCL_1 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN12) --#define GPIO_I2C4_SCL_2 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN14) --#define GPIO_I2C4_SCL_3 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN11) --#define GPIO_I2C4_SCL_4 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN6) --#define GPIO_I2C4_SCL_5 (GPIO_ALT|GPIO_AF1 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN8) --#define GPIO_I2C4_SDA_1 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN13) --#define GPIO_I2C4_SDA_2 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN15) --#define GPIO_I2C4_SDA_3 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN12) --#define GPIO_I2C4_SDA_4 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN9) -+#define GPIO_I2C4_SCL_1 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTD|GPIO_PIN12) -+#define GPIO_I2C4_SCL_2 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTF|GPIO_PIN14) -+#define GPIO_I2C4_SCL_3 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTH|GPIO_PIN11) -+#define GPIO_I2C4_SCL_4 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN6) -+#define GPIO_I2C4_SCL_5 (GPIO_ALT|GPIO_AF1 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN8) -+#define GPIO_I2C4_SDA_1 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTD|GPIO_PIN13) -+#define GPIO_I2C4_SDA_2 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTF|GPIO_PIN15) -+#define GPIO_I2C4_SDA_3 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTH|GPIO_PIN12) -+#define GPIO_I2C4_SDA_4 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN9) -+#define GPIO_I2C4_SDA_5 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN7) - #define GPIO_I2C4_SMBA_1 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN11) - #define GPIO_I2C4_SMBA_2 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN13) - #define GPIO_I2C4_SMBA_3 (GPIO_ALT|GPIO_AF4 |GPIO_SPEED_50MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN10) diff --git a/nuttx-patches/00033-BACKPORT-stm32f7-sdmmc-dcache-fix.patch b/nuttx-patches/00033-BACKPORT-stm32f7-sdmmc-dcache-fix.patch deleted file mode 100644 index 215bc893ae..0000000000 --- a/nuttx-patches/00033-BACKPORT-stm32f7-sdmmc-dcache-fix.patch +++ /dev/null @@ -1,139 +0,0 @@ -diff --git NuttX/nuttx/arch/arm/src/stm32f7/stm32_dma.c NuttX/nuttx/arch/arm/src/stm32f7/stm32_dma.c -index a695a07..1d54daf 100644 ---- NuttX/nuttx/arch/arm/src/stm32f7/stm32_dma.c -+++ NuttX/nuttx/arch/arm/src/stm32f7/stm32_dma.c -@@ -860,6 +860,13 @@ size_t stm32_dmaresidual(DMA_HANDLE handle) - * of the processor. Note that this only applies to memory addresses, it - * will return false for any peripheral address. - * -+ * Input Parameters: -+ * -+ * maddr - starting memory address -+ * count - number of unit8 or uint16 or uint32 items as defined by MSIZE of -+ * ccr. -+ * ccr - DMA stream configuration register -+ * - * Returned value: - * True, if transfer is possible. - * -@@ -877,7 +884,8 @@ bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr) - * Transfers to/from memory performed by the DMA controller are - * required to be aligned to their size. - * -- * See ST RM0090 rev4, section 9.3.11 -+ * See ST RM0410 DocID028270 Rev 2, section 8.3.11 Single and burst -+ * transfers - * - * Compute mend inline to avoid a possible non-constant integer - * multiply. -@@ -911,6 +919,23 @@ bool stm32_dmacapable(uint32_t maddr, uint32_t count, uint32_t ccr) - return false; - } - -+# if defined(CONFIG_ARMV7M_DCACHE) && !defined(CONFIG_ARMV7M_DCACHE_WRITETHROUGH) -+ /* buffer alignment is required for DMA transfers with dcache in buffered -+ * mode (not write-through) because a) arch_invalidate_dcache could lose -+ * buffered writes and b) arch_flush_dcache could corrupt adjacent memory if -+ * the maddr and the mend+1, the next next address are not on -+ * ARMV7M_DCACHE_LINESIZE boundaries. -+ */ -+ -+ if ((maddr & (ARMV7M_DCACHE_LINESIZE-1)) != 0 || -+ ((mend + 1) & (ARMV7M_DCACHE_LINESIZE-1)) != 0) -+ { -+ dmainfo("stm32_dmacapable: dcache unaligned maddr:0x%08x mend:0x%08x\n", -+ maddr, mend); -+ return false; -+ } -+# endif -+ - /* Verify that burst transfers do not cross a 1KiB boundary. */ - - if ((maddr / 1024) != (mend / 1024)) -diff --git NuttX/nuttx/arch/arm/src/stm32f7/stm32_dma.h NuttX/nuttx/arch/arm/src/stm32f7/stm32_dma.h -index b25cb84..e512b39 100644 ---- NuttX/nuttx/arch/arm/src/stm32f7/stm32_dma.h -+++ NuttX/nuttx/arch/arm/src/stm32f7/stm32_dma.h -@@ -241,6 +241,13 @@ size_t stm32_dmaresidual(DMA_HANDLE handle); - * only applies to memory addresses, it will return false for any peripheral - * address. - * -+ * Input Parameters: -+ * -+ * maddr - starting memory address -+ * count - number of unit8 or uint16 or uint32 items as defined by MSIZE of -+ * ccr. -+ * ccr - DMA stream configuration register -+ * - * Returned value: - * True, if transfer is possible. - * -diff --git NuttX/nuttx/arch/arm/src/stm32f7/stm32_sdmmc.c NuttX/nuttx/arch/arm/src/stm32f7/stm32_sdmmc.c -index 2df98c1..7f81c97 100644 ---- NuttX/nuttx/arch/arm/src/stm32f7/stm32_sdmmc.c -+++ NuttX/nuttx/arch/arm/src/stm32f7/stm32_sdmmc.c -@@ -2848,13 +2848,6 @@ static int stm32_dmapreflight(FAR struct sdio_dev_s *dev, - - DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0); - -- /* Wide bus operation is required for DMA */ -- -- if (!priv->widebus) -- { -- return -EINVAL; -- } -- - /* DMA must be possible to the buffer */ - - if (!stm32_dmacapable((uintptr_t)buffer, (buflen + 3) >> 2, -@@ -2896,16 +2889,21 @@ static int stm32_dmarecvsetup(FAR struct sdio_dev_s *dev, FAR uint8_t *buffer, - DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0); - #ifdef CONFIG_SDIO_PREFLIGHT - DEBUGASSERT(stm32_dmapreflight(dev, buffer, buflen) == 0); --#endif -- --#ifdef CONFIG_ARMV7M_DCACHE -- /* buffer alignment is required for DMA transfers with dcache */ -+#else -+# if defined(CONFIG_ARMV7M_DCACHE) && !defined(CONFIG_ARMV7M_DCACHE_WRITETHROUGH) -+ /* buffer alignment is required for DMA transfers with dcache in buffered -+ * mode (not write-through) because the arch_invalidate_dcache could lose -+ * buffered buffered writes if the buffer alignment and sizes are not on -+ * ARMV7M_DCACHE_LINESIZE boundaries. -+ */ - - if (((uintptr_t)buffer & (ARMV7M_DCACHE_LINESIZE-1)) != 0 || - (buflen & (ARMV7M_DCACHE_LINESIZE-1)) != 0) - { - return -EFAULT; - } -+# endif -+ - #endif - - /* Reset the DPSM configuration */ -@@ -2981,16 +2979,20 @@ static int stm32_dmasendsetup(FAR struct sdio_dev_s *dev, - DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0); - #ifdef CONFIG_SDIO_PREFLIGHT - DEBUGASSERT(stm32_dmapreflight(dev, buffer, buflen) == 0); --#endif -- --#ifdef CONFIG_ARMV7M_DCACHE -- /* buffer alignment is required for DMA transfers with dcache */ -+#else -+# if defined(CONFIG_ARMV7M_DCACHE) && !defined(CONFIG_ARMV7M_DCACHE_WRITETHROUGH) -+ /* buffer alignment is required for DMA transfers with dcache in buffered -+ * mode (not write-through) because the arch_flush_dcache would corrupt adjacent -+ * memory if the buffer alignment and sizes are not on ARMV7M_DCACHE_LINESIZE -+ * boundaries. -+ */ - - if (((uintptr_t)buffer & (ARMV7M_DCACHE_LINESIZE-1)) != 0 || - (buflen & (ARMV7M_DCACHE_LINESIZE-1)) != 0) - { - return -EFAULT; - } -+# endif - #endif - - /* Reset the DPSM configuration */ diff --git a/nuttx-patches/00034-BACKPORT-stm32f4-I2C-fix.patch b/nuttx-patches/00034-BACKPORT-stm32f4-I2C-fix.patch deleted file mode 100644 index d91fe719a6..0000000000 --- a/nuttx-patches/00034-BACKPORT-stm32f4-I2C-fix.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git NuttX/nuttx/arch/arm/src/stm32/stm32f40xxx_i2c.c NuttX/nuttx/arch/arm/src/stm32/stm32f40xxx_i2c.c -index 2bb715c..481b851 100644 ---- NuttX/nuttx/arch/arm/src/stm32/stm32f40xxx_i2c.c -+++ NuttX/nuttx/arch/arm/src/stm32/stm32f40xxx_i2c.c -@@ -1828,6 +1828,20 @@ static int stm32_i2c_isr(struct stm32_i2c_priv_s *priv) - * the ISR cycle to handle the sending/receiving of the messages. - */ - -+ /* First check for errors */ -+ -+ if ((status & I2C_SR1_ERRORMASK) != 0) -+ { -+ stm32_i2c_traceevent(priv, I2CEVENT_ERROR, status & I2C_SR1_ERRORMASK); -+ -+ /* Clear interrupt flags */ -+ -+ stm32_i2c_putreg(priv, STM32_I2C_SR1_OFFSET, 0); -+ -+ priv->dcnt = -1; -+ priv->msgc = 0; -+ } -+ - if (priv->dcnt == -1 && priv->msgc == 0) - { - i2cinfo("Shutting down I2C ISR\n"); -@@ -2027,7 +2041,6 @@ static int stm32_i2c_transfer(FAR struct i2c_master_s *dev, FAR struct i2c_msg_s - int count) - { - FAR struct stm32_i2c_priv_s *priv = (struct stm32_i2c_priv_s *)dev; -- stm32_i2c_sem_wait(priv); /* Ensure that address or flags don't change meanwhile */ - uint32_t status = 0; - #ifdef I2C1_FSMC_CONFLICT - uint32_t ahbenr; -@@ -2035,6 +2048,7 @@ static int stm32_i2c_transfer(FAR struct i2c_master_s *dev, FAR struct i2c_msg_s - int ret = 0; - - ASSERT(count); -+ stm32_i2c_sem_wait(priv); /* Ensure that address or flags don't change meanwhile */ - - #ifdef I2C1_FSMC_CONFLICT - /* Disable FSMC that shares a pin with I2C1 (LBAR) */ diff --git a/nuttx-patches/CMakeLists.txt b/nuttx-patches/CMakeLists.txt index 5079eb76ad..943dfc25ef 100644 --- a/nuttx-patches/CMakeLists.txt +++ b/nuttx-patches/CMakeLists.txt @@ -36,33 +36,12 @@ set(nuttx_patches 00002-REJECTED-fix-shadow-wanings.patch 00003-REJECTED-add-var-expansion-in-nsh-parse.patch 00004-REJECTED-avoid-export-copy-with-export-insitu.patch - 00005-REJECTED-support-c++11.patch 00006-REJECTED-cstdint-fix.patch 00007-REJECTED-silence-jobserver-warnings.patch 00008-REJECTED-static-assert-fix.patch 00009-REJECTED-ctype-fix-shadow-wanings.patch - 00010-BACKPORT-stm32-flash-F4-dcache-corruption-fix-no-HSI-on.patch - 00011-BACKPORT-priority-restoration-fix.patch - 00012-BACKPORT-stack-coloration-overreach-fix.patch - 00014-BACKPORT-i2c-hotfix.patch - 00015-BACKPORT-stm32f7-DTCM.patch - 00016-BACKPORT-fix-CRTSCTS-defines.patch - 00017-BACKPORT-cdcacm.patch - 00019-BACKPORT-stm32-rcc-keep-HSI-on.patch - 00021-BACKPORT-stm32f3x-add-BKP.patch - 00022-BACKPORT-stm32-bkp-reference-fix.patch - 00023-BACKPORT-stm32f7-bkp-reference-fix.patch - 00024-BACKPORT-stm32f7-serial-dma-hotfix.patch - 00025-BACKPORT-add-set-ex-to-nsh.patch - 00026-BACKPORT-stm32fX-serial-fix-freezing.patch - 00027-BACKPORT-stm32-sdio-1-bit-and-16G-fix.patch - 00028-BACKPORT-mtd-FLASH-corruption.patch - 00029-BACKPORT-stm32-serial-upstream-sans-IRQ.patch - 00030-BACKPORT-fix-arm-none-eabi-gcc-7-warnings-nuttx.patch - 00031-BACKPORT-fix-arm-none-eabi-gcc-7-warnings-apps.patch - 00032-BACKPORT-stm32f7-pinmap-FMC-I2C4-fixes.patch - 00033-BACKPORT-stm32f7-sdmmc-dcache-fix.patch - 00034-BACKPORT-stm32f4-I2C-fix.patch + 00010-REJECTED-no-irq-args.patch + 00011-REJECTED-stm32_serial_no_irq_args.patch 90000-PENDING-wip-inflight-to-upstream.patch )