net: designware: socfpga: Add Arria10 extras
PATCH 1/3 net: designware: socfpga: Add Arria10 extras
Add wrapper around the designware MAC driver to handle the SoCFPGA specific configuration bits. On Arria10, this is configuration of syscon phy_intf.
---
NOTE: This driver is not enabled on Gen5 or Stratix10 as the
implementation for its specifics is missing thus far. The driver can be safely enabled though, as the behavior of the plain designware mac driver will be retained.
--- drivers/net/Kconfig | 8 +++ drivers/net/Makefile | 1 + drivers/net/dwmac_socfpga.c | 143 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 152 insertions(+) create mode 100644 drivers/net/dwmac_socfpga.c
drivers/net/Kconfig +8 -0
@@ -150,6 +150,14 @@ config ETH_DESIGNWARE 100Mbit and 1 Gbit operation. You must enable CONFIG_PHYLIB to provide the PHY (physical media interface). +config ETH_DESIGNWARE_SOCFPGA + bool "Altera SoCFPGA extras for Synopsys Designware Ethernet MAC" + depends on DM_ETH && ETH_DESIGNWARE + help + The Altera SoCFPGA requires additional configuration of the + Altera system manager to correctly interface with the PHY. + This code handles those SoC specifics. + config ETHOC bool "OpenCores 10/100 Mbps Ethernet MAC" help
drivers/net/Makefile +1 -0
@@ -14,6 +14,7 @@ obj-$(CONFIG_CALXEDA_XGMAC) += calxedaxgmac.o obj-$(CONFIG_CS8900) += cs8900.o obj-$(CONFIG_TULIP) += dc2114x.o obj-$(CONFIG_ETH_DESIGNWARE) += designware.o +obj-$(CONFIG_ETH_DESIGNWARE_SOCFPGA) += dwmac_socfpga.o obj-$(CONFIG_DRIVER_DM9000) += dm9000x.o obj-$(CONFIG_DNET) += dnet.o obj-$(CONFIG_E1000) += e1000.o
drivers/net/dwmac_socfpga.c new file +143 -0
143 lines not on this page · raw message
Signature · 1 line
2.16.2
PATCH 2/3 ARM: socfpga: Zap unused reset code
Remove code from the reset manager that is never called.
--- .../include/mach/reset_manager_arria10.h | 3 - arch/arm/mach-socfpga/reset_manager_arria10.c | 123 --------------------- 2 files changed, 126 deletions(-)
arch/arm/mach-socfpga/include/mach/reset_manager_arria10.h +0 -3
@@ -10,10 +10,7 @@void socfpga_watchdog_disable (void );void socfpga_reset_deassert_noc_ddr_scheduler (void ); -int socfpga_is_wdt_in_reset (void ); -void socfpga_emac_manage_reset (ulong emacbase,u32 state);int socfpga_reset_deassert_bridges_handoff (void ); -void socfpga_reset_assert_fpga_connected_peripherals (void );void socfpga_reset_deassert_osc1wd0 (void );int socfpga_bridges_reset (void );
arch/arm/mach-socfpga/reset_manager_arria10.c +0 -123
141 lines not on this page · raw message
Signature · 1 line
2.16.2
PATCH 3/3 ARM: socfpga: Remove adhoc ethernet reset and configuration
In reply to Marek VasutRemove ad-hoc ethernet syscon registers configuration and reset support. Reset is now handled by the reset framework and the syscon registers are set in the dwmac_socfpga.c driver.
--- arch/arm/Kconfig | 2 +- arch/arm/mach-socfpga/Kconfig | 5 ++++ arch/arm/mach-socfpga/misc_arria10.c | 49 ------------------------------------ 3 files changed, 6 insertions(+), 50 deletions(-)
arch/arm/Kconfig +1 -1
@@ -772,7 +772,7 @@ config ARCH_SNAPDRAGON config ARCH_SOCFPGA bool "Altera SOCFPGA family" select ARCH_EARLY_INIT_R - select ARCH_MISC_INIT + select ARCH_MISC_INIT if !TARGET_SOCFPGA_ARRIA10 select ARM64 if TARGET_SOCFPGA_STRATIX10 select CPU_V7A if TARGET_SOCFPGA_GEN5 || TARGET_SOCFPGA_ARRIA10 select DM
arch/arm/mach-socfpga/Kconfig +5 -0
@@ -14,6 +14,11 @@ config TARGET_SOCFPGA_ARRIA10 select DM_I2C select DM_RESET select SPL_DM_RESET if SPL + select REGMAP + select SPL_REGMAP if SPL + select SYSCON + select SPL_SYSCON if SPL + select ETH_DESIGNWARE_SOCFPGA config TARGET_SOCFPGA_CYCLONE5 bool
arch/arm/mach-socfpga/misc_arria10.c +0 -49
61 lines not on this page · raw message
Signature · 1 line
2.16.2
PATCH 1/3 net: designware: socfpga: Add Arria10 extras
In reply to Marek VasutHi Marek,
Quoted 9 lines · Marek Vasut
Add wrapper around the designware MAC driver to handle the SoCFPGA specific configuration bits. On Arria10, this is configuration of syscon
phy_intf.Signed-off-by Marek Vasut <[email protected]>Cc Chin Liang See <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Ley Foon Tan <[email protected]>Cc Joe Hershberger <[email protected]>
Looks good, but can you add something in doc/device-tree-bindings?
Quoted 6 lines
---
NOTE: This driver is not enabled on Gen5 or Stratix10 as the
implementation for its specifics is missing thus far. The driver can be safely enabled though, as the behavior of the plain designware mac driver will be retained.
---