Open acassis opened 3 months ago
I think this is more common problem. You can find many ifdefs with the DMAPRIO
phrase that are missing in Kconfig and it's been like that since I started using NuttX. I have no idea what the story is behind these :)
Another problem are definitions like this:
#ifde CONFIG_XXX
# define CONFIG_XXX something
#endif
where CONFIG_XXX is not defined in Kconfig at all. There are many places like this in the code. Such definitions should be handled by the default statement in Kconfig.
Another problem are definitions like this:
#ifde CONFIG_XXX # define CONFIG_XXX something #endif
where CONFIG_XXX is not defined in Kconfig at all. There are many places like this in the code. Such definitions should be handled by the default statement in Kconfig.
Agree!
I think this is more common problem. You can find many ifdefs with the
DMAPRIO
phrase that are missing in Kconfig and it's been like that since I started using NuttX. I have no idea what the story is behind these :)
Maybe @patacongo knows what happened to that definition.
For STM32, it looks like the the configuration never existed. It looks like I cloned it from somewhere else in:
git blame stm32_spi.c
git show f0b1643958b
Where
commit f0b1643958bbe42b1c51c7946c5dc78bda2ac014
Author: patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>
Date: Fri Aug 10 22:01:12 2012 +0000
STM32 SDIO DMA setup was losing DMA priority
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5019 42af7a65-404d-4744-a932-0658087f49c3
The above is an old SVN commit that github will not recognize, probably because of the weird email address? That bogus email address was created when the original CVS repository was converted to SVN. Github won't report anything about NuttX before 2012 or 2013 when NuttX was moved to a SourceForge GIT repository, even though the actual history goes back to 2007.
CONFIG_SPI_DMAPRIO did not exist then (and probably never existed):
git checkout f0b1643958b
find . -name Kconfig |xargs grep SPI_DMAPRIO
There is only a single definition of a DMAPRIO in all of the Kconfigs (for SDIO).
There is only a single DMA priority for SPI. If I wanted multiple SPI DMAs with different priorities, a single SPI_DMAPRIO value would not support that.
I think a modification at some eons damaged few SPI drivers, there are references to CONFIG_SPI_DMAPRIO but without any definition of it.
I didn't investigate further, but probably some boards could be non-functional now.
Or maybe people started copying it blindly from stm32_spi.c. This is a point of attention. @raiden00pl did you notice it?