1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #16836 from fjmolinas/pr_kconfig_mtd

drivers/mtd: fix Kconfig dependencies
This commit is contained in:
Francisco 2021-09-22 10:08:14 +02:00 committed by GitHub
commit 0b7eb2bbc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 96 additions and 95 deletions

View File

@ -21,6 +21,7 @@ config CPU_ARCH_NATIVE
select HAS_PERIPH_PWM
select HAS_PERIPH_TIMER_PERIODIC
select HAS_SSP
select HAVE_MTD_NATIVE
# needed modules
select MODULE_PERIPH if TEST_KCONFIG
@ -88,5 +89,4 @@ rsource "backtrace/Kconfig"
endmenu # Native modules
rsource "mtd/Kconfig"
rsource "periph/Kconfig"

View File

@ -1,12 +0,0 @@
# Copyright (c) 2021 HAW Hamburg
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
config MODULE_MTD_NATIVE
bool
default y if MODULE_MTD
depends on NATIVE_OS_LINUX
depends on TEST_KCONFIG

View File

@ -144,11 +144,8 @@ menu "Storage Device Drivers"
rsource "at24cxxx/Kconfig"
rsource "at25xxx/Kconfig"
rsource "mtd/Kconfig"
rsource "mtd_flashpage/Kconfig"
rsource "mtd_mapper/Kconfig"
rsource "mtd_mci/Kconfig"
rsource "mtd_sdcard/Kconfig"
rsource "mtd_spi_nor/Kconfig"
rsource "nvram/Kconfig"
rsource "nvram_spi/Kconfig"
rsource "sdcard_spi/Kconfig"

View File

@ -63,7 +63,6 @@ config MODULE_AT24CXXX
bool
depends on HAS_PERIPH_I2C
depends on TEST_KCONFIG
select HAVE_MTD_AT24CXXX
select MODULE_PERIPH_I2C
select MODULE_XTIMER
rsource "mtd/Kconfig"

View File

@ -1,13 +0,0 @@
# Copyright (c) 2020 HAW Hamburg
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
config MODULE_MTD_AT24CXXX
bool "MTD implementation for AT24CXXX"
default y
depends on MODULE_AT24CXXX
depends on MODULE_MTD
depends on TEST_KCONFIG

View File

@ -9,10 +9,9 @@ config MODULE_AT25XXX
bool "AT25xxx SPI-EEPROMs"
depends on HAS_PERIPH_SPI
depends on TEST_KCONFIG
select HAVE_MTD_AT25XXX
select MODULE_PERIPH_SPI
select MODULE_XTIMER
help
This driver also supports M95xxx, 25AAxxx, 25LCxxx, CAT25xxx & BR25Sxxx
families.
rsource "mtd/Kconfig"

View File

@ -1,12 +0,0 @@
# Copyright (c) 2020 HAW Hamburg
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
config MODULE_MTD_AT25XXX
bool "MTD implementation for AT25XXX"
depends on MODULE_AT25XXX
depends on MODULE_MTD
depends on TEST_KCONFIG

View File

@ -5,6 +5,90 @@
# directory for more details.
#
config MODULE_MTD
config HAVE_MTD_AT24CXXX
bool
depends on MODULE_AT24CXXX
select MODULE_MTD_AT24CXXX if MODULE_MTD
help
Indicates that a at24cxxx EEPROM MTD is present
config HAVE_MTD_AT25XXX
bool
depends on MODULE_AT25XXX
select MODULE_MTD_AT25XXX if MODULE_MTD
help
Indicates that a at25xxx SPI-EEPROM MTD is present
config HAVE_MTD_NATIVE
bool
select MODULE_MTD_NATIVE if MODULE_MTD
help
Indicates that a native MTD is present.
config HAVE_MTD_SD_SCARD
bool
select MODULE_MTD_SD_CARD if MODULE_MTD
help
Indicates that a sdcard MTD is present
config HAVE_MTD_SPI_NOR
bool
select MODULE_MTD_SPI_NOR if MODULE_MTD
help
Indicates that a spi-nor MTD is present
config HAVE_MTD_SPI_MCI
bool
select MODULE_MTD_MCI if MODULE_MTD
help
Indicates that a Multimedia Card Interface (MCI) MTD is present
menuconfig MODULE_MTD
bool "Memory Technology Device interface (MTD)"
depends on TEST_KCONFIG
if MODULE_MTD
menu "MTD Interefaces"
config MODULE_MTD_SPI_NOR
bool "MTD interface for SPI NOR Flash"
depends on HAS_PERIPH_SPI
select MODULE_PERIPH_SPI
config MODULE_MTD_FLASHPAGE
bool "MTD interface for Flashpage"
depends on HAS_PERIPH_FLASHPAGE
depends on HAS_PERIPH_FLASHPAGE_PAGEWISE
select MODULE_PERIPH_FLASHPAGE
select MODULE_PERIPH_FLASHPAGE_PAGEWISE
help
Driver for internal flash devices implementing flashpage interface.
config MODULE_MTD_NATIVE
bool "MTD native driver"
depends on NATIVE_OS_LINUX
config MODULE_MTD_AT24CXXX
bool "MTD implementation for AT24CXXX"
depends on MODULE_AT24CXXX
config MODULE_MTD_AT25XXX
bool "MTD implementation for AT25XXX"
depends on MODULE_AT25XXX
config MODULE_MTD_MCI
bool "MTD interface for LPC23XX MCI"
depends on CPU_FAM_LPC23XX
select MODULE_MCI
config MODULE_MTD_SDCARD
bool "MTD interface for SPI SD-Card"
depends on MODULE_SDCARD_SPI
endmenu # MTD Interfacs
config MODULE_MTD_WRITE_PAGE
bool "MTD write page API"
endif

View File

@ -1,17 +0,0 @@
# Copyright (c) 2020 HAW Hamburg
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
config MODULE_MTD_FLASHPAGE
bool "MTD interface for Flashpage"
depends on HAS_PERIPH_FLASHPAGE
depends on HAS_PERIPH_FLASHPAGE_PAGEWISE
depends on TEST_KCONFIG
select MODULE_PERIPH_FLASHPAGE
select MODULE_PERIPH_FLASHPAGE_PAGEWISE
select MODULE_MTD
help
Driver for internal flash devices implementing flashpage interface.

View File

@ -1,12 +0,0 @@
# Copyright (c) 2020 HAW Hamburg
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
config MODULE_MTD_MCI
bool "MTD interface for LPC23XX MCI"
depends on TEST_KCONFIG
depends on MODULE_MCI
select MODULE_MTD

View File

@ -5,13 +5,6 @@
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
config MODULE_MTD_SDCARD
bool "MTD interface for SPI SD-Card"
depends on MODULE_SDCARD_SPI
depends on TEST_KCONFIG
select MODULE_MTD
menuconfig KCONFIG_USEMODULE_MTD_SDCARD
bool "Configure MTD_SDCARD driver"
depends on USEMODULE_MTD_SDCARD

View File

@ -1,13 +0,0 @@
# Copyright (c) 2020 HAW Hamburg
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
config MODULE_MTD_SPI_NOR
bool "MTD interface for SPI NOR Flash"
depends on HAS_PERIPH_SPI
depends on TEST_KCONFIG
select MODULE_PERIPH_SPI
select MODULE_MTD

View File

@ -1,4 +1,5 @@
# this file enables modules defined in Kconfig. Do not use this file for
# application configuration. This is only needed during migration.
CONFIG_MODULE_MTD=y
CONFIG_MODULE_MTD_FLASHPAGE=y
CONFIG_MODULE_EMBUNIT=y

View File

@ -0,0 +1,7 @@
# this file enables modules defined in Kconfig. Do not use this file for
# application configuration. This is only needed during migration.
CONFIG_MODULE_MTD=y
CONFIG_MODULE_MTD_WRITE_PAGE=y
CONFIG_MODULE_OD=y
CONFIG_MODULE_SHELL=y
CONFIG_MODULE_SHELL_COMMANDS=y