Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • early-display
  • variant-emmc-nvme-boot
  • 2023-01-25
  • v3
  • variant-emmc-nvme-boot
  • 2020-06-01
7 results

gmac_rockchip.c

Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Philipp Tomsich's avatar
    1f08aa1c
    net: gmac_rockchip: Add support for the RK3399 GMAC · 1f08aa1c
    Philipp Tomsich authored
    
    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: default avatarPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
    Tested-by: default avatarKlaus Goger <klaus.goger@theobroma-systems.com>
    Acked-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
    Acked-by: default avatarSimon Glass <sjg@chromium.org>
    Fixed commit message typo s/factor our/factor out/:
    Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
    1f08aa1c
    History
    net: gmac_rockchip: Add support for the RK3399 GMAC
    Philipp Tomsich authored
    
    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: default avatarPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
    Tested-by: default avatarKlaus Goger <klaus.goger@theobroma-systems.com>
    Acked-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
    Acked-by: default avatarSimon Glass <sjg@chromium.org>
    Fixed commit message typo s/factor our/factor out/:
    Signed-off-by: default avatarSimon Glass <sjg@chromium.org>