Skip to content
Snippets Groups Projects
Select Git revision
  • a54e7654cda80c8b9ea3fc991719c1e254c4f995
  • experimental
  • master
  • v2021.1.2-ffs
  • v2021.1.1-ffs
  • nrb/gluon-master-cpe510
  • v2021.1-ffs
  • v2020.2.3-ffs
  • nrbffs/fastd-remove-delay
  • v2020.2.2-ffs
  • v2020.2.1-ffs
  • v2020.2-ffs
  • v2020.2.x
  • v2020.1.3-ffs
  • v2020.1.1-ffs
  • v2020.1-ffs
  • v2019.1.2-ffs
  • v2019.1.1-ffs
  • nrb/test-radv-filter
  • v2019.1-ffs
  • nrbffs/netgear-ex6120
  • v2021.1.2-ffs0.2
  • v2021.1.2-ffs0.1
  • v2021.1.1-ffs0.4
  • v2021.1.1-ffs0.3
  • v2021.1.1-ffs0.2
  • v2021.1.1-ffs0.1
  • v2021.1-ffs0.1
  • v2020.2.3-ffs0.3
  • v2020.2.3-ffs0.2
  • v2020.2.3-ffs0.1
  • v2020.2.2-ffs0.1
  • v2020.2.1-ffs0.1
  • v2020.2-ffs0.1
  • v2020.2
  • v2020.2.x-ffs0.1
  • v2020.1.3-ffs0.1
  • v2020.1.1-ffs0.1
  • v2020.1-ffs0.1
  • v2019.1.2-ffs0.1
  • v2019.1.1-ffs0.1
41 results

0060-ar71xx-Use-private-version-of-ath79_setup_qca955x_eth_cfg-for-MR900.patch

Blame
  • Forked from firmware / FFS Gluon
    Source project has a limited visibility.
    0060-ar71xx-Use-private-version-of-ath79_setup_qca955x_eth_cfg-for-MR900.patch 1.86 KiB
    From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
    Date: Wed, 23 Mar 2016 12:52:09 +0000
    Subject: ar71xx: Use private version of ath79_setup_qca955x_eth_cfg for MR900
    
    The MR900 must unset some bits in ETH_CFG which were set by u-boot to work
    correctly under OpenWrt. But the global function
    ath79_setup_qca955x_eth_cfg will not unset all of them to increase the
    backward compatiblity with older mach-* files. A private (simplified)
    version for MR900 can be used instead.
    
    Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
    
    Backport of r49069
    
    Forwarded: https://patchwork.ozlabs.org/patch/624187/
    
    diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c
    index 3634bf0..b439f58 100644
    --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c
    +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c
    @@ -110,6 +110,28 @@ static struct mdio_board_info mr900_mdio0_info[] = {
     	},
     };
     
    +static void __init mr900_setup_qca955x_eth_cfg(u32 mask,
    +					       unsigned int rxd,
    +					       unsigned int rxdv,
    +					       unsigned int txd,
    +					       unsigned int txe)
    +{
    +	void __iomem *base;
    +	u32 t;
    +
    +	base = ioremap(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE);
    +
    +	t = mask;
    +	t |= rxd << QCA955X_ETH_CFG_RXD_DELAY_SHIFT;
    +	t |= rxdv << QCA955X_ETH_CFG_RDV_DELAY_SHIFT;
    +	t |= txd << QCA955X_ETH_CFG_TXD_DELAY_SHIFT;
    +	t |= txe << QCA955X_ETH_CFG_TXE_DELAY_SHIFT;
    +
    +	__raw_writel(t, base + QCA955X_GMAC_REG_ETH_CFG);
    +
    +	iounmap(base);
    +}
    +
     static void __init mr900_setup(void)
     {
     	u8 *art = (u8 *)KSEG1ADDR(0x1fff0000);
    @@ -139,7 +161,7 @@ static void __init mr900_setup(void)
     	}
     	pdata->use_eeprom = true;
     
    -	ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
    +	mr900_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 3, 3, 0, 0);
     	ath79_register_mdio(0, 0x0);
     
     	mdiobus_register_board_info(mr900_mdio0_info,