edminiv2.c 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright (C) 2010 Albert ARIBAUD <albert.u.boot@aribaud.net>
  3. *
  4. * (C) Copyright 2009
  5. * Marvell Semiconductor <www.marvell.com>
  6. * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
  7. *
  8. * SPDX-License-Identifier: GPL-2.0+
  9. */
  10. #include <common.h>
  11. #include <miiphy.h>
  12. #include <asm/arch/orion5x.h>
  13. #include "../common/common.h"
  14. #include <spl.h>
  15. #include <ns16550.h>
  16. DECLARE_GLOBAL_DATA_PTR;
  17. int board_init(void)
  18. {
  19. /* arch number of board */
  20. gd->bd->bi_arch_number = MACH_TYPE_EDMINI_V2;
  21. /* boot parameter start at 256th byte of RAM base */
  22. gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
  23. return 0;
  24. }
  25. #if defined(CONFIG_CMD_NET) && defined(CONFIG_RESET_PHY_R)
  26. /* Configure and enable MV88E1116 PHY */
  27. void reset_phy(void)
  28. {
  29. mv_phy_88e1116_init("egiga0", 8);
  30. }
  31. #endif /* CONFIG_RESET_PHY_R */
  32. /*
  33. * SPL serial setup and NOR boot device selection
  34. */
  35. #ifdef CONFIG_SPL_BUILD
  36. void spl_board_init(void)
  37. {
  38. preloader_console_init();
  39. }
  40. u32 spl_boot_device(void)
  41. {
  42. return BOOT_DEVICE_NOR;
  43. }
  44. #endif /* CONFIG_SPL_BUILD */