From 3241ebf811b6152628646707d53d35ee94612eef Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Mon, 31 Aug 2020 07:39:45 +0200 Subject: [PATCH] arch/nrf52: remove redundant chip definitions from Kconfig --- arch/arm/include/nrf52/irq.h | 6 +++++- arch/arm/src/nrf52/Kconfig | 17 +---------------- arch/arm/src/nrf52/Make.defs | 2 +- arch/arm/src/nrf52/nrf52_start.c | 2 +- 4 files changed, 8 insertions(+), 19 deletions(-) diff --git a/arch/arm/include/nrf52/irq.h b/arch/arm/include/nrf52/irq.h index 5565eabf91..b978cf7e63 100644 --- a/arch/arm/include/nrf52/irq.h +++ b/arch/arm/include/nrf52/irq.h @@ -77,7 +77,11 @@ /* Cortex-M4 External interrupts (vectors >= 16) */ -#if defined(CONFIG_ARCH_FAMILY_NRF52832) || defined(CONFIG_ARCH_FAMILY_NRF52840) +/******************************************************************************************** + * Included Files + ********************************************************************************************/ + +#if defined(CONFIG_ARCH_FAMILY_NRF52) # include #else # error "Unsupported NRF52XX MCU" diff --git a/arch/arm/src/nrf52/Kconfig b/arch/arm/src/nrf52/Kconfig index 70e5100258..6640ebf03d 100644 --- a/arch/arm/src/nrf52/Kconfig +++ b/arch/arm/src/nrf52/Kconfig @@ -13,13 +13,11 @@ choice config ARCH_CHIP_NRF52832 bool "NRF52832" select ARCH_FAMILY_NRF52 - select ARCH_FAMILY_NRF52832 select NRF52_HAVE_BPROT config ARCH_CHIP_NRF52833 bool "NRF52832" select ARCH_FAMILY_NRF52 - select ARCH_FAMILY_NRF52833 select NRF52_HAVE_ACL select NRF52_HAVE_UART1 select NRF52_HAVE_PORT1 @@ -30,7 +28,6 @@ config ARCH_CHIP_NRF52833 config ARCH_CHIP_NRF52840 bool "NRF52840" select ARCH_FAMILY_NRF52 - select ARCH_FAMILY_NRF52840 select NRF52_HAVE_ACL select NRF52_HAVE_UART1 select NRF52_HAVE_PORT1 @@ -48,18 +45,6 @@ config ARCH_FAMILY_NRF52 bool default n -config ARCH_FAMILY_NRF52832 - bool - default n - -config ARCH_FAMILY_NRF52833 - bool - default n - -config ARCH_FAMILY_NRF52840 - bool - default n - # Peripheral support config NRF52_HAVE_BPROT @@ -122,7 +107,7 @@ config NRF52_RTC config NRF52_SPI_MASTER_WORKAROUND_1BYTE_TRANSFER bool "SPI Master 1 Byte transfer anomaly workaround" - depends on NRF52_SPI_MASTER && ARCH_FAMILY_NRF52832 + depends on NRF52_SPI_MASTER && ARCH_CHIP_NRF52832 default y ---help--- Enable the workaround to fix SPI Master 1 byte transfer bug diff --git a/arch/arm/src/nrf52/Make.defs b/arch/arm/src/nrf52/Make.defs index 6da5c09bee..dd543a11e3 100644 --- a/arch/arm/src/nrf52/Make.defs +++ b/arch/arm/src/nrf52/Make.defs @@ -80,7 +80,7 @@ endif CHIP_CSRCS = nrf52_start.c nrf52_clockconfig.c nrf52_irq.c nrf52_utils.c CHIP_CSRCS += nrf52_allocateheap.c nrf52_lowputc.c nrf52_gpio.c nrf52_nvmc.c -ifeq ($(CONFIG_ARCH_FAMILY_NRF52832),y) +ifeq ($(CONFIG_ARCH_CHIP_NRF52832),y) CHIP_CSRCS += nrf52832_errdata.c endif diff --git a/arch/arm/src/nrf52/nrf52_start.c b/arch/arm/src/nrf52/nrf52_start.c index 3196b26a83..06a6116820 100644 --- a/arch/arm/src/nrf52/nrf52_start.c +++ b/arch/arm/src/nrf52/nrf52_start.c @@ -222,7 +222,7 @@ void __start(void) showprogress('C'); -#if defined(CONFIG_ARCH_FAMILY_NRF52832) +#if defined(CONFIG_ARCH_CHIP_NRF52832) /* Initialize the errdata work-around */ nrf52832_errdata_init();