boards: arm: Refactor the GPIO and UART dependencies

To make way for the upcoming blinky and GPIO support for nRF5x-based
boards, this change addresses the hardcoded dependencies in Kconfig
default configurations of the different boards, moving the common option
defaults to the SoC default configuration itself.

Change-Id: I8db0750311ad5a12b76237b39438376f20f6f496
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Carles Cufi 2016-12-08 16:03:44 +01:00 committed by Kumar Gala
commit 3655291d5f
8 changed files with 49 additions and 43 deletions

View file

@ -15,6 +15,8 @@
# limitations under the License. # limitations under the License.
# #
if SOC_FAMILY_NRF5
if BLUETOOTH_CONTROLLER if BLUETOOTH_CONTROLLER
config CLOCK_CONTROL config CLOCK_CONTROL
@ -25,4 +27,20 @@ config CLOCK_CONTROL_NRF5
endif # BLUETOOTH_CONTROLLER endif # BLUETOOTH_CONTROLLER
if SERIAL
config GPIO
default y
endif # SERIAL
if GPIO
config GPIO_NRF5
default y
endif # GPIO
source "arch/arm/soc/nordic_nrf5/*/Kconfig.defconfig.series" source "arch/arm/soc/nordic_nrf5/*/Kconfig.defconfig.series"
endif # SOC_FAMILY_NRF5

View file

@ -19,17 +19,15 @@ if BOARD_96B_NITROGEN
config BOARD config BOARD
default 96b_nitrogen default 96b_nitrogen
if UART_NRF5 if GPIO_NRF5
config GPIO
default y
config GPIO_NRF5
default y
config GPIO_NRF5_P0 config GPIO_NRF5_P0
default y default y
endif # GPIO_NRF5
if UART_NRF5
config UART_NRF5_GPIO_TX_PIN config UART_NRF5_GPIO_TX_PIN
default 13 default 13

View file

@ -19,17 +19,15 @@ if BOARD_BBC_MICROBIT
config BOARD config BOARD
default bbc_microbit default bbc_microbit
if UART_NRF5 if GPIO_NRF5
config GPIO
default y
config GPIO_NRF5
default y
config GPIO_NRF5_P0 config GPIO_NRF5_P0
default y default y
endif # GPIO_NRF5
if UART_NRF5
config UART_NRF5_GPIO_TX_PIN config UART_NRF5_GPIO_TX_PIN
default 24 default 24

View file

@ -19,17 +19,15 @@ if BOARD_NRF51_BLENANO
config BOARD config BOARD
default nrf51_blenano default nrf51_blenano
if UART_NRF5 if GPIO_NRF5
config GPIO
default y
config GPIO_NRF5
default y
config GPIO_NRF5_P0 config GPIO_NRF5_P0
default y default y
endif # GPIO_NRF5
if UART_NRF5
config UART_NRF5_GPIO_TX_PIN config UART_NRF5_GPIO_TX_PIN
default 9 default 9

View file

@ -19,17 +19,15 @@ if BOARD_NRF51_PCA10028
config BOARD config BOARD
default nrf51_pca10028 default nrf51_pca10028
if UART_NRF5 if GPIO_NRF5
config GPIO
default y
config GPIO_NRF5
default y
config GPIO_NRF5_P0 config GPIO_NRF5_P0
default y default y
endif # GPIO_NRF5
if UART_NRF5
config UART_NRF5_GPIO_TX_PIN config UART_NRF5_GPIO_TX_PIN
default 9 default 9

View file

@ -19,17 +19,15 @@ if BOARD_NRF52840_PCA10056
config BOARD config BOARD
default nrf52840_pca10056 default nrf52840_pca10056
if UART_NRF5 if GPIO_NRF5
config GPIO
default y
config GPIO_NRF5
default y
config GPIO_NRF5_P0 config GPIO_NRF5_P0
default y default y
endif # GPIO_NRF5
if UART_NRF5
config UART_NRF5_GPIO_TX_PIN config UART_NRF5_GPIO_TX_PIN
default 6 default 6

View file

@ -19,17 +19,15 @@ if BOARD_NRF52_PCA10040
config BOARD config BOARD
default nrf52_pca10040 default nrf52_pca10040
if UART_NRF5 if GPIO_NRF5
config GPIO
default y
config GPIO_NRF5
default y
config GPIO_NRF5_P0 config GPIO_NRF5_P0
default y default y
endif # GPIO_NRF5
if UART_NRF5
config UART_NRF5_GPIO_TX_PIN config UART_NRF5_GPIO_TX_PIN
default 6 default 6

View file

@ -20,7 +20,7 @@ menuconfig UART_NRF5
default n default n
select SERIAL_HAS_DRIVER select SERIAL_HAS_DRIVER
depends on SOC_FAMILY_NRF5 depends on SOC_FAMILY_NRF5
select GPIO select GPIO_NRF5
help help
This option enables the UART driver for Nordic Semiconductor nRF5 This option enables the UART driver for Nordic Semiconductor nRF5
family processors. Note that there is only one family processors. Note that there is only one