mpc7448hpc2.c 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*
  2. * (C) Copyright 2005 Freescale Semiconductor, Inc.
  3. *
  4. * Roy Zang <tie-fei.zang@freescale.com>
  5. *
  6. * See file CREDITS for list of people who contributed to this
  7. * project.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  22. * MA 02111-1307 USA
  23. *
  24. * modifications for the Tsi108 Emul Board by avb@Tundra
  25. */
  26. /*
  27. * board support/init functions for the
  28. * Freescale MPC7448 HPC2 (High-Performance Computing 2 Platform).
  29. */
  30. #include <common.h>
  31. #include <74xx_7xx.h>
  32. #if defined(CONFIG_OF_FLAT_TREE)
  33. #include <ft_build.h>
  34. extern void ft_cpu_setup (void *blob, bd_t *bd);
  35. #endif
  36. #undef DEBUG
  37. DECLARE_GLOBAL_DATA_PTR;
  38. extern void flush_data_cache (void);
  39. extern void invalidate_l1_instruction_cache (void);
  40. extern void tsi108_init_f (void);
  41. int display_mem_map (void);
  42. void after_reloc (ulong dest_addr)
  43. {
  44. /*
  45. * Jump to the main U-Boot board init code
  46. */
  47. board_init_r ((gd_t *) gd, dest_addr);
  48. /* NOTREACHED */
  49. }
  50. /*
  51. * Check Board Identity:
  52. * report board type
  53. */
  54. int checkboard (void)
  55. {
  56. int l_type = 0;
  57. printf ("BOARD: %s\n", CFG_BOARD_NAME);
  58. return (l_type);
  59. }
  60. /*
  61. * Read Processor ID:
  62. *
  63. * report calling processor number
  64. */
  65. int read_pid (void)
  66. {
  67. return 0; /* we are on single CPU platform for a while */
  68. }
  69. long int dram_size (int board_type)
  70. {
  71. return 0x20000000; /* 256M bytes */
  72. }
  73. long int initdram (int board_type)
  74. {
  75. return dram_size (board_type);
  76. }
  77. #if defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP)
  78. void
  79. ft_board_setup (void *blob, bd_t *bd)
  80. {
  81. u32 *p;
  82. int len;
  83. ft_cpu_setup (blob, bd);
  84. p = ft_get_prop (blob, "/memory/reg", &len);
  85. if (p != NULL) {
  86. *p++ = cpu_to_be32 (bd->bi_memstart);
  87. *p = cpu_to_be32 (bd->bi_memsize);
  88. }
  89. }
  90. #endif