summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-01-29 06:39:12 -0500
committerDavid S. Miller <davem@davemloft.net>2016-01-29 23:33:38 -0500
commit1f820f538f7396db7fd40684b9c3620816acc5a3 (patch)
tree3d975f4b02f960464624955d3e3c786d80246f7d
parent747a11279a442b913a57bf38934879babab3b58b (diff)
net: bgmac: clarify CONFIG_BCMA dependency
The bgmac driver depends on BCMA_HOST_SOC, which is only used when CONFIG_BCMA is enabled. However, it is a bool option and can be set when CONFIG_BCMA=m, and then bgmac can be built-in, leading to an obvious link error: drivers/built-in.o: In function `bgmac_init': :(.init.text+0x7f2c): undefined reference to `__bcma_driver_register' drivers/built-in.o: In function `bgmac_exit': :(.exit.text+0x110a): undefined reference to `bcma_driver_unregister' To avoid this case, we need to depend on both BCMA and BCMA_SOC, as this patch does. I'm also trying to make the dependency more readable by splitting it into three lines, and adding a COMPILE_TEST alternative so we can test-build it in all configurations that support BCMA. The added dependency on FIXED_PHY addresses a related issue where we cannot call fixed_phy_register() when CONFIG_FIXED_PHY=m and CONFIG_BGMAC=y. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/broadcom/Kconfig5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/Kconfig b/drivers/net/ethernet/broadcom/Kconfig
index 8550df189ceb..19f7cd02e085 100644
--- a/drivers/net/ethernet/broadcom/Kconfig
+++ b/drivers/net/ethernet/broadcom/Kconfig
@@ -151,8 +151,11 @@ config BNX2X_VXLAN
151 151
152config BGMAC 152config BGMAC
153 tristate "BCMA bus GBit core support" 153 tristate "BCMA bus GBit core support"
154 depends on BCMA_HOST_SOC && HAS_DMA && (BCM47XX || ARCH_BCM_5301X) 154 depends on BCMA && BCMA_HOST_SOC
155 depends on HAS_DMA
156 depends on BCM47XX || ARCH_BCM_5301X || COMPILE_TEST
155 select PHYLIB 157 select PHYLIB
158 select FIXED_PHY
156 ---help--- 159 ---help---
157 This driver supports GBit MAC and BCM4706 GBit MAC cores on BCMA bus. 160 This driver supports GBit MAC and BCM4706 GBit MAC cores on BCMA bus.
158 They can be found on BCM47xx SoCs and provide gigabit ethernet. 161 They can be found on BCM47xx SoCs and provide gigabit ethernet.