emac.c 568 B

12345678910111213141516171819202122232425262728
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. *
  4. * DaVinci EMAC initialization.
  5. *
  6. * (C) Copyright 2011, Ilya Yanok, Emcraft Systems
  7. */
  8. #include <common.h>
  9. #include <net.h>
  10. #include <asm/io.h>
  11. #include <asm/arch/am35x_def.h>
  12. /*
  13. * Initializes on-chip ethernet controllers.
  14. * to override, implement board_eth_init()
  15. */
  16. int cpu_eth_init(struct bd_info *bis)
  17. {
  18. u32 reset;
  19. /* ensure that the module is out of reset */
  20. reset = readl(&am35x_scm_general_regs->ip_sw_reset);
  21. reset &= ~CPGMACSS_SW_RST;
  22. writel(reset, &am35x_scm_general_regs->ip_sw_reset);
  23. return 0;
  24. }