0054-ar71xx-Use-_eth_cfg-helper-for-Open-Mesh-MR900-boards.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From: Sven Eckelmann <sven.eckelmann@open-mesh.com>
  2. Date: Tue, 7 Jul 2015 13:47:39 +0000
  3. Subject: ar71xx: Use *_eth_cfg helper for Open Mesh MR900 boards
  4. Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
  5. Backport of r46241
  6. Forwarded: https://patchwork.ozlabs.org/patch/624181/
  7. diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c
  8. index fe3e1fa..9c3164d 100644
  9. --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c
  10. +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mr900.c
  11. @@ -94,24 +94,6 @@ static struct gpio_keys_button mr900_gpio_keys[] __initdata = {
  12. },
  13. };
  14. -
  15. -static void __init mr900_gmac_setup(void)
  16. -{
  17. - void __iomem *base;
  18. - u32 t;
  19. -
  20. - base = ioremap(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE);
  21. -
  22. - t = __raw_readl(base + QCA955X_GMAC_REG_ETH_CFG);
  23. -
  24. - t &= ~(QCA955X_ETH_CFG_RGMII_EN | QCA955X_ETH_CFG_GE0_SGMII);
  25. - t |= QCA955X_ETH_CFG_RGMII_EN;
  26. -
  27. - __raw_writel(t, base + QCA955X_GMAC_REG_ETH_CFG);
  28. -
  29. - iounmap(base);
  30. -}
  31. -
  32. static void __init mr900_setup(void)
  33. {
  34. u8 *art = (u8 *)KSEG1ADDR(0x1fff0000);
  35. @@ -141,8 +123,7 @@ static void __init mr900_setup(void)
  36. }
  37. pdata->use_eeprom = true;
  38. - mr900_gmac_setup();
  39. -
  40. + ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
  41. ath79_register_mdio(0, 0x0);
  42. ath79_init_mac(ath79_eth0_data.mac_addr, art + MR900_MAC0_OFFSET, 0);