u-boot-brain/drivers/net
Philipp Tomsich 1f08aa1c9f net: gmac_rockchip: Add support for the RK3399 GMAC
The GMAC in the RK3399 is very similar to the RK3288 variant (i.e. it
is a Designware GMAC core and requires similar configuration as the
RK3288 to switch it to RGMII and set up the TX/RX delays for Gigabit).
The key difference is that the register offsets (within the GRF block)
and bit-offsets (within those registers) used to hold the configuration
differ between the various RK32/33 CPUs.

This change refactors the gmac_rockchip.c driver to use a function
table (selected via driver_data) to factor out these differences. Each
function's implementation then matches the underlying processor.

Some collateral changes are needed in the definitions describing the
bits and offsets in the GRF are needed to prefix each set of symbolic
constants with the SoC name to avoid name clashes... and in doing so,
the shifts for masks and constants have been moved into the header
files for readability (and to make it easier to stay below 80 chars).

X-AffectedPlatforms: RK3399-Q7
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Fixed commit message typo s/factor our/factor out/:
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-04 20:01:57 -06:00
..
fm powerpc: mpc85xx: Remove variant SoCs T1020/T1022/T1013/T1014 2017-01-04 19:40:20 -05:00
fsl-mc driver: net: fsl-mc: Update calculation of MC RAM 2017-03-14 08:44:03 -07:00
ldpaa_eth arm: fsl-layerscape: Move QSGMII wriop_init to SoC file 2017-03-28 09:08:25 -07:00
phy drivers/net/phy: add fixed-phy / fixed-link support 2017-03-26 09:58:26 -05:00
4xx_enet.c Various, accumulated typos collected from around the tree. 2016-10-06 20:57:40 -04:00
8390.h
ag7xxx.c dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
altera_tse.c dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
altera_tse.h net: altera_tse: add mSG-DMA support 2015-11-12 08:26:59 +08:00
armada100_fec.c Update Maintainer and Author's email address 2016-12-27 11:24:17 -05:00
armada100_fec.h Update Maintainer and Author's email address 2016-12-27 11:24:17 -05:00
at91_emac.c net: mii: Use spatch to update miiphy_register 2016-08-15 15:26:33 -05:00
ax88180.c Remove some merge markers 2016-10-23 18:33:18 -04:00
ax88180.h
ax88796.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
ax88796.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
bcm-sf2-eth-gmac.c net: fix cache misaligned issue in Broadcom SF2 driver 2017-03-26 09:58:15 -05:00
bcm-sf2-eth-gmac.h arm: bcm281xx: net: Add Ethernet Driver 2014-08-30 07:46:39 -04:00
bcm-sf2-eth.c net: mii: Changes not made by spatch 2016-08-15 15:29:03 -05:00
bcm-sf2-eth.h net: fix cache misaligned issue in Broadcom SF2 driver 2017-03-26 09:58:15 -05:00
bfin_mac.c net: mii: Fix changes made by spatch 2016-08-15 15:29:03 -05:00
bfin_mac.h net: Fix remaining API interface breakage 2012-05-23 14:19:21 -05:00
calxedaxgmac.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
cpsw-common.c Merge git://git.denx.de/u-boot-dm 2017-02-08 16:24:44 -05:00
cpsw.c dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
cs8900.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
cs8900.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
davinci_emac.c net: davinci_emac: Restore the internal MDIO accessors return values 2016-08-22 14:21:20 -05:00
davinci_emac.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
dc2114x.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
designware.c Merge branch 'master' of git://git.denx.de/u-boot-net 2017-02-09 11:56:35 -05:00
designware.h net: designware: Export the operation functions 2017-01-11 20:23:50 -07:00
dm9000x.c Fix GCC format-security errors and convert sprintfs. 2016-01-14 22:11:34 -05:00
dm9000x.h
dnet.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
dnet.h
dwc_eth_qos.c net: add driver for Synopsys Ethernet QoS device 2016-11-07 11:28:15 -06:00
e1000_spi.c net: e1000: Fix the build with driver model and SPI EEPROM 2016-08-15 13:34:45 -05:00
e1000.c net: e1000: fix indentation 2016-12-04 13:55:01 -05:00
e1000.h net: e1000: Convert to use DM PCI API 2016-02-05 12:47:23 +08:00
eepro100.c net: mii: Use spatch to update miiphy_register 2016-08-15 15:26:33 -05:00
enc28j60.c net: mii: Use spatch to update miiphy_register 2016-08-15 15:26:33 -05:00
enc28j60.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
ep93xx_eth.c net: mii: Fix changes made by spatch 2016-08-15 15:29:03 -05:00
ep93xx_eth.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
ethoc.c net/ethoc: implement MDIO bus and support phylib 2016-08-15 13:34:49 -05:00
fec_mxc.c Merge branch 'master' of git://git.denx.de/u-boot-net 2017-02-09 11:56:35 -05:00
fec_mxc.h net: fec_mxc: Driver cleanups 2016-12-16 17:15:27 +01:00
fsl_mcdmafec.c net: mii: Use spatch to update miiphy_register 2016-08-15 15:26:33 -05:00
fsl_mdio.c treewide: replace #include <asm/errno.h> with <linux/errno.h> 2016-09-23 17:55:42 -04:00
ftgmac100.c Fix GCC format-security errors and convert sprintfs. 2016-01-14 22:11:34 -05:00
ftgmac100.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
ftmac100.c Fix GCC format-security errors and convert sprintfs. 2016-01-14 22:11:34 -05:00
ftmac100.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
ftmac110.c treewide: replace #include <asm/errno.h> with <linux/errno.h> 2016-09-23 17:55:42 -04:00
ftmac110.h net: ftmac110: Update tx/rx descriptor format 2013-08-19 12:34:21 -05:00
gmac_rockchip.c net: gmac_rockchip: Add support for the RK3399 GMAC 2017-04-04 20:01:57 -06:00
greth.c Fix GCC format-security errors and convert sprintfs. 2016-01-14 22:11:34 -05:00
greth.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
Kconfig net: mvpp2: Enable compilation for Armada 7K/8K platforms 2017-03-29 07:42:20 +02:00
keystone_net.c dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
ks8851_mll.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
ks8851_mll.h net: ks8851_mll: add ethernet support 2013-06-24 19:11:14 -05:00
lan91c96.c Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
lan91c96.h arm: remove lubbock board support 2014-04-18 10:42:30 -04:00
lpc32xx_eth.c treewide: replace #include <asm/errno.h> with <linux/errno.h> 2016-09-23 17:55:42 -04:00
macb.c net: macb: Fix ETH not found when clock not support 2017-03-01 21:28:39 -05:00
macb.h net: macb: add gmac multi-queue support 2015-08-11 13:27:15 -05:00
Makefile net: gmac_rockchip: Add Rockchip GMAC driver 2017-01-11 20:23:50 -07:00
mcffec.c net: mii: Use spatch to update miiphy_register 2016-08-15 15:26:33 -05:00
mcfmii.c net: mii: Changes not made by spatch 2016-08-15 15:29:03 -05:00
mpc5xxx_fec.c net: mii: Use spatch to update miiphy_register 2016-08-15 15:26:33 -05:00
mpc5xxx_fec.h
mpc512x_fec.c net: mii: Use spatch to update miiphy_register 2016-08-15 15:26:33 -05:00
mpc512x_fec.h
mvgbe.c net: mvgbe: Fix build error with CONFIG_PHYLIB 2016-11-07 11:28:16 -06:00
mvgbe.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
mvneta.c mvebu: neta: a37xx: Add fixed link support to neta driver 2017-03-29 07:38:09 +02:00
mvpp2.c net: mvpp2: Remove unreferenced in_use_thresh from struct mvpp2_bm_pool 2017-03-29 07:44:37 +02:00
natsemi.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
ne2000_base.c Fix spelling of "occurred". 2016-05-02 18:37:09 -04:00
ne2000_base.h Consolidate bool type 2013-04-01 16:33:52 -04:00
ne2000.c net: Use ARRAY_SIZE at appropriate places 2013-08-19 12:34:18 -05:00
ne2000.h
netconsole.c video: Drop DEV_FLAGS_SYSTEM flag 2015-11-05 08:22:21 +01:00
ns8382x.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
pch_gbe.c net: pch_gbe: Make 64 bit safe 2016-09-21 15:04:32 +02:00
pch_gbe.h net: pch_gbe: Convert to use DM PCI API 2016-02-05 12:47:23 +08:00
pcnet.c net: pcnet: Fix init on big endian 64 bit 2016-05-31 09:38:11 +02:00
pic32_eth.c dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
pic32_eth.h drivers: net: Add ethernet driver for Microchip PIC32. 2016-02-01 22:14:02 +01:00
pic32_mdio.c drivers: net: Add ethernet driver for Microchip PIC32. 2016-02-01 22:14:02 +01:00
rtl8139.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
rtl8169.c net: rtl8169: remove unneeded definition 2016-12-04 13:55:01 -05:00
sandbox-raw.c dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
sandbox.c dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
sh_eth.c treewide: replace #include <asm/errno.h> with <linux/errno.h> 2016-09-23 17:55:42 -04:00
sh_eth.h Fix various typos, scattered over the code. 2016-05-05 21:39:26 -04:00
smc911x.c net: mii: Fix changes made by spatch 2016-08-15 15:29:03 -05:00
smc911x.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
smc91111.c arm: Remove xaeniax board 2015-09-11 17:14:43 -04:00
smc91111.h arm: Remove xaeniax board 2015-09-11 17:14:43 -04:00
sun8i_emac.c dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
sunxi_emac.c net: sunxi-emac: Write HW address via function 2017-03-26 09:40:57 -05:00
tsec.c dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
tsi108_eth.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
uli526x.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
vsc7385.c treewide: replace #include <asm/errno.h> with <linux/errno.h> 2016-09-23 17:55:42 -04:00
vsc9953.c drivers: net: vsc9953: Fix bug when PVID is shown for disabled ports only 2016-04-06 08:34:44 -07:00
xilinx_axi_emac.c dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
xilinx_emaclite.c dm: core: Replace of_offset with accessor 2017-02-08 06:12:14 -07:00
xilinx_ll_temac_fifo.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
xilinx_ll_temac_fifo.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
xilinx_ll_temac_mdio.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
xilinx_ll_temac_mdio.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
xilinx_ll_temac_sdma.c net: cosmetic: Fix var naming net <-> eth drivers 2015-04-18 11:11:33 -06:00
xilinx_ll_temac_sdma.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
xilinx_ll_temac.c net: xilinx_ll_temac: Fix string overflow 2016-01-27 15:57:20 +01:00
xilinx_ll_temac.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
zynq_gem.c Xilinx changes for v2017.05 2017-03-16 16:44:23 -04:00