From 357aedef829efbd5c55bcd3be4cf4a38503c24f4 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 26 Nov 2009 00:18:22 +0000 Subject: [PATCH] Numerous fixes for basic STM32 SDIO DMA access git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2279 42af7a65-404d-4744-a932-0658087f49c3 --- configs/stm3210e-eval/RIDE/defconfig | 2 ++ configs/stm3210e-eval/include/board.h | 1 + configs/stm3210e-eval/nsh/defconfig | 2 ++ configs/stm3210e-eval/ostest/defconfig | 2 ++ configs/stm3210e-eval/src/up_boot.c | 29 +++++++---------------- configs/stm3210e-eval/usbserial/defconfig | 2 ++ 6 files changed, 18 insertions(+), 20 deletions(-) diff --git a/configs/stm3210e-eval/RIDE/defconfig b/configs/stm3210e-eval/RIDE/defconfig index cc08dc9c01..5ad48fd6f1 100755 --- a/configs/stm3210e-eval/RIDE/defconfig +++ b/configs/stm3210e-eval/RIDE/defconfig @@ -67,6 +67,7 @@ # CONFIG_BOARD_LOOPSPERMSEC. You simply use a stop watch to measure # the 100 second delay then adjust CONFIG_BOARD_LOOPSPERMSEC until # the delay actually is 100 seconds. +# CONFIG_ARCH_DMA - Support DMA initialization # CONFIG_ARCH=arm CONFIG_ARCH_ARM=y @@ -86,6 +87,7 @@ CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y CONFIG_ARCH_BUTTONS=n CONFIG_ARCH_CALIBRATION=n +CONFIG_ARCH_DMA=n # # Identify toolchain diff --git a/configs/stm3210e-eval/include/board.h b/configs/stm3210e-eval/include/board.h index 4792ab6aff..7950541360 100755 --- a/configs/stm3210e-eval/include/board.h +++ b/configs/stm3210e-eval/include/board.h @@ -41,6 +41,7 @@ * Included Files ************************************************************************************/ +#include #ifndef __ASSEMBLY__ # include #endif diff --git a/configs/stm3210e-eval/nsh/defconfig b/configs/stm3210e-eval/nsh/defconfig index 5a41b5b1ee..bcf5723887 100755 --- a/configs/stm3210e-eval/nsh/defconfig +++ b/configs/stm3210e-eval/nsh/defconfig @@ -67,6 +67,7 @@ # CONFIG_BOARD_LOOPSPERMSEC. You simply use a stop watch to measure # the 100 second delay then adjust CONFIG_BOARD_LOOPSPERMSEC until # the delay actually is 100 seconds. +# CONFIG_ARCH_DMA - Support DMA initialization # CONFIG_ARCH=arm CONFIG_ARCH_ARM=y @@ -86,6 +87,7 @@ CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y CONFIG_ARCH_BUTTONS=n CONFIG_ARCH_CALIBRATION=n +CONFIG_ARCH_DMA=y # # Identify toolchain and linker options diff --git a/configs/stm3210e-eval/ostest/defconfig b/configs/stm3210e-eval/ostest/defconfig index 0ea76f6cdf..b6fd693a34 100755 --- a/configs/stm3210e-eval/ostest/defconfig +++ b/configs/stm3210e-eval/ostest/defconfig @@ -67,6 +67,7 @@ # CONFIG_BOARD_LOOPSPERMSEC. You simply use a stop watch to measure # the 100 second delay then adjust CONFIG_BOARD_LOOPSPERMSEC until # the delay actually is 100 seconds. +# CONFIG_ARCH_DMA - Support DMA initialization # CONFIG_ARCH=arm CONFIG_ARCH_ARM=y @@ -86,6 +87,7 @@ CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y CONFIG_ARCH_BUTTONS=n CONFIG_ARCH_CALIBRATION=n +CONFIG_ARCH_DMA=n # # Identify toolchain and linker options diff --git a/configs/stm3210e-eval/src/up_boot.c b/configs/stm3210e-eval/src/up_boot.c index afa03d074b..527f9d9192 100755 --- a/configs/stm3210e-eval/src/up_boot.c +++ b/configs/stm3210e-eval/src/up_boot.c @@ -71,18 +71,7 @@ ************************************************************************************/ void stm32_boardinitialize(void) -{ - /* Initialize the DMA subsystem if the weak function stm32_dmainitialize has been - * brought into the build - */ - -#if defined(CONFIG_STM32_DMA1) || defined(CONFIG_STM32_DMA2) - if (stm32_dmainitialize) - { - stm32_dmainitialize(); - } -#endif - +{ /* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function * stm32_spiinitialize() has been brought into the link. */ @@ -93,18 +82,18 @@ void stm32_boardinitialize(void) stm32_spiinitialize(); } #endif - - /* Initialize USB is 1) USBDEV is selected, 2) the USB controller is not - * disabled, and 3) the weak function stm32_usbinitialize() has been brought - * into the build. - */ - -#if defined(CONFIG_USBDEV) && defined(CONFIG_STM32_USB) + + /* Initialize USB is 1) USBDEV is selected, 2) the USB controller is not + * disabled, and 3) the weak function stm32_usbinitialize() has been brought + * into the build. + */ + +#if defined(CONFIG_USBDEV) && defined(CONFIG_STM32_USB) if (stm32_usbinitialize) { stm32_usbinitialize(); } -#endif +#endif /* Configure on-board LEDs if LED support has been selected. */ diff --git a/configs/stm3210e-eval/usbserial/defconfig b/configs/stm3210e-eval/usbserial/defconfig index 23910eb2d3..77fd6212b2 100755 --- a/configs/stm3210e-eval/usbserial/defconfig +++ b/configs/stm3210e-eval/usbserial/defconfig @@ -67,6 +67,7 @@ # CONFIG_BOARD_LOOPSPERMSEC. You simply use a stop watch to measure # the 100 second delay then adjust CONFIG_BOARD_LOOPSPERMSEC until # the delay actually is 100 seconds. +# CONFIG_ARCH_DMA - Support DMA initialization # CONFIG_ARCH=arm CONFIG_ARCH_ARM=y @@ -86,6 +87,7 @@ CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y CONFIG_ARCH_BUTTONS=n CONFIG_ARCH_CALIBRATION=n +CONFIG_ARCH_DMA=n # # Identify toolchain and linker options