From patchwork Mon Jul 10 21:05:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Rae X-Patchwork-Id: 786395 X-Patchwork-Delegate: joe.hershberger@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3x5ySv32jlz9s4q for ; Tue, 11 Jul 2017 07:06:55 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 24DD0C21DFE; Mon, 10 Jul 2017 21:06:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 820ADC21D70; Mon, 10 Jul 2017 21:06:48 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id ABB9EC21D70; Mon, 10 Jul 2017 21:06:46 +0000 (UTC) Received: from p3plsmtpa12-09.prod.phx3.secureserver.net (p3plsmtpa12-09.prod.phx3.secureserver.net [68.178.252.238]) by lists.denx.de (Postfix) with ESMTPS id DA5F2C21C6D for ; Mon, 10 Jul 2017 21:06:45 +0000 (UTC) Received: from u64.1 ([96.49.56.187]) by :SMTPAUTH: with SMTP id UfsXd5Tc56fu8UfshdoeqU; Mon, 10 Jul 2017 14:06:13 -0700 X-Sender: smtpout@raedomain.com From: Steve Rae To: Joe Hershberger , u-boot@lists.denx.de Date: Mon, 10 Jul 2017 14:05:41 -0700 Message-Id: <1499720741-6749-1-git-send-email-steve.rae@raedomain.com> X-Mailer: git-send-email 2.7.4 X-CMAE-Envelope: MS4wfKNgouU8zbyPan2VF0oUXNRdExwOPnL6oJvDrGW8geE3HUS+FKx+m0UJozdornW23wSMHFD+t+KPn6lUrH7y74vAJYk7cc7qSu3vj505SbR1FnNRETw6 PoQjfjLgt/YkWmPSAIrqTeclQJWoFqZmMwYyhQcZkUoCnmn9aCnHFOspn9QEWDm98KIKPG2d8heEYgTQfr2SAPpq1spEPvLzOHbEaqE1PteoW1umIG0S1QfK DezKUNPfPfll2NWqcmo0xxRdvXo5f9FyiJLHO/PbM7pdBNhP4IW906R9DYMRLkaHZ6xtAn1bFGckVMReeqvqrrpDCnaXU7DVoS+ytcjqhLLKA+VmsMSrdKpx 1DnhUxNO Cc: Suji Velupillai , Tom Rini , Steve Rae Subject: [U-Boot] [ PATCH v3] net: move Broadcom SF2 driver to Kconfig X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Suji Velupillai 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 Tested-by: Suji Velupillai Reviewed-by: JD Zheng Reviewed-by: Scott Branden Signed-off-by: Steve Rae Reviewed-by: Tom Rini Acked-by: Joe Hershberger --- Changes in v3: - use Kconfig "imply" method for BCMCYGNUS boards Changes in v2: - update Kconfig help text - move CONFIG_BCM_SF2_ETH_DEFAULT_PORT to Kconfig arch/arm/Kconfig | 3 +++ arch/arm/include/asm/arch-bcmcygnus/configs.h | 6 +----- configs/bcm28155_w1d_defconfig | 5 +++-- drivers/net/Kconfig | 24 ++++++++++++++++++++++++ drivers/net/bcm-sf2-eth.h | 2 -- scripts/config_whitelist.txt | 3 --- 6 files changed, 31 insertions(+), 12 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 3c3f5f7..d3ba5c3 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -522,6 +522,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" diff --git a/arch/arm/include/asm/arch-bcmcygnus/configs.h b/arch/arm/include/asm/arch-bcmcygnus/configs.h index af7f3bf..92b1c5e 100644 --- a/arch/arm/include/asm/arch-bcmcygnus/configs.h +++ b/arch/arm/include/asm/arch-bcmcygnus/configs.h @@ -1,5 +1,5 @@ /* - * Copyright 2014 Broadcom Corporation. + * Copyright 2014-2017 Broadcom. * * SPDX-License-Identifier: GPL-2.0+ */ @@ -23,10 +23,6 @@ #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*/ diff --git a/configs/bcm28155_w1d_defconfig b/configs/bcm28155_w1d_defconfig index aa5216e..4adbce6 100644 --- a/configs/bcm28155_w1d_defconfig +++ b/configs/bcm28155_w1d_defconfig @@ -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_VERSION_VARIABLE=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set @@ -15,7 +14,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 @@ -33,3 +31,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 diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 736aab2..5ceea44 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -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 diff --git a/drivers/net/bcm-sf2-eth.h b/drivers/net/bcm-sf2-eth.h index c4e2e01..efeff15 100644 --- a/drivers/net/bcm-sf2-eth.h +++ b/drivers/net/bcm-sf2-eth.h @@ -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 diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 54eee53..75602a9 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -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