net: move Broadcom SF2 driver to Kconfig
authorSuji Velupillai <suji.velupillai@broadcom.com>
Mon, 10 Jul 2017 21:05:41 +0000 (14:05 -0700)
committerJoe Hershberger <joe.hershberger@ni.com>
Mon, 7 Aug 2017 20:18:30 +0000 (15:18 -0500)
move to Kconfig:
CONFIG_BCM_SF2_ETH
CONFIG_BCM_SF2_ETH_DEFAULT_PORT
CONFIG_BCM_SF2_ETH_GMAC

Also modified defconfigs of all platforms that use these configs.

Signed-off-by: Suji Velupillai <suji.velupillai@broadcom.com>
Tested-by: Suji Velupillai <suji.velupillai@broadcom.com>
Reviewed-by: JD Zheng <jiandong.zheng@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Steve Rae <steve.rae@raedomain.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
arch/arm/Kconfig
arch/arm/include/asm/arch-bcmcygnus/configs.h
configs/bcm28155_w1d_defconfig
drivers/net/Kconfig
drivers/net/bcm-sf2-eth.h
scripts/config_whitelist.txt

index 7f6ab4ac7e6e77238019e146bc1b571bbfc83446..9cfeedeebd95e02c042f5a503246027ce7084c3d 100644 (file)
@@ -523,6 +523,9 @@ config TARGET_BCMCYGNUS
        imply CMD_HASH
        imply FAT_WRITE
        imply HASH_VERIFY
+       imply NETDEVICES
+       imply BCM_SF2_ETH
+       imply BCM_SF2_ETH_GMAC
 
 config TARGET_BCMNSP
        bool "Support bcmnsp"
index af7f3bff57ac0287bcfc2c0eb1830cd15f81c9c7..92b1c5e2d671b54693a32d52716a688e8b9bf14b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2014 Broadcom Corporation.
+ * Copyright 2014-2017 Broadcom.
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
 #define CONFIG_SYS_NS16550_COM3                0x18023000
 
 /* Ethernet */
-#define CONFIG_BCM_SF2_ETH
-#define CONFIG_BCM_SF2_ETH_GMAC
-
-#define CONFIG_PHYLIB
 #define CONFIG_PHY_BROADCOM
 #define CONFIG_PHY_RESET_DELAY 10000 /* PHY reset delay in us*/
 
index 374d58b52d0a06f1d7d2d34ba5257daacd303c2c..2dc7d1908249c6ddfd119eb8957d3ec4a434e5cd 100644 (file)
@@ -1,7 +1,6 @@
 CONFIG_ARM=y
 CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK=y
 CONFIG_TARGET_BCM28155_AP=y
-CONFIG_SYS_EXTRA_OPTIONS="BCM_SF2_ETH,BCM_SF2_ETH_GMAC"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_VERSION_VARIABLE=y
 # CONFIG_DISPLAY_CPUINFO is not set
@@ -16,7 +15,6 @@ CONFIG_CMD_MMC=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-# CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_FAT=y
@@ -34,3 +32,6 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Broadcom Corporation"
 CONFIG_G_DNL_VENDOR_NUM=0x18d1
 CONFIG_G_DNL_PRODUCT_NUM=0x0d02
+CONFIG_NETDEVICES=y
+CONFIG_BCM_SF2_ETH=y
+CONFIG_BCM_SF2_ETH_GMAC=y
index 736aab2e6e6df20e65b589787917bcc7e626794a..5ceea44c60535c0ddae59bd663fdae7f39cf2478 100644 (file)
@@ -47,6 +47,30 @@ config ALTERA_TSE
          Please find details on the "Triple-Speed Ethernet MegaCore Function
          Resource Center" of Altera.
 
+config BCM_SF2_ETH
+       bool "Broadcom SF2 (Starfighter2) Ethernet support"
+       select PHYLIB
+       help
+         This is an abstract framework which provides a generic interface
+         to MAC and DMA management for multiple Broadcom SoCs such as
+         Cygnus, NSP and bcm28155_ap platforms.
+
+config BCM_SF2_ETH_DEFAULT_PORT
+       int "Broadcom SF2 (Starfighter2) Ethernet default port number"
+       depends on BCM_SF2_ETH
+       default 0
+       help
+         Default port number for the Starfighter2 ethernet driver.
+
+config BCM_SF2_ETH_GMAC
+       bool "Broadcom SF2 (Starfighter2) GMAC Ethernet support"
+       depends on BCM_SF2_ETH
+       help
+         This flag enables the ethernet support for Broadcom platforms with
+         GMAC such as Cygnus. This driver is based on the framework provided
+         by the BCM_SF2_ETH driver.
+         Say Y to any bcmcygnus based platforms.
+
 config DWC_ETH_QOS
        bool "Synopsys DWC Ethernet QOS device support"
        depends on DM_ETH
index c4e2e01003432efaf2eda169aacdb158040b56a8..efeff15a01b3d46c8f88948b64e3d9741d8cba9d 100644 (file)
@@ -20,8 +20,6 @@
 /* Support 2 Ethernet ports now */
 #define BCM_ETH_MAX_PORT_NUM   2
 
-#define CONFIG_BCM_SF2_ETH_DEFAULT_PORT        0
-
 enum {
        MAC_DMA_TX = 1,
        MAC_DMA_RX = 2
index 3b5c17a9825dcf2f31a9a3479694e0dcfe16a6da..2d77ff80ebe1ff688b67ba4415927fa0a8a8769e 100644 (file)
@@ -157,9 +157,6 @@ CONFIG_BCH_CONST_PARAMS
 CONFIG_BCH_CONST_T
 CONFIG_BCM2835_GPIO
 CONFIG_BCM283X_MU_SERIAL
-CONFIG_BCM_SF2_ETH
-CONFIG_BCM_SF2_ETH_DEFAULT_PORT
-CONFIG_BCM_SF2_ETH_GMAC
 CONFIG_BIOSEMU
 CONFIG_BITBANGMII_MULTI
 CONFIG_BL1_OFFSET