init_wrappers.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /*
  2. * (C) Copyright 2011
  3. * Graeme Russ, <graeme.russ@gmail.com>
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #include <common.h>
  24. #include <serial.h>
  25. #include <kgdb.h>
  26. #include <scsi.h>
  27. #include <post.h>
  28. #include <miiphy.h>
  29. #include <asm/init_wrappers.h>
  30. int serial_initialize_r(void)
  31. {
  32. serial_initialize();
  33. return 0;
  34. }
  35. int env_relocate_r(void)
  36. {
  37. /* initialize environment */
  38. env_relocate();
  39. return 0;
  40. }
  41. int pci_init_r(void)
  42. {
  43. /* Do pci configuration */
  44. pci_init();
  45. return 0;
  46. }
  47. int jumptable_init_r(void)
  48. {
  49. jumptable_init();
  50. return 0;
  51. }
  52. int pcmcia_init_r(void)
  53. {
  54. puts("PCMCIA:");
  55. pcmcia_init();
  56. return 0;
  57. }
  58. int kgdb_init_r(void)
  59. {
  60. puts("KGDB: ");
  61. kgdb_init();
  62. return 0;
  63. }
  64. int enable_interrupts_r(void)
  65. {
  66. /* enable exceptions */
  67. enable_interrupts();
  68. return 0;
  69. }
  70. int eth_initialize_r(void)
  71. {
  72. puts("Net: ");
  73. eth_initialize(gd->bd);
  74. return 0;
  75. }
  76. int reset_phy_r(void)
  77. {
  78. #ifdef DEBUG
  79. puts("Reset Ethernet PHY\n");
  80. #endif
  81. reset_phy();
  82. return 0;
  83. }
  84. int ide_init_r(void)
  85. {
  86. puts("IDE: ");
  87. ide_init();
  88. return 0;
  89. }
  90. int scsi_init_r(void)
  91. {
  92. puts("SCSI: ");
  93. scsi_init();
  94. return 0;
  95. }
  96. #ifdef CONFIG_BITBANGMII
  97. int bb_miiphy_init_r(void)
  98. {
  99. bb_miiphy_init();
  100. return 0;
  101. }
  102. #endif
  103. #ifdef CONFIG_POST
  104. int post_run_r(void)
  105. {
  106. post_run(NULL, POST_RAM | post_bootmode_get(0));
  107. return 0;
  108. }
  109. #endif