You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/02/08 23:58:46 UTC

[incubator-nuttx] 02/03: Kconfig: Alternative implementation

This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch pr232
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 569ac29df0449b6241f57767e7104eb39b7c927f
Author: Gregory Nutt <gn...@nuttx.org>
AuthorDate: Sat Feb 8 13:09:58 2020 -0600

    Kconfig:  Alternative implementation
    
    Per feedback from Xiao Xiang, instead of propagating the practice of conditionally selecting configuration options, move the ARCH_PHY_INTERRUPT option to net/Kconfig and make it unconditionally selectable.
---
 boards/Kconfig      | 14 +++++++-------
 drivers/net/Kconfig |  4 ----
 net/Kconfig         |  4 ++++
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/boards/Kconfig b/boards/Kconfig
index b622863..67c2cf9 100644
--- a/boards/Kconfig
+++ b/boards/Kconfig
@@ -1320,7 +1320,7 @@ config ARCH_BOARD_SAMA5D3X_EK
 	select ARCH_HAVE_LEDS
 	select ARCH_HAVE_BUTTONS
 	select ARCH_HAVE_IRQBUTTONS
-	select ARCH_PHY_INTERRUPT if NETDEVICES
+	select ARCH_PHY_INTERRUPT
 	---help---
 		The port of NuttX to the Atmel SAMA5D3x-EK development board (where x=1,3,4, or 5).
 
@@ -1330,7 +1330,7 @@ config ARCH_BOARD_SAMA5D3_XPLAINED
 	select ARCH_HAVE_LEDS
 	select ARCH_HAVE_BUTTONS
 	select ARCH_HAVE_IRQBUTTONS
-    select ARCH_PHY_INTERRUPT if NETDEVICES && (SAMA5_EMACA || SAMA5_EMAC0 || SAMA5_EMAC1 || SAMA5_GMAC)
+	select ARCH_PHY_INTERRUPT if SAMA5_EMACA || SAMA5_EMAC0 || SAMA5_EMAC1 || SAMA5_GMAC
 	---help---
 		The port of NuttX to the Atmel SAMA5D3 Xplained development board.
 
@@ -1340,7 +1340,7 @@ config ARCH_BOARD_SAMA5D4_EK
 	select ARCH_HAVE_LEDS
 	select ARCH_HAVE_BUTTONS
 	select ARCH_HAVE_IRQBUTTONS
-	select ARCH_PHY_INTERRUPT if NETDEVICES
+	select ARCH_PHY_INTERRUPT
 	---help---
 		The port of NuttX to the Atmel SAMA5D4-EK development board
 
@@ -1407,7 +1407,7 @@ config ARCH_BOARD_SAM4EEK
 	select ARCH_HAVE_LEDS
 	select ARCH_HAVE_BUTTONS
 	select ARCH_HAVE_IRQBUTTONS
-	select ARCH_PHY_INTERRUPT if NETDEVICES
+	select ARCH_PHY_INTERRUPT
 	---help---
 		The port of NuttX to the Atmel SAM4E-EK development board.  This
 		board features the SAM4E16 MCU running at up to 120MHz.
@@ -1445,7 +1445,7 @@ config ARCH_BOARD_SAME70_XPLAINED
 	select ARCH_HAVE_LEDS
 	select ARCH_HAVE_BUTTONS
 	select ARCH_HAVE_IRQBUTTONS
-	select ARCH_PHY_INTERRUPT if NETDEVICES
+	select ARCH_PHY_INTERRUPT
 	---help---
 		The port of NuttX to the Atmel SAME70 Xplained evaluation board.
 
@@ -1455,7 +1455,7 @@ config ARCH_BOARD_SAMV71_XULT
 	select ARCH_HAVE_LEDS
 	select ARCH_HAVE_BUTTONS
 	select ARCH_HAVE_IRQBUTTONS
-	select ARCH_PHY_INTERRUPT if NETDEVICES
+	select ARCH_PHY_INTERRUPT
 	---help---
 		The port of NuttX to the Atmel SAMV71 Xplained Ultra evaluation board.
 
@@ -2030,7 +2030,7 @@ config BOARD_CUSTOM_INTERRUPT
 	bool "Custom board PHY interrupts"
 	default n
 	depends on NETDEVICES
-	select ARCH_PHY_INTERRUPT if NETDEVICES
+	select ARCH_PHY_INTERRUPT
 
 endmenu # Custom Board Configuration
 endif #ARCH_BOARD_CUSTOM
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 6ddf981..e1647f7 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -339,10 +339,6 @@ if ARCH_HAVE_PHY
 
 comment "External Ethernet PHY Device Support"
 
-config ARCH_PHY_INTERRUPT
-	bool
-	default n
-
 choice
 	prompt "Board PHY Selection (ETH0)"
 	default ETH0_PHY_NONE
diff --git a/net/Kconfig b/net/Kconfig
index e7c6973..fffbfa8 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -11,6 +11,10 @@ config ARCH_HAVE_PHY
 	bool
 	default n
 
+config ARCH_PHY_INTERRUPT
+	bool
+	default n
+
 config ARCH_HAVE_NETDEV_STATISTICS
 	bool
 	default n