diff --git a/configs/spresense/src/cxd56_bringup.c b/configs/spresense/src/cxd56_bringup.c index 0c39a6a827..2197f1d8a2 100644 --- a/configs/spresense/src/cxd56_bringup.c +++ b/configs/spresense/src/cxd56_bringup.c @@ -103,6 +103,9 @@ #ifdef CONFIG_PWM #include "cxd56_pwm.h" #endif +#ifdef CONFIG_CXD56_ADC +#include +#endif #include "spresense.h" @@ -272,6 +275,14 @@ int cxd56_bringup(void) } #endif +#ifdef CONFIG_CXD56_ADC + ret = cxd56_adcinitialize(); + if (ret < 0) + { + _err("ERROR: Failed to initialze adc. \n"); + } +#endif + #ifdef CONFIG_USERLED_LOWER ret = userled_lower_initialize("/dev/userleds"); if (ret < 0) @@ -300,7 +311,7 @@ int cxd56_bringup(void) cxd56_gpio_write(PIN_SDIO_DATA2, false); cxd56_gpio_write(PIN_SDIO_DATA3, false); -#if defined(CONFIG_CXD56_SDIO) && !defined(CONFIG_CXD56_SPISD) +#if defined(CONFIG_CXD56_SDIO) ret = board_sdcard_initialize(); if (ret < 0) { @@ -308,17 +319,6 @@ int cxd56_bringup(void) } #endif -#ifdef CONFIG_CXD56_SPISD - /* Mount the SPI-based MMC/SD block driver */ - - ret = board_spisd_initialize(0, 4); - if (ret < 0) - { - ferr("ERROR: Failed to initialize SPI device to MMC/SD: %d\n", - ret); - } -#endif - #ifdef CONFIG_CPUFREQ_RELEASE_LOCK /* Enable dynamic clock control and CPU clock down for power saving */ diff --git a/configs/spresense/src/cxd56_spi.c b/configs/spresense/src/cxd56_spi.c index 2faf9df0e2..66d6b1a55f 100644 --- a/configs/spresense/src/cxd56_spi.c +++ b/configs/spresense/src/cxd56_spi.c @@ -137,26 +137,6 @@ void cxd56_spi4select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected) uint8_t cxd56_spi4status(FAR struct spi_dev_s *dev, uint32_t devid) { -# ifdef CONFIG_CXD56_SPISD - if (devid == SPIDEV_MMCSD(0)) - { - static bool initialized = false; - if (initialized == false) - { - /* Input enable */ - - cxd56_gpio_config(MMCSD_DETECT, true); - - initialized = true; - } - - /* MMCSD_DETECT is mapping to SD Card detect pin - * MMCSD_DETECT = 0: Inserted - * MMCSD_DETECT = 1: Removed - */ - return cxd56_gpio_read(MMCSD_DETECT) ? 0 : SPI_STATUS_PRESENT; - } -# endif return 0; } #endif